Niosop Posted December 12, 2009 Share Posted December 12, 2009 How do you get the LOD that's currently in use for a model? Specifically I'd like to do it in Lua. GetModelDetail doesn't do it (it returns the LOD base level in use). I suppose I could calculate the distance and go from there but I'd rather use a built in function if there is one. Quote Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX ZBrush - Blender Link to comment Share on other sites More sharing options...
Niosop Posted December 12, 2009 Author Share Posted December 12, 2009 Hmm, I'm really confused by the LOD system right now. I have a model w/ two LOD levels (base and LOD1). In the Spawn function I Notify(model:CountChildren()). This displays 2, both Mesh objects. During the update cycle I display model:CountChildren() in the entity's Update function. If the camera starts in range of the model to display the base LOD, then CountChildren() switches to 1. If the camera starts far enough away that LOD1 is displayed CountChildren gives 2 until you move close enough that the model switches to the base model, then will remain at 1 regardless of how far away you move. The actually LOD model switching works fine, it's just the CountChildren function that is confusing me. Anyone have any ideas of what it's doing? Quote Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX ZBrush - Blender Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.