Ayan Ray

Thoughts on Software Engineering

The Best Way to Render Wireframe in Maya

A quick google for render wireframe in Maya will get you some sound results. Unfortunately, I tried them and they didn’t consistently produce the results I needed. So here is the most consistent, and thus in my opinion best way to do wireframe in Maya.

Method 1: “The Best Way” – Mental Ray Contours

Why is it the best?

It does not tessellate your objects. It can be applied to multiple objects without having to do new UV Snapshots. It can render in smooth shaded. It is quick and easy. And it uses the power of mental ray, and can look sweet if you do it right.

Process

  1. Assuming you have something to render, create a new material (can be anything that has a shader group – lambert, blinn, phong, etc.). In this example, I will be creating a lambert.
  2. Call the new material WireFrameMTRL and the shading group WireFrameSG. Who doesn’t like being a little organized 😉 ?
    Note: If you clicked somewhere else and can’t get to the shading group easily, you can just go to the Hypershade and find the tab Shading Groups to find it.
  3. Go to the newly created lambert’s shading group WireFrameSG.
  4. Open the mental ray -> Contours tab.
    Note: If it isn’t there, you need to enable mental ray in your plug-ins Manager. Mental ray is called “Mayatomr.dll” so find it and load it.
  5. Click Enable Contour Rendering.
  6. Set the color to something you’d like. I like white.
  7. Set the width to something like 0.2 – 1.0. This setting is the absolute width of the wire frame lines. You can comeback and play with this later.
  8. Apply the material to the object.
  9. Open Render Settings
  10. Select render using Mental Ray (if it’s not there, go see the note for #4).
  11. Find the Contours Tab (it is under the features tab in 2009)
  12. Select Enable Contour Rendering
  13. Open the Draw By Property Difference Tab
  14. Select Around All Poly Faces
  15. Render!

And that is the easiest and most consistent way to get wireframe without the flaws of the other methods.

Here’s a shot of the result from one of my recent projects (with render settings fine tuned):

Rendering Wireframe with Mental Ray

The Worse Ways

For full disclosure, here are some other not so good ways to render wireframe.

Method 2: UV Snapshot

I don’t feel like doing the process for this one. It is somewhat of a pain to explain without pictures and frankly I don’t want to take them since it isn’t a method I’d advise. So here is a pretty decent video that does: http://www.youtube.com/watch?v=ZUFAtkVJdpg&NR=1

Method 3: Maya Vector

Rendering in Maya Vector is fairly painless to test. Unfortunately, Maya needs to tessellate all quads whose vertices do not fall on the same plane.  There is a way to find these planes if you have a few but in my case, almost all my quads are non-planar so there was no point trying to fix them.  So here we go on the process:

Process

  1. Assuming you have objects to render, open up your render settings dialog.
  2. Render using Maya Vector.
  3. Go to the Maya Vector settings.
  4. You can select Fill objects if you’d like. It will fill the object with a color you can select through the settings or leave it fill-less. For the example below, I unchecked fill objects.
  5. Un-check show back faces.
  6. Select Include Edges in the Edge Options Tab
  7. Choose an edge weight. I chose 0.5 for the example below.
  8. Choose Entire Mesh for Edge Style.
    Note: Outlines gives you a pretty cool effect. So try that too 🙂
  9. Render!

Wireframe render using Maya Vector. Oh boy look at the tessellation.

Method 4: Hardware Buffer

Hardware buffer is another painless way to render out in wire frame. Unfortunately, it doesn’t look nearly as cool as the previous two images. Anyways, here’s the process:

Process

  1. Open up the Hardware Rendering Buffer from Window > Rendering Editors.
  2. In the Hardware Rendering Buffer, open Render > Attributes.
  3. In the Attribute Editor, change the Rendering Mode > Draw Style to Wireframe.
  4. Render!

This one looked terrible so I didn’t capture an image of it. I couldn’t figure out how to do back-face culling so this quickly became the worst of the techniques.

Method 5: Toon Shader

The second best method to render wireframes in maya is to use the toon shader. I personally like the mental ray method better for the control and power of mental ray but this one seems just as good for simplicity’s sake.

http://www.artbycrunk.com/blog/2008/09/rendering-wireframe-using-toonshader/

« »

© 2017 Ayan Ray. Theme by Anders Norén.