You are on page 1of 3

Tips & Tricks  Mental Ray: Geometry Shader    Date: 19th Mar 2009 

 
One of the most time consumig aspects of a Computer Graphics pipeline is lighting and rendering. We 
often have very huge scenes and geometry that can run into thousands and lakhs of polygons. This of 
course then takes a fair bit of time to render and evaluate. 
  

  
Even a simple scene file like this, which is just a sphere with extrusions… 
 

  

  P a g e  | 1 
Tips & Tricks  Mental Ray: Geometry Shader    Date: 19th Mar 2009 
  
…took 42 seconds to render. But if we have to do various changes to the lights and evaluate the same, 
this will then take a fair bit of time. Very often making us wonder if we can just replace the geometry 
with some simple objects, make requisite changes in lighting and then, re‐put the final high res 
Geometry. 
  
Go to the transform node in the Attribute editor, 
  

  
Enable the Geometry shader 

  
Select which Mental Ray geometry shape matches closely to the scene geometry. 
 

  

  P a g e  | 2 
Tips & Tricks  Mental Ray: Geometry Shader    Date: 19th Mar 2009 
  

  
The scene geometry gets replaced with a simple Mental Ray primitive and renders in a fraction of time. 
  
But the look of the geometry in the viewport remains the same 
  

Prem
Digitally signed by Prem
Moraes
DN: cn=Prem Moraes,
o=Autodesk India Ltd.,

Moraes
ou=M&E, email=prem.
moraes@autodesk.com, c=IN
Date: 2009.03.19 16:37:22
+05'30'

 This is a simple but intutive way of using geometry shaders. Note here that this is not the only usage of 
geometry shaders, the more advanced uses will be discussed in a later topic. 

  P a g e  | 3 

You might also like