L e v e l - o f - D e t a i l
The animations on this page demonstrate the support offered by RenderMan for level-of-detail (LOD). Three models of a gumball seed were made in Maya. Using LOD the renderer chooses the appropriate model to use based on the area of screen space occupied by the model. |
| A quick venture into Mental Ray Rendering...
In order to achieve the desired effect in Maya using the Mental Ray rendering system, a shader had to be developed using the Hypershade in Maya. The same concept of ambient occlusion used for a still image in the Lighting section was then developed in Mental Ray, yet a different approach was taken in this instance in order to optimize the speed of the render.
In order to get faster render times with nearly the same result as what a regular ambient occlusion shader would provide - it was decided to create the same render model that the ambient occlusion shader calls for in Renderman - but the render would remain in Maya completely. In order to do this outside of using the default occlusion shading options Mental Ray comes standard with (for the sake of faster render times) - an environment was built replicating that of which the occlusion function (occlusion() ) uses in the Renderman Shading Language (RSL). For a more in-depth and graphical representation of this process - please visit the specialized Mental Ray section (coming soon!) of this portfolio.
For additional relevant information...
Andrew Whitehurst - Depth Map Based Ambient Occlusion Lighting
Graphic Step-by-Step Occlusion in Maya - Using the Final Gather-based Occlusion Shader
|
Level-of-Detail (LOD) Process Documentation
![]() |
![]() |
![]() |
|
High Resolution Model Poly. Count: 14781 |
Medium
Resolution Model Poly. Count: 3477 |
Low
Resolution Model Poly. Count: 293 |
|
Phase 1 |
![]() (Fig. 1) |
![]() (Fig. 2) |
![]() (Fig. 1a) |
![]() (Fig 2a) |
| Level-of-Detail (LOD) Test Renders As it can be clearly seen, the results are nowhere near the clean shading and the better overall visuals of the Mental Ray renders, nor should they be at this stage - as the goal was to establish that the level-of-detail method was indeed working. In Fig. 1, the execution of LOD was very poor - as the low resolution model clearly does not live up to its potential amount of space before becoming too visible to execute the illusion of it being the same object as the rest. The amount of resolution model proportions are displayed graphically in Fig. 1a. In the next attempt (Fig. 2); a better result yields itself through adjusting the physical scale of the low resolution model (it was too small to begin with), as well as adjusting the amount of space on-screen the model needs to occupy before changing over the the medium resolution model. The medium resolution model was also adjusted to change to the high resolution slower, in order to slightly exaggerate the color shift. These changes in turn had a direct effect on the proportions in the given screen space as well - as displayed in Fig 2a. Note: The stems of the gumballs were removed for each model for the sake of placing focus on the main body of the gumball.
Below is the simple MEL script used in Maya to duplicate the cubes which were eventually replaced by the gumball geometry through Renderman's RIBBox.
for($i=0; $i<50; $i++ )
//sets loop to cycle creation operation 50 times. { polyCube; //creates polyCube xform -translation 0 0 (-2.1*$i);
//translates each new cube -2.1 on the Z axis };
|
|
Phase 2
| Animation Test After understanding how LOD works in Renderman, a small animation was attempted through using Slim in combination with Maya. The result was poor in terms of presenting the illusion of a seamless transition from low-medium-high resolution models, as one can clearly see that the low model (colored red) is merely a sphere - which then changes into a more complex geometry. The transition from medium to high resolution models seems to work fine - but that is expected since their overall shape is very similar, even at mid-close range. Doing a test animation proved to be valuable in both the learning process as well as saving time on mistakes in more complex scenes. |
Phase 3
|
Level of Detail color shift example
AttributeBegin Color 1 0 0 AttributeBegin
Scale 1.25 1.25 1.25
AttributeEnd |
Level of Detail without color shift (white)
AttributeBegin #Color 1 0 0 #activate for red AttributeBegin
Scale 1.25 1.25 1.25
AttributeEnd |
| Final Renders using Particle Instancing in Maya With the addition of a few more adjustments in the RIB file containing the LOD information, the final render was output to separate RIB files using Alfred -then using a TCL script (see steps 6-8) provided by Professor Malcolm Kesson, the RIB files were outputted to individual TIFF files. This was very convenient as it provided instant error checking in a command prompt, which consequently pops up after the batch render is executed through the TCL script. The overall result of the final rendered animation is far better than the test animation, as the additional adjustments afterwards prove their worth - the illusion is now far stronger and the color shift is far cleaner. The example provided without the color also shows that the adjustments helped in terms of hiding loss of detail right up until it is necessary to show it - which was the focus of the exercise from the beginning. |
Phase 4 (Extra)
![]() |
![]() |
Particle Movement Variation using Fields and Fluid Effects Just for fun, a particle emitter in Maya was affected by multiple fields to yield different results. In this case, turbulence, vortex, air, and gravity fields were used in combination with one another to give the particles a drifting upwards movement, with a slight amount of collective rotation (Fig. 3).. Fields can play an important role in animation, allowing for an animator to leave behind the tedious task of key-framing frame by frame to simulate natural movement - and to simply let the fields do all of the animation work.
In the second example, the instanced particles are being pushed and shaped without any fields or key-framed animation, but instead with fluid forces that exist inside of a 3D fluids container (Fig. 4). Fluid containers (both 2D and 3D) have their own internal mathematic systems and solvers which allow for different animation effects without needing fields to motivate natural behavior.
Side Note: If you would like to know more about Fluid Effects - the subject was my personal focus in the Spring quarter of 2005 and I should be able to provide you with the starting blocks needed towards understanding how the Fluid Effects system works in Maya.
While these examples have little to do with the actual task of LOD, it is important to explore all options in terms of exploiting the effectiveness of LOD using differing animations and camera angles.
| |