Merge Loaded Models

Hi! I’m attempting to have my game load and create geometry on a separate thread. Unfortunately, CardMaker and creating the geometry by hand is a no go, as it infinitely stalls out. Since my game is voxel-based, I was wondering if it was possible to load two models and merge them, say, into one Geom. I ask because I having a unique note representing every single block ingame slows everything way down. This would essentially achieve the same effect with a lot less headache.

(Unless someone knows a thread-safe way to quickly create geometry at runtime, that’d be swell)

Thanks in advance!

That should do the job.
https://www.panda3d.org/manual/?title=The_Rigid_Body_Combiner

You should use flattenStrong() if you do not need to manipulate the individual pieces of geometry after the operation. This will, if the render state allows it, combine all geometry into a single Geom. (The RigidBodyCombiner is a fancy mechanism that calls flattenStrong() continuously for objects that are still able to move individually).

The speed of replies in this forum never ceases to astound me. Thank you for these answers, Serega and rdb. This was exactly what I was looking for!