Hi,
I’ve been fiddling around with P3D for a bit, and when generating “procedural” meshes as described in the fractal tree sample or in this code snipplet I noticed the performance did drop a lot when i loaded high number of vertices in the primitives.
I then printed the .egg file for the corresponding mesh and loaded it the usual way, and performance was way better…
Am I doing something wrong or is this difference in performance actually explainable by some underlying mechanic of the engine?
Could you share more about your specific code? Performance tends to drop proportional to the number of GeomPrimitive (eg. GeomTriangles) objects, which means you should put as many primitives in the same GeomPrimitives object as possible. The .egg loader tends to optimize this automatically.
I did some tests to prove my point, and it seems i was doing something wrong, since loading all the primitives in a GeomTriangle did the trick, and the FPS counter remained steady…
Thanks!