Page 1 of 1
Procedural asteroids
Posted: Sun Nov 24, 2019 3:20 pm
by StarBootics
Hello everyone,
I took a break from programming my Model Editor for my game and focus on something I call the "Asteroids Factory" to generate asteroids automatically. Getting the 3D shapes is relatively easy and it's pretty much done at this point. The source of inspiration for asteroids generation came from these two sources :
And tips for surface relaxation and smoothing came from :
The main problem I'm encountering now is texturing them to look good and this what I got so far and I'm not impressed at all.
I'm searching the web like crazy to find examples but so far I didn't find something valuable. I'm considering to use different textures combined with a blend map to paint the details.Texturing asteroids is more complicated than I have anticipated. Any suggestions will be welcome.
Best regards
StarBootics
Re: Procedural asteroids
Posted: Tue Nov 26, 2019 5:15 am
by StarBootics
Hello everyone,
I have conducted some experiment with 3 textures and a blend map. I'm not impressed with the result like before. This is what the result look like :
Best regards
StarBootics
Re: Procedural asteroids
Posted: Wed Nov 27, 2019 8:45 pm
by StarBootics
Hello everyone,
Some more test this time I'm creating only one texture created from 2 procedural textures. Better but still room for improvement, the seems in the texture are very apparent for the moment. Maybe the texture generation should be based on the UV mapping of the 3D models.
Best regards
StarBootics
Re: Procedural asteroids
Posted: Wed Nov 27, 2019 10:06 pm
by IdeasVacuum
Hi StarBootics
How are you producing the mesh for your asteroids? Looks like the texture is wrapping to what appear to be relatively sharp edges in the mesh.
Re: Procedural asteroids
Posted: Wed Nov 27, 2019 11:19 pm
by StarBootics
IdeasVacuum wrote:Hi StarBootics
How are you producing the mesh for your asteroids? Looks like the texture is wrapping to what appear to be relatively sharp edges in the mesh.
The one shown above is created from an Octahedron, the following steps are done to generate the final shape :
1. Create the Octahedron
2. Subdivide each face to have more triangles (the final shape as 2048 triangles)
3. Spherify the geometry
4. Deform the mesh using 3D Simplex Noise
5. Scale the mesh by 5 (This will be random later on)
6. Apply the Smoothing and surface relaxation randomly 1 to 2 times
7. Modify the normal vector to avoid the faceted look
for now the 3D shape generation and texture generation are completely independent from each other. I have some Ideas to put to the test to use the mesh it's self (vertices and UV Mapping to generate the texture. About this aspect of the project I'm in total experimental mode.
Best regards
StarBootics
Re: Procedural asteroids
Posted: Thu Nov 28, 2019 12:14 am
by IdeasVacuum
I see - I think using the Octahedron as a basis possibly makes life that much more difficult

If I was making them "by hand" in a CAD program, I would be starting with a Sphere or Ellipsoid, no sharp seams to worry about.
Re: Procedural asteroids
Posted: Thu Nov 28, 2019 1:16 am
by StarBootics
IdeasVacuum wrote:I see - I think using the Octahedron as a basis possibly makes life that much more difficult

If I was making them "by hand" in a CAD program, I would be starting with a Sphere or Ellipsoid, no sharp seams to worry about.
With a sphere you will have the same problem at the poles and also where the sphere start/end because the UV mapping will have a seams at first/last meridian. But you are right a sphere will have less seams to deal with.
Put on the list of stuff to consider.
Best regards
StarBootics
Re: Procedural asteroids
Posted: Fri Nov 29, 2019 2:41 am
by StarBootics
Hello everyone,
Just try to use a sphere as a base to generate an asteroid and I don't know why deformation of the sphere generate a gap between the first and the last meridian. It look like the seam don't stay welded.
Best regards
StarBootics