The Best Way to Render Wireframe in Maya
- January 25th, 2010
- Posted in 3D
- Write comment
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
- 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.
- 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.- Go to the newly created lambert’s shading group WireFrameSG.
- 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.- Click Enable Contour Rendering.
- Set the color to something you’d like. I like white.
- 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.
- Apply the material to the object.
- Open Render Settings
- Select render using Mental Ray (if it’s not there, go see the note for #4).
- Find the Contours Tab (it is under the features tab in 2009)
- Select Enable Contour Rendering
- Open the Draw By Property Difference Tab
- Select Around All Poly Faces
- 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):
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
- Assuming you have objects to render, open up your render settings dialog.
- Render using Maya Vector.
- Go to the Maya Vector settings.
- 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.
- Un-check show back faces.
- Select Include Edges in the Edge Options Tab
- Choose an edge weight. I chose 0.5 for the example below.
- Choose Entire Mesh for Edge Style.
Note: Outlines gives you a pretty cool effect. So try that too![]()
- Render!
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
- Open up the Hardware Rendering Buffer from Window > Rendering Editors.
- In the Hardware Rendering Buffer, open Render > Attributes.
- In the Attribute Editor, change the Rendering Mode > Draw Style to Wireframe.
- 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/
No related posts.






nice.. hmm.. the countour shader method is for a higher skill level.. when i made the toonshader tuts it was to focus on simplicity
.. it also renders faster that the countours version… end of the day they both work
I wouldn’t consider the contour shader method much more difficult. Maya makes it very easy to render and anyone should be able to follow simple directions (and if not, they shouldn’t be using Maya). I did have an issue with the toon shader when I tried it (changing slight settings in render style, if I remember correctly) and unfortunately I didn’t blog about it
and now I’m too lazy to try again. Bottom line, like you said, they both work. Just note to others, you don’t need to try the other methods
. I originally tried that UV snapshot method and was disappointed … lost time and had to look for another method.
Hi Ayan,
Awesome tutorial! I tried the contour method but I am only seeing the texture border edges rendering, not the whole wireframe. Any suggestions?
Casey
Hi Ayan,
I thought it was the texture border edges, but after removing the clothing to see what it did to the whole body, turns out it was just rendering the edges that weren’t obscured by any other geometry (ie. the shirt) so in actuality it rendered a white border all the way around my geometry. I don’t know it’s weird. I’m playing with it but if you have any ideas then I’d appreciate them. Thanks.
Casey
Hey Casey,
Can you post up a link to an image of the problem? Did you double check all the settings? Did you apply the material to all objects you want to be viewed in wire frame?
Hi Ayan,
Here is a screencap of my render settings, SG contour settings, and the actual render of the cartoony character. It just puts a white outline around the character even though I have it to outline all poly faces. Thanks for your help on this
http://yfrog.com/jnwireexamplej
Casey
Eyaah! From the looks of it, it should work. Try reseting your mental ray settings to default and follow the steps again. I can’t put my finger on what exactly is the problem. It could be a hardware issue on your end, or it could be another setting that offsets this one. Or it could be a duplicate mesh (lol yes unlikely)… You can also try importing the character into a new file and try the steps again. If all of that fails, send me the file and I’ll see what’s the problem.
Sweet! A former instructor/friend of mine figured out the problem. This won’t work if you have a subdivision approximation on your character, or if you are using the “3″ key on the keyboard to create a smooth proxy. I was doing both. Took off the approximation, hit “1″ on the keyboard and it worked! Solid! Hope this helps for anyone else having this issue, and thanks Ayan again for the tutorial and your help in this matter
Great to hear it’s fixed. And thanks for posting up the solution!
hey,
I’m just wondering how to achieve the same look within mental ray that you get with the vector renderer and “hidden edges” activated?! I’m mean that you can see the back-face-culling faces . . .
plz help
br matt
I was hoping the culling option controlled the contours but it didn’t work
. For your case, it seems much easier to use the vector renderer. For mental ray, if you wanted to use it, I would recommend using render layers and selecting the faces and do it yourself. This obviously would be impossible to manage if you are animation though
. A long shot would be a custom contour shader but I’m too newb for that >.<. Good luck with whatever you do! You could overlay your vector in premiere after as another option.
Is it possible to render wireframe using the contour shader on a model with the model in subdivided (3 on the keyboard) or something similar, but only render the simple mesh (smoothed simple wireframe)
I want to be able to render a wireframe that demonstrates my topology but as the model was created to be subdivided, it looks terrible in unsmoothed mode.
M
Maya 2009+ render the smooth mesh preview in mental ray. If you have an older version than that, you will need to smooth it. What is preventing you from just smoothing it and rendering it as a fail-safe?
Hi Ayan, nice techniques, good job on the explanation. Simple. I bumped into your blog looking for techniques to render only vertex from a modeled mesh. Do you know by any chance a technique or know if its possible?
Any idea would be very appreciated.
Thanks
A quick solution to rendering vectors using maya 2011
“display menu” turn on heads up display “poly count”
Select your object and make a mental note of exactly how many verts …. I dont like waste
“Ndynamics menu” – “Nparticles” – “Create Nparticles tool (options)”
In the tool setting set the number of particles to the amount of verts you memorised
Create the partcles in the scene and select them then shift select your object and go to “nParticles menu” – “goal”
Hit play and let the particles settle on each vertice and stop the playback….go to the “nSolver” menu while the particles are selected then “initial state” – “set from current” (this simply states that the particles will stay where they are for the beginning of the animation) , rewind the time line to frame 0 and they wont move.
Hide your original object and voila job done…now its entirely up to you to decide how you want to render the particles as clouds, single points etc.
Cheers !
Hi,
I’m trying to follow the mental ray contour wireframe method.. I believe I’ve followed the instructions to the t, however the contours are not rendering.
I’m using a model I imported from Zbrush, simple exposure maya lenses on my camera, and final gather.
What version of Maya are you using? I haven’t used a lens before but I could take a look at it if you are sill having problems with it. What is rendering btw?
Thanks for the very easy to setup contour tutorial. It was just what need to complete a retro-80 model. This was way faster then trying to setup a toonshader with contour.
No problem man, that’s why I have this blog: knowledge transfer