Infinite Procedural Terrain Engine

I already managed to copy out the water for my use, and I took your skybox too. When I’m done with finals with week, I’ll probably dig into your code again. Then I’ll look into your terrain shader and textures as they are much nicer than mine. Hopefully I can get my high performance system to look like your good looking one, then we all win :slight_smile:. Thanks for your work, and for freely sharing it!

I can merge several layers of perlin noise for a 515*512 texture in well under 0.01 seconds on the GPU, and thats were part of my performance comes from.

To make it run smoother, you can do one thing I did: I allow a few full speed frames to run between generating parts of the tiles. As full speed frames take drastically less time than ones bogged down generating terrain, you can have far higher frame rates with only a little slowdown in generation time. My app runs at about 30 fps while generating terrain (most of the load is making the GeoMipTerrain I think) before going to its regular idle 118 fps.

Just to give you a bit of insight into my plans, I intend to use my shader generator to inject rendering effects (like your nice terrain shader) into renderer specific templates (that handle placing the vertexes, computing slopes and such). Then it should be easy to swap both renderers, and terrain shading effects (perhaps in realtime). Its all about interchangeable parts.

I’ve done quite a bit of python optimization, so if you have questions, feel free to ask. Main issue in that case was python’s large dynamic dispatch overhead. Each variable access and “.” involves a dictionary lookup! Also, calls into panda are slow due to issues at the language barrier. (Not too slow, but a lot slower python-python calls). Cython can get around both those issues: http://www.panda3d.org/blog/?p=173

Edit: have some pictures: http://craig.p3dp.com/MiscPics/infinate/
This is starting to look ok, but it needs your better textures.