Sponsored By

2D Art: Quick Manual for rendering line art in Maya

This article is about how to render 2D line art out of 3D models with Mental Ray Maya.

Junxue Li, Blogger

September 2, 2013

2 Min Read

 

 
  Today, 2D game art  production employs lots of 3D procedure. For example, 3D model aided 2D design, and 3D render plus 2D overpainting.

   Now I give you a tip, which is useful in the design process: how to render 2D line art out of 3D models. Which is especially helpful for complicated objects or scenes, for example vintage furniture, regal interiors.

  Let’s start with a simple example. We have this cabinet model, let’s see how to render its line art with Mental ray in Maya.




1. Create a lambert shader, here is lambert2. Go to its shading group node, open the tag mental ray/contours.

 
  Check the box Enable Contour Rendering. Here the Color is the color of the lines, you may want to change it to black. Width is the width of the lines. Please note it is not measured in pixels.

  2. Go to the Render Settings editor, open this tag Features/Contours. Check the box Enable Contour Rendering. In a common sense, line art is black lines on white paper. So check Hide Source then change Flood Color to white. Give a higher number for Over-Sample, for example 12, to produce clear cut lines. And at the bottom section, link 2 contour shaders, which names are as indicated below.

 

These two shaders, find them in the Mental Ray contour shader groups.
 

  3. If you have linked the right shaders, you should find these two node in Hypershader, the Utilities tag. As below: Click the  contour_contrast_function_levels shader(the one with the circle icon), open its attributes.    
Check the boxes: Diff Label, Contrast 
 


4. Assign the shader you have just created, lambert2, to the cabinet. If you click render now, it should be the line art. 




5. The lines are generated based on an algorithm which checks the surface of the geometries(Curvature, angles,etc). Some times there are not lines at the places you want them, you may need to tweak 2 parameters in step #3, ZdeltaNdelta. It’s complicated to explain them in mathematical terms, so the best way is to experiment different values by yourself. 

 

Read more about:

Blogs

About the Author(s)

Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like