How does LODNode work?

Im just wondering how does LODNode work internally? Does it use a task with np.getDistance(camera)? Or are there more efficient ways?

What about Actors (Characters)? Is there a way to use LODing on them?

LODNode is triggered by low-level C++ code during the cull traversal, but the math is fundamentally the same as a task with np.getDistance(camera). The fact that it is handled at the low level, though, means that (a) you don’t have to make this distance check if it’s not within the view frustum, and (b) if you have multiple cameras viewing the same scene, a given LODNode could show a different model to each camera based on each camera’s distance.

The Actor code contains support for multiple LOD’s. Call loadModel() repeatedly for each model, specifying an appropriate lodName for each one (or pass a dictionary of lodName -> model filename to the Actor constructor). Then call actor.setLOD() for each model to specify the switch distances.


But will loadModel preserve the skeleton?

BTW, does egg support FadeLODNode? Ive seen Chicken example for LODNode only

Actor.loadModel() preserves the skeleton. This is the normal way you load an Actor: either create an Actor first and then call actor.loadModel() on the egg file, or pass the egg file to the Actor constructor. Either way still works the same with LOD models, except then you need to pass a dictionary of models (instead of a single model) to the Actor constructor if you use that approach.

The egg syntax does not support FadeLODNode, only LODNode.


I guess I could just use tags then.