I am using the LODNode to switch between different geoms in my Actor, but the problem I am running into is that the Actor stops updating its animation when the high LOD is not visible, and even then it looks like it is animating at about 5 frames per second. I found if I attach a regular model onto a control joint then the Actor updates properly, though this is a poor workaround since it unnecessarily increases the number of geoms rendered.
Here is a paraphrasing of my code:
self.model = Actor() self.model.loadModel('/path/to/model') self.model.loadAnims(anims_dict) lod_high_geo = self.model.find('**/') lod_med_geo = self.model.find('**/lod_med') lod_low_geo = self.model.find('**/lod_low') lod = LODNode('LOD') lod_np = NodePath(lod) lod.addSwitch(25.0, 0.0) lod_high_geo.reparentTo(lod_np) lod.addSwitch(50.0, 25.0) lod_med_geo.reparentTo(lod_np) lod.addSwitch(1000000.0, 50.0) lod_low_geo.reparentTo(lod_np) lod_np.reparentTo(self.model) self.model.reparentTo(render) joint = model.exposeJoint(None, 'modelRoot', 'r_hand') cube = loader.loadModel('cube') cube.setScale(0.000001) cube.reparentTo(joint)
My guess is that an optimization somewhere is saying hey you reparented all of the geoms out of the Actor, so it doesn’t need to be updated anymore. How can I get the Actor to update properly in a more friendly manner?
I am aware of the LOD functions of Actor but would prefer to use the much simpler LODNode interface.