This is how to Render WIREFRAME in Maya with Mental Ray


#1

I’ll add proper screenshots and proper english later.

This is how to quickly and easily render crisp anti-aliased wireframes in maya using mental ray.

Assign a shader to your polygon object. Any basic shader, doesn’t matter much.

I chose ‘Use Background’

  • specular color: black
  • reflectivity: 0.000
  • reflection limit: 0
  • shadow mask: 0
  • matte opacity mode: solid matte
  • matte opacity: 1

Next, important!, In the attribute editor view the attributes of the Shading Group that your shader belongs to. Not the shader itself! Its SHADING GROUP.
In the AE view of your Shading Group expand the mental ray section.
Then expand the Contours section.

Check ‘Enable Contour Rendering’.

Select your Colour, Alpha, and width you want your wireframe lines to be.
I chose Color:white, Alpha:1, Absolute Width, Width:0.5

Open the render globals window and go to the mental ray tab.
Expand the Contours section.
Expand the Contours->General section.
Check ‘Enable Contour Rendering’.
Expand the Contours->Quality section.
Set Over-sample to 3 (this makes the lines smooth/anti-aliased)
Expand the Contours->Draw Contours section.
Check ‘Around All Poly Faces’

Render.

Anyone need any more clarification?


#2

I just thought I’d point out that the “Around All Poly Faces” feature is new to Maya 8, so this is a Maya 8 specific tutorial.

:wink:


#3

Yes, it might be maya 8 specific, however, one of the options of contour rendering in maya 7 allowed you to render poly faces too, and I assume 6 and 5 could do it, assuming they had contour rendering, however, I dont have a copy of either installed to check


#4

Yes you’re quite right, it’s just that it rendered the actual triangle tesselation which is less desirable. I assume this thread was made so people don’t miss this small addition to Maya 8.

And now for an emoticon: :curious:


#5

I prefer the hardware buffer method


#6

Thanks Dude!

I was dismayed a few days ago when I had to try to get Maya 7 to render the polygon mesh of a few objects I subdivided and converted to polygons at lvl 3… needless to say, triangles just give me a black load of junk, and vector render just couldn’t render 2 million polygons in such a short time. So, perhaps it might be a little better with this new method, I might be able to get my wireframe shot after all… which would… probably… still look like a black hunk of junk.

:stuck_out_tongue:

Terence


#7

Actually for low/mid range video game models having the triangles rendered was a good thing since most engines need the mesh to be triangulated to use it. But yeah, on higher polycount stuff it probably sucked.

…lol actually, I wouldn’t even know. I had never been able to figure out the contour rendering thing until yesterday when I finally got a mental ray training kit from digital-tutors

I once had a dream where there was a mel script that generated a tiny sphere at every vertex and a cylinder for every 2 vertices with the caps snapped to the two, thus creating geometry that follows the flow of the topology. Does such a thing already exist?


#8

Origonally Posted by thinsoldier
I once had a dream where there was a mel script that generated a tiny sphere at every vertex and a cylinder for every 2 vertices with the caps snapped to the two, thus creating geometry that follows the flow of the topology. Does such a thing already exist?

Acually toon shading does something verry simular to this. It can builld pfx strokes or geometry based on the normals with setting the crease angle min and max real low. You can also create a sub-d look to your wireframe renders by saving all the edges of your low res geometry as a quick select set and then hardening the normals of those edge loops of your smoothed version.


#9

try this video

http://www.ddmel.com//index.php?categoryid=19


#10

I utilise another technique.

I extract all the faces of my object, I have a mel that does this automatically for me.

I utilise the Maya Vector rendering mode, and within that, I have the following options set : -

colour schemes can be modified at users own discretion, i.e. base colours, and wireframe edge colours, and here is the resultant renders : -

Notes : -

If you do not extract faces, all you will render is an outline of your object, there is options available for those who do not wish to extract all the faces on an object, under Edge Style, but this will in turn render your ’ triangulated ’ mesh rather than the nicer wireframe version shown above.


#11

Origonally Posted by S. J. Tubbrit
If you do not extract faces, all you will render is an outline of your object, there is options available for those who do not wish to extract all the faces on an object, under Edge Style, but this will in turn render your ’ triangulated ’ mesh rather than the nicer wireframe version shown above.

You dont have to extract faces for maya vector to work. All you have to do is set the normals to all hard and it will do the same thing.


#12

Excellent, even easier now then! :slight_smile:


#13

thinsoldier your tutorial was a pleasure to go through, strait forward and i definatly wouldnt have found that on my own,

in maya 7 i found that checking
around coverage(to get the shell of your mesh and works great with intersecting geometry)
and checking around Coplanar Faces works best.

im not sure what its like for maya 8 or before 7 but those were my best results…

thanks again!


#14

Thin Soldier, you are awesome. i tried 3 different ways to render wireframes and they were all being shitty. this one rules, thanks.


#15

My turn, my turn :bounce:

I found this one recently:

Assign Surface shader to the mesh, feed it with a ramp (type: box), go to UVs:Unitize.

What !?

Oh yes, this one will be messing with ngons :scream:


#16

OR
don’t exctract
make all the edges hard and the VECTOR render will give you the faces as Quads (or whatever edge you made as hard)


#17

nice tut:
http://www.jozvex.com/tutorials/wireframe.html


#18

Me again, demonstrating my technique and Maya’s gif exporter ^^


Reverse node mainly used for mesh transparency, multiply/divide for the glow and facing ratio for color or wire’s thickness shift.


#19

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.