Sign in to follow this  
  • entries
    12
  • comments
    5
  • views
    15748

Improved Planets

Sign in to follow this  

251 views

I have found some time to improve the planet rendering engine again. Most importantly, the noise function that generates the surface is now much faster than before. I have basically incorporated many of the enhancements to the improved Perlin noise which are posted all over the web, and on this site. I would say that the performance is now an order of magnitude better than before, and it can probably still double one more time by using SMID instructions.

Right now I am only using one separate thread to compute the terrain patches as needed, but I will probably start a second thread soon. My dual core processor still has lots of resources available, and so far Geist3D is mainly GPU bound. I am looking forward to a quad core processor that can run 8 simultaneous threads. At that point, I will experiment with even more complex noise functions similar to the ones in libnoise.

I have also changed the way the planet is textured. Before, a 2D lookup table was used to determine the color for a pixel with a given slope and elevations. A bit of GPU noise was used the mix the colors and perturb the surface normals. In this new version, the lookup table is used to select a texture in a 4x4 texture pack, just as it is done by Infinity. In the spirit of Geist3D, I have also added a little interface widget to select the texture pack and create the lookup table interactively. Here are a few images of the engine, texture pack and interface widget.





The borders between adjacent textures are still quite rigid and I will have to make another texture lookup in order to blend in the adjacent texture. The lookup table is a 256x256 texture where R and G contain the x-y coordinate of a tile in the texture pack. The slope and elevation for a given pixel correspond to the uv coordinates for the lookup table. The trick is going to be to find the adjacent tile and determine by how much to blend them. I am thinking of using the remaining B and A components in the lookup table to encode the index of the next texture tile by elevation or slope, as well as a blend factor. I haven't gone any further with that idea though....

I am not quite sure that the texture packs are the final solution and I am still supporting the previous color map based method, although I haven't improved much upon it. In any case, with the editor it is simple enough to choose one method or the other.

There are downloads available at the Geist3D website that demo these improvement. I get pretty good performance on a GeForce 8800 GT. Even at the planet surface the fps stays above 40. I don't know how well you are going to do with an ATI card though.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

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