Posted on December 4, 2010
Rocky asteroids part I
Developed a procedure to create rocky asteroids. They should be very lowpoly because there will be a lot of them in Psirens.
Off course the rocks can be of any size and complexity. Like this:
The algorithm is ported from the PovRockGen utility. A lot of work on the geometry had to be done.
The face indices were completely missing and I had to think up a way to find the correct triangle winding order.
I did this by finding a common edge between two triangle and changed the indices in a way that the counter-clockwise order was valid.
A lot of improvement on the speed of this algorithm should be done because the triangles are not sorted beforehand, making the algorithm slow for complex rocks.
After long and hard thinking about texturing I decided to go for the easiest approach. Projecting a texture from a set of fixed points. Projection with only one point this gives the following results:
As you can see that the picture does not look good from all angles. Left upper corner looks undistorted, the right upper corner is heavily distorted.
Sometimes the rock has deeper parts and show some distortion too. The asteroid will need a lot more projections and with the correct blending this will lead to a less distorted view.
The texture used: