Hi, I have been playing around Panda3d for a couple of months and I thought I’d share current results from my project. I have been working on ways to simulate water in real time in an open world-type setting. By simulate – I mean the water actually flows from A to B, fills depressions and makes it own path, not the pretty but fixed, hand-placed rivers of Zelda, Skyrim, HZD, etc… You can see it in action here:
NEW Higher quality video of the running Panda3d code that the image came from here:: https://youtu.be/1sY7sk2fUhI
(Earlier lower quality video https://youtu.be/8_RHkOAXA7E )
To stress the simulation engine a bit I made an island rise out of the sea which carries up a million tonnes of water with it which has to flow off. This makes the transient flow features in this image:
I uploaded another video https://youtu.be/NTpyWaVdN2U of a simpler case – hanging a few 100 tonnes of water in place until I let it drop (the simulation is allowed to start) about 4 seconds in. As an aside: I put a Panda3d logo on the movies in the hope it brings more traffic here if anyone watches them.
My project uses C++ code based on shaderterrain and incorporated as a python module into the dev branch of Panda3d using tobspr’s https://github.com/tobspr/P3DModuleBuilder on windows 10 (VS15).
I extended it using glsl tessellation shaders for LOD for the ground and water surfaces and animated sea tiles to the horizon. It still reads in an arbitrary heightmap from a png file.
Water simulation has been a hobby of mine for a few years. I do 3d fluid simulations professionally (for super rarefied gases in galaxies and star systems so water is a fun variation for me). Here I used the shallow water equations (2d) with strong drag and a highly stable solver purely for speed. I can get 200 FPS in HD on my Dell laptop (GTX 980M) with 256^2 terrain for now but I still have some things I hope to add.
As you might guess, there are a lot of visual effects in the shaders. These include 3d texture noise for normals (for specular reflection), foam effects and flow tracers. I saw some comments on the dev blog that shaders are hard and that users need to be insulated from them. I’d like to make the complete opposite plea. Shaders are awesome, give amazing bang for the buck in both programming time to neat effects and the quality of effects you can produce at high FPS. To be honest it was tobspr’s neat RenderPipeline and other shader-heavy showcases that convinced me that Panda wasn’t dead and was worth investing time in. Otherwise I was looking at the rather old game demos and screen shots and wondering if Panda was a good choice or too far behind. I am not an expert in Python or shaders but a few weeks of playing convinced me really quickly that shaders are the way forward. I think Python and shaders are a killer combination and the goal should be to expose as much of the raw vertex and image data in Panda3d for easy use by shaders as possible.
I intend to play around with other things like shadows, reflections, actual variation in ground types and trees in the same code framework as I get time.