Want a free year on Tuts+ (worth $180)? Start an InMotion Hosting plan for $3.49/mo.
This Quick Tip will help you utilize the LOD (level of detail) group feature in Maya. Which Allows you to view the LOD's of your game model directly inside Maya's viewport based on the view distance, just as you would in your game engine. This feature can be a huge time saver by allowing you to check for artifacts or other errors directly inside Maya, rather then exporting everything out to an engine for review.
First we need to have three LOD files of one asset based on their polycounts obviously. In this case we're using only the body as our asset (the head is only a placeholder.) So the first thing we need is our three LODs properly named in the Outliner.
So here are our all three of our LODs along with their tricounts.
Now select all three LODs (first LOD1 then LOD2 and lastly LOD3), then go to Edit>Level of Detail>Group.
And it will create a new "lodGroup1" in the Outliner. If you want, you can rename that also, if you're working on a big scene.
Now when you select this "lodGroup1" and check your Attribute Editor you'll see a number of attributes, but only a few of them are important (as highlighted below.)
Now these two Threshold attributes: "Threshold" is the distance at which LOD1 will switch the visibility to LOD2, and "Threshold" is the distance at which LOD2 will switch the visibility to LOD3. So we've set these values respectively to 90 and 200. This distance will vary based on the camera distance from the asset. In simple language, it will depend on the Zoom level of the viewport and the actual value you'll get to know in the "Distance" attribute. The "Active Level" will show the active LOD no. [0,1 or 2] respectively.
Now it's time to check our LOD group. One thing to keep in mind is that LOD groups won't work on "High Quality" mode, so make sure to turn this off before testing. Now when you're close enough of the asset, you'll only see LOD1 in the viewport (the rest of the LODs are inactive at this point.) You can check this in the Outliner also and see that only LOD1 is visible.
Now just zoom out a bit in the viewport, and you'll notice that LOD1 will disappear and LOD2 will appear automatically based on distance from camera.
Now when Zoomed out to the max distance, only LOD3 will appear on screen, the rest will disappear. So this is how the whole LOD group thing works.
Now there are three more attributes below the Distance Attribute, i.e "Distance Level, , " that are by default set to "uselod". That means the LODs will be displayed based on the camera distance only, but we can switch the visibility to "show" and "hide" to override the distance visibility.
For Instance, when "Distance Level " is set to "hide", the LOD3 is not visible at all. Even when we zoom out to the max, because it was overriden to "hide" only.
So here is our final output. I hope this will help you view your LOD visibility in the Maya viewport, rather than exporting and checking it in engine only.