Hey all!
So I’m working on a little system of creating random solar systems for my game. However I’m running into an issue where I’m not sure how to create the orbit spline that shows the path of the planets. Right now Im using a 3d mesh that I imported (The red line) and scaling it up.
I take the planet offset, which is a float distance from 0,0,0 to Value,0,0 relatively.
Then I just guess and set the spline relative size by taking that value and dividing it by a number.
The first orbit seems to be okay but I think because the value is so big (3000-4000) the further I get the less chance of it fitting. It’s almost always off on the 2nd orbit probably because I need to divide by like 70.05123 u know what i mean?
Does anyone have an idea how I get properly set this system up?
Wow thanks so much! I tried something similar (but your’s look cleaner) but I still had the issue of the planet not ‘snapping’ exactly to the orbit. How do you get the planets to follow the spline path?
It’s strange I dont see anything I tried copying your blueprints. Maybe I’m not putting correct numbers inside some values…
What exactly should base points / complexity / base spaci
Base Points: 9
Base Spacing: 40
Complexity: 2 | 4 | 8 (those three values work well)
Tilt: -0.5 <> 0.5
Ellipse: 0.85 <> 1.15
The spline is closed but you still need to move along it. It begins at 0 and ends at 1. Think about it as if it was progression percentage. As soon as it goes above 1, snap it back to 0. That’s what *modulo * does in the example above.
SO it’s creating wayy too many mesh components and it’s bringing my FPS wayyyyyyyyyyyyyyy down to unplayable. Like from 120fps to 20fps lol It’s probably around 8k mesh or more.
Also it could be becuase I switch Complexity to 40 and Base spacing to 2 …
Now i switched it back to what you said and I dont even see anything happening anymore …
This is how it looks with complexity 2. Not entirely smooth but enough for what I needed it for. I only used complexity 4 for close-ups. 8 is an overkill. imho. 40 sounds redundant save for the most extreme cases. Complexity is a simple multiplier, nothing else. At 2, it generate 18 meshes, at 4 you get 36.
Again, this will depend on your mesh. This is what I’m using, the material is very simple and just uses pixel depth to avoid clutter when you have 20+ objects visible.
I’m years late to this thread seeking a solution to this same problem, but all of the original images appear missing or corrupt to me. The image in the final post still appears, though. Is there any way to retrieve the now-missing images?
Oy, I hope the Discourse Gods were well pleased, anyway.
Yes, I’m trying to draw orbital curves in 3d space without using debug drawing. It looks a bit like you have two different methods going on in your last photo – using spline meshes and particles/beams? I’d love to get a look at how you did this.
I lifted what was relevant from an old project (opening 4.17 → 4.27 is no fun at all! but still pretty stunned it actually opens & works almost out of the box!):
Project link:
Here’s what this actor can do:
Some basic controls for this are exposed but it needs a ton of features to make it useable / more flexible. I’d start with adding controls for how many SMCs are needed for smaller / larger orbits - currently it’s a fixed number. May be fine depending on what this is going to be used for.
The mesh is made out of 3 planes with a dual sided material:
Oh ■■■■ this looks awesome, thank you! I’ll start poking at it and let you know how it goes.
Edit: I got into it for a bit to see how it works, and this for sure works great and makes perfect sense. Thank you x1E9, and I’ll post back once I’ve got something concocted that uses this method
Hey… thanks for the quick reply… the post where you say “the material can also do this… its just disconnected” Downloaded project but cannot figure out how to connect .