Jump to content

How do you get the current LOD for a model?


Niosop
 Share

Recommended Posts

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.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

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?

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...