MTOR
L e v e l    o f    D e t a i l


return to main index


links
cutter pre-baked ribs
maya pre-baked ribs



i n t r o d u c t i o n
The Pixar documentation describing the use of level-of-detail (LOD) is located at,

Using Level of Detail (mtor)
Pixar/docs-X.X/rendering/feature-guide/level-of-detail.html
			
Using Level of Detail (rib info)
Pixar/docs-6.0/prman_technical_rendering/AppNotes/appnote.21.html

This tutorial describes how to apply LOD using a RIBBox that references three pre-baked ribs attached to proxy objects, which in this instance are a number of poly cubes - figure 1.

Three models of a seed of the Gumball tree (Liquidambar styraciflua), each with a different polygon count, were archived as pre-baked RIB's. These were used as replacements for the proxy objects. Initially, the gumball models were colored coded so that they could be more easily identified. Figure 2 confirms the renderer applied LOD to determine which model to use as the proxy objects diminished in size.

I am grateful to Visen Brnicevic who prepared the gumball pre-baked ribs.

50cubes

figure 1


50cubes

figure 2



s t e p    1
50 polyCubes were made using a MEL script entered into Maya's Script Editor window - figure 3. After selecting the text the MEL script was executed by pressing the enter key on the numeric keypad.



MEL to create 50 cubes

select -replace "pCube*";
delete;

for($i = 0; $i < 50; $i++)
    {
    polyCube;
    move 0 0 (-2.5 * $i);
    }
select -all;


s t e p    2
Next a RIBBox was added to a Slim palette - figure 4. The following text was added to the RIBBox.


RIBBox text

AttributeBegin
   Detail \[-0.5 0.5 -0.5 0.5 -0.5 0.5\]

    Color 0 1 0
    DetailRange \[ 1 1  500 2000 \]
    ReadArchive "YOUR_PATH/gumball_lowres.rib"
    
    Color 1 0 0
    DetailRange \[500 2000 5000 15000\]
    ReadArchive "YOUR_PATH/gumball_hires.rib"
    
    Color 0 0 1
    DetailRange \[5000 15000 4000000 4000000\]
    ReadArchive "YOUR_PATH/gumball_hires.rib"
AttributeEnd
   
Opacity 0 0 0

Use the Edit button to open a text window - figure 5.

Because the text in a RIBBox is first pre-processed by a scripting language called TCL you must put a back-slash immediately before open and close square brackets.

It is very important always to close the text window after editing the RIB statements.


script_cubes

figure 3



create_ribbox

figure 4



ribbox

figure 5



s t e p    3
Next select the polyCubes and attach the RIBBox to them - figure 6. Add a shader, say plastic, to the palette and attach it to all the cubes. Be sure to choose,

Import Appearance->Surface->Plastic

from the Slim palettes File menu item. Because we are using an Opacity value of 0 0 0 to hide the proxy objects do not choose Create Appearance. By default a "created" plastic will not respond to the Opacity values specified in the RIBBox.

Another way of hiding the proxy objects is to apply MTOR Invisibility to them - figure 7. Using this technique the Opacity statement in the RIBBox can be removed.



attach_ribbox

figure 6



mtor_invis

figure 7





© 2002-5 Malcolm Kesson. All rights reserved.