Using motion path stuff for surface definition

At this point I have successfully made rather spiky asteroids and they look good so far.

Next yup I want them to look less like the unholy offspring of Sonic the Hedgehog and a Garburator and more like the lumpy potatoes that they should be.

This lead me down the path of looking at Bezier curves which I was all ready to implement myself but lo and behold JME has functions built right in for motion path stuff along with a new type of curve I hadn’t heard of before called a Catmull-Rom curve which would probably suit my needs better (Thanks @nehon for a reply he did in 2013 that pointed me at it).

Which brings me to my question. The curves mentioned are used primarily for motion paths from the looks of it whereas I want to use them to help define my mesh.

Is there a way to get a point on the curve if I give it a specific, I guess, time that I’m looking for?

My plan is to run along each of the main points to each other and flush out all the other points in between to make the mesh.

Thoughts?

1 Like

First you have a FastMath interpolateCatmullRom(), you don’t really need a spline, Curve or a motion path.
Second, interpolation is fine if you tesselate your mesh, because you can smooth in-between vertices position with a spline/cubic function (between 2 base mesh vertices).
If you don’t want to tesselate the operation is a bit more complicated…because you need to keep some control points (vertices) than won’t move (Catmullrom curves goes through each control point).

Bezier would be better here as it’s computes a spline between the control points…

Anyway… IMO you are over thinking this… just make 4 or 5 different smooth asteroids in blender, and load them in JME.

1 Like

Oh. I’m totally over thinking it. That much is certain :wink:

I’ve already got all the non-moving base points for my mesh done and working, also I’m down to clown with tessellation which is exactly what I’m working towards. Part of the reason for the procedurally generated asteroids is I’ve played quite a few space games and the repetitiveness of the asteroids bothers me, so does the puny scale (Heck. Part of the reason Pluto was degraded from Planet to microplanet/planetoid is that there are some asteroids in our asteroid belt that’d qualify AS planets if Pluto was). So I do need tessellation for LOD in the long run.

But ya. Thanks for the point towards the interpolation function there. I’ll give it a whirl and report back.

Thanks!

1 Like

One follow-up question regarding Catmull-rom (thank you OH so much for pointing me at that again… It’ll make my life hella easier).

Value u that you pass to it only says it’s a value from 0 to 1. I’m assuming that that is the “percentage” along the curve that is interpolated. The document is rather vague and my quick reading of Catmull-Rom seems to suggest that I’m correct. But just checking to make sure that if I use a value of 0.5 that that is in fact the midpoint of the curve generated.

1 Like

Yes it’s your interpolation value. It can be a percentage of the distance between 2 points or the time traveling between two points but it has to be normalized in [0,1].

2 Likes

Thanks again!

1 Like

Or… just use an IsoSurface style mesh created from some random meta-balls.

IsoSurfaces (like in the IsoSurfaceDemo), are made by creating a surface at some “signal level” for some 3D function. A classic example is to have points that have a strength and the distance falls off as the inverse square or faster. If you put many of these points together then you get smooth blobby shapes. You can even have negative points subtract from them.

I used it for terrain in the IsoSurfaceDemo but it need not be terrain. That’s just the way that particular function works… but even with that 3D noise-based version you can see some floating shapes that look a bit asteroid like.

And that’s a feature of the signal function… because a less aggressive version makes more classical terrain like in these prototypes:

4 Likes

Huh. Interesting. I may have to give that a whirl if my method ends up flopping.

I’m really close to finishing my way though so I’ll finish it and see how well (or poorly) it works.

Thanks!

1 Like