Using the Egg classes for dynamic geometry

Hello! I’ve been looking into how to create meshes dynamically in Panda3D, and I came across this post that discusses using some Egg-related classes… but there isn’t quite enough information there for me to understand how I’m meant to feed all my data into them. Are there any good guides (or even summaries) on how to use the Egg classes for dynamic meshes? (Alternately, are there any other convenient ways to automatically generate vertex normals?)

Thanks!

why not take a look at my obj2egg code
discourse.panda3d.org/viewtopic.php?t=3378

Instead of reading the obj just add your code in.

You will find egg.recomputeVertexNormals(float(a)) in the code where a is the degree of smoothing.

Awesome, thanks, it worked! :slight_smile: Great example.

Though, I guess if I were to make something whose geometry changes dynamically every frame, the egg library would be a poor way to do it? (Especially since GeomVertexData specifically has the option to specify Geom.UHDynamic…)

You would need to use the Geomxx interface, yes. It’s very well documented in the manual. (Section P)