Diffuse Texture Applied to Planet and Performance Issues

diffuse textured planet

I finally modified the quadtree planet test program to use textures that are generated on the GPU for each mesh. It’s a lot more intensive then I had hoped – each mesh uses its own height map, slope map, texture map etc. Basically I took the simplest approach and ran with it and the results showed that texturing is possible, but the performance is now a major issue. On OSX I was getting 300+ FPS near the surface and more when out in space, but in Windows Vista I’ve been getting 90 FPS in space and as bad as 4FPS at the surface. Not to mention the time it takes to update the meshes with the added strain of the texture generation is way too slow.

diffuse textured planet
This screenshot near the surface shows the poor FPS and also how at the surface the textures are too blurred. I can increase them but performance is bad at the surface already.

I haven’t started debugging the performance bottle necks because I just wanted to get it working first, but now I think I’ve arrived at a point where the performance is so bad that I can’t continue without fixing it.

One thing I ran into that is Ogre related is that it is a bad idea to call manualRender() from within the _updateRenderQueue() function (possible recursion issues?) So I took all the mesh building functionality that had to happen in the main thread and moved them out of the _udpateRenderQueue() function and into the application update() function.

The only obvious remaining graphical bug I have yet to figure out is the yellow/black striped textures I’m getting when pulling away from the planet when cached meshes are being drawn (I’m probably releasing a texture and not re-creating it).

texture bug

*sigh* I miss having a good looking planet so bad. Can’t wait to get it pretty again.