Dynamic Geometry, modify every frame

To modify geometry every frame, it seems tricky with EggData - I can modify, but then have to save to disc and reload, which probably will be pretty slow.

For dynamic geometry, do we have to use the Geom API? Are there existing examples/documentation for GeomTriangles, GeomPoint, LineSegs?

Thanks in advance

You can use EggData without writing to disk, but you’re right in any case that it’s not very efficient. The Geom APIs are designed for real-time manipulation.

The manual covers this topic extensively:

There are also the “procedural cube” and “fractal plants” sample programs in the sample distribution.

Recently I’ve been experimenting with this as a newer user, happy to share what I’ve learned.

I’ve tried out loading a pre-saved model and modifying the vertices live via compute shaders and SSBOs, and that works very smoothly. I’ve also tried vertex pulling to do procedural animation in vertex shaders, and I can say that it’s definitely possible in Panda3d!

You’re welcome to take any inspiration you like from the things I’ve been trying in this repo; GitHub - gossfunkel/microworld: 1v1 squishy minigame

I have been testing out some issues on the shaderpipeline dev build, so I can’t say any of that is guaranteed to run on your system, but the outlines of an implementation for each is there, if it helps:)

1 Like

Great, thanks both

1 Like