Which method ?
When making asteroids for a 3D game, an artist can spill out asteroids with three different methods. Simplest way is to model low poly asteroids and slam diffuse/bump maps on them with simple texture projections. There are two more advanced ways: displacement map modeling and sculpting, which both require an extra high res geometry that never ends up in-game. I prefer displacement map modeling over sculpting because it is possible to accurately control what to edit (features stay clean) and the speed of creating is faster when there is no need to update a mesh of millions of polygons because of a "microscopic" detail. As asteroids are relatively round, it is easy and fast to modify the geometry with spherical displacement maps. This method fits well into our pipeline and offers a quality that wont leave us cold.
Finding the right style for asteroids]
As realism is a respected word in our development team, I went through a long load of NASA photos to install the look of real asteroids into my mind. I encountered a huge amount of boring rocks that were filled with almost unnoticeable features. At that point I felt a need to spice up the realistic look a bit. I decided to add some dirt to indentations, more variety to shapes of craters, much "impact erosion" that is caused by small colliding objects and some lava rock alike features that are placed on the bottoms of fresh large craters.
Construction - 2D to 3D
First i made some basis textures that can be shared with all the displacement maps. This is to save time and to reach some similarity between asteroids.
I built some subtle tileable height maps that contain only some for long aged small craters. These maps form up good "background noise" for asteroids.
Then I built a crater sprite that is rendered from a half sphere. The sprite works perfectly with Photoshop's multiply blend. Slopes of a crater can be perfectly controlled by editing curves of the sprite. It is very easy to add interesting details to a crater by smudging, erasing, burning and dodging the sprite.
Then I built a multiplying gravel texture that contains some small fresh craters. The texture greatly reduces the amount of work with all the "microscopic" craters.
After mixing my basis elements, editing my craters, painting/dodging/burning some individual details and modifying my texture into a form of a spherical map, I got my ready-to-use displacement map.
When the displacement map is ready, it is very easy to turn it to a diffuse map. If there is need to create specular maps, they can be easily built from displacement maps or diffuse maps.
Even though we have screen-space-ambient-occlusion in our engine, I wanted to spice up the look with a subtle toutch of texture based ambient occlusion. I prefer to do AO bake renders in LightWave 3D with a high resolution meshes. These days it is possible to get normal map based AOs quickly from programs such as Crazy Bump or xNormal, but the quality of their output isn't good enough compared to real 3D renders.
After all the textures were done it was time to UV map and elevate the surface of a tesselational sphere. Before UV mapping it is important to create a straight pole-to-pole seam to the sphere. The seam makes good clean spherical UV map possible and it also helps with poly reduction later.
Here's one of high res asteroids that were built for testing purposes:
You can see that the rough shape of the asteroid above is nearly spherical. In order to make asteroids that have long-ish oval or banana alike shape, ratio of maps has to be decided before going to anvil so that there's no stretching in the end. After the displacement mapping is set to stone it is possible to deform objects slightly if there is need for more radical features.
After my high res objects were done, I created low res versions. Reduction tools might create spiky features. They can to be easily neutralized with basic modelling tools. The best polygon reduction tool that I have seen is qemLOSS3 (for LW 3D). It not only creates an optimal low res mesh, it also keeps the UV decently. Thanks for Marvin Landis for all his great free tools ! Smile
After the lowres objects were ready, I normal mapped them and enjoyed all the pieces of rocks in our ASEToBin object viewer/converter.
Need for great resolutions
In infinity it is not rare that player's camera is very close to an object. Normal maps cant really give enough detail for our biggest asteroids. When I started to make the asteroids, our mastermind Flavien Brebion aka InfinityAdmin had already implemented an in-game texture projection system that grants us seamless cubic projections that settle nicely on any shape. Because we have this kind of system, we can easily add detail textures to our asteroids and reach a texture resolution that stays rich when watching a surface closely.
Here's one of our asteroid detail textures in ASEToBin:
This "article" only showed some material about rocky (ring) asteroids. Infinity will have some cool ice asteroids floating around too.
- Kristian "spAce" Agren
In-game asteroids:
Those are the results of asteroids in game:
Asteroid 1
Asteroid 2
Asteroid 3
The third picture has some motion blur, as I was moving the camera towards the asteroid at high speed.
The normal mapping technique does wonders on asteroids. However, the dynamic shadows ( you can easily notice them in the two first pictures, see inside the craters ) create all sort of fighting / acne artifacts. I kind of suceeded in hiding them by increasing the normals / lighting strength, but it's far from perfect..
The problem with such models is that, unlike on ships / buildings, you have no sharp shadows. Or, more exactly, the asteroid is lit from the normal map, but its normals are all smoothed ( from an artist point of view, all vertices share the same normals, there's no sharp edge anywhere, it's all in one single smoothing group ). This is necessary for normal mapping to work.
... but it makes the lighting no longer match the "real" geometry, which is extremely low poly. Such an asteroid has a few thousand polys at most, and a single crater, that looks nicely detailed / lit from a distance, is actually made of 3 or 4 triangles. So because shadowing is using the real geometry, and not the virtual one mimiced by the normal mapping, you get a shadow that looks like it's coming from 3 or 4 triangles.
It appears almost like a "bug" when you see a single dark triangle on the middle of the lit surface of the asteroid, but that's because the crater itself is 3 triangles.
Of course, all would be fixed if there was no smoothing on the asteroid, but you'd see sharp angles everywhere and it'd look even more ugly.
In the end, I don't think this problem can really be fixed. It's a fundamental one coming from the way shadows are handled ( from geometry ) while lighting is coming from the high-poly model ( different geometry ).. so no surprise that the two don't match.
I hope I've done a decent job at hiding this artifact, but if you're looking carefully in game, you'll notice it. Bah.
-- InfinityAdmin