• entries
    232
  • comments
    1462
  • views
    955789

Asteroids

Sign in to follow this  
Ysaneya

4448 views

Construction and style of asteroids

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
Sign in to follow this  


7 Comments


Recommended Comments

Very interesting article, thank you for the description!

And: It looks frightning real! The motion blur of the cam adds a lot to the asteroids i think. Cant wait to have a little look at it in motion. Well done!

Share this comment


Link to comment
The craters on the asteroids seem unrealistic to me. The whole rock would just blow up into pieces instead of forming a crater half the size of the asteroid. The Minas crater is probably close to an extreme case, though in a much different scale than an average asteroid ( http://apod.nasa.gov/apod/ap050308.html ).

I would suggest keeping the (relative) size of the craters much smaller and creating more differently shaped asteroids instead. This could also help with your lighting issue.

Share this comment


Link to comment
Quote:
Original post by Cth
The Minas crater is probably close to an extreme case, though in a much different scale than an average asteroid ( http://apod.nasa.gov/apod/ap050308.html ).

I don't think Minas is a good example precisely because, as you say it's a different scale, it is a nearly spherical moon with a radius of 200km. Also you say asteroids would just blow up instead of creating those crators, but they could be the result of 2 bigger asteroids colliding. Have a look at these :

Mathilde, Gaspra, Ida

Share this comment


Link to comment
Interresting. Can't you initiate a blur phase that blurs out the shadows near the 'real' geometry edges. Some kind of an inward blur that make the edges look smooth again.

You aren't planning to release another Combat Prototype right? I wished Infinity was available for download right at this moment. *sighs*

- Christiaan "AniCator" Bakker

Share this comment


Link to comment
Awesome

I'm no expert but I have seen that weird shadow "bug" on many a game with a spherical object. Sometimes I think it's better with no shadow at all, but I am probably wrong.

Is there a distance where you render just a sprite/billboard for the asteroid instead of the full model?

Share this comment


Link to comment
This is a fantastic article! I haven't seen any asteroids this well done before. It would also be great to see an article on the "seamless cubic texture projections" that are mentioned.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now