Testing LODs: The Level of Detail Group


Knowing how the levels of detail will look in the game can be guesswork at times. It usually involves your actually seeing the character in the gamebut Maya has a way around this requirement. Maya allows you to view the models interactively using a Level of Detail Group. The programmers on your team can then use the data in this group to help them set up the in-game LODs.

Much like a normal group, what the LOD Group does is group all the different resolutions together. Then you can designate at what distance each model should be viewed.

Let's apply this technique to our characters, Kila first.

1.

Load in the file called Kila_LOD_Prep.mb. Make all the LODs visible in the Layer Editor.

2.

In the Outliner, select the highest LOD group first (Kila4096). Then, holding Ctrl, select the lower ones in order.

3.

Go to Edit > Level Of Detail > Group. Each version of your character will now be placed into a new group called lodGroup1. This group will now control each LOD's visibility.

4.

Try dollying the camera in and out of the screen; the character will change depending on its distance from the camera. The problem at the moment is that the distances are not set up correctly.

5.

If it's not currently selected, select the lodGroup1 group and look in the Channel Box (Figure 10.58).

Figure 10.58. The Level of Detail Group options in the Channel Box


In the Channel Box, you'll see that we have some new attributes in addition to the usual translate, rotate, scale, and visibility attributes.

  • Active Level tells you which LOD is currently being viewed.

  • Threshold[0][3] are the distances at which the LODs change.

  • Distance is the character's current distance from the camera.

  • Display Level[0][4] hold various display options for each individual LOD.

6.

We will use the Distance attribute to help us fill in the Threshold attributes correctly. Dolly out to the distance where the LOD will first change to level 2, using Figure 10.13 as reference. When you're there, copy the value from the Distance attribute into the Threshold[0] attribute. It should be 5, or about that.

7.

Do the same for the rest of the LODs, updating the associated Threshold attribute for each level. The values should be approximately 15 for Threshold[1], 43 for Threshold[2], and 123 for Threshold[3].

Now, as you move in and out from your character, the LODs will change according to the distances you have set.

8.

Rename lodGroup1 to KilaLOD, and save the scene as Kila_LOD_Active.mb to show that the LODs are all set up accordingly.

Now you can follow these same steps on the Grae model; for him, set the LOD thresholds to 35, 90, 170, 330, and 700.



    Game Character Development with Maya
    Game Character Development with Maya
    ISBN: 073571438X
    EAN: 2147483647
    Year: 2004
    Pages: 169
    Authors: Antony Ward

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net