Rendering a contour image in mental ray for Maya has been a nice way to show wireframes on an object. In Maya 2016 the usual method has become somewhat hidden, so I thought I would post a brief update on how to do that.
1) Create a black surface shader and apply it to your geometry
2) In the hypershade, access the shading group (e.g. surfaceShader1SG) and open the mental ray tab in the Attribute Editor (or Hypershade property editor!)
3) Under Contours, check Enable Contour Rendering and adjust the other options as you like
4) In the render settings, make sure mental ray is selected, and go to the Configuration tab
5) Check "Show Advanced Settings" and find the Contours section at the bottom
6) Check "Enable Contour Rendering" and increase the Over-Sample to something like 3
7) Under the "Draw By Property Difference" section, check "Around all poly faces"
Not quite done... you might see a Warning: Contour Rendering is not supported with Unified sampling
8) Go to the Quality tab and check "Show Advanced Settings"
9) Expand the Legacy Options section at the bottom and choose Sampling Mode: Legacy Sampling Mode
Hit render! *phew*
Note that if you are rendering beauty passes or other things, you probably want to use the original Unified Sampling and just create layer overrides for the contour settings. Also make sure that you have unchecked both "Around all poly faces" and "Enable Contour Rendering" for these non-contour passes/layers/renders, because I have had the filter settings be set to Box (1, 1) in the background without my knowledge due to "incompatibility with contour rendering". Just something to be cautious about; not sure if they may have fixed that in this version.
Thanks for reading,
Stuart
Thank you so much! It helps me a lot! Cheers :)
ReplyDeleteThanks dude!
ReplyDeleteI follow these steps, and if I have a cube with 4 faces on each side, it renders out showing way more faces near 40 on each side. Keep in mind, I have clicked "3" to smooth it. If I click "1" for un-smooth it works fine.
ReplyDeleteMental ray automatically renders the smooth mesh faces, unless you tell it not to.
DeleteThis comment has been removed by the author.
ReplyDeleteThank you! This was very very helpful!
ReplyDeleteThank a lot.
ReplyDeleteYou are a god! Thank you soooooo much! Very very helpful!
ReplyDeleteUnder the Quality tab > Sampling, You can change the mode to Custom Sampling and then increase the min and max values to help make the outlines less jagged.
ReplyDeletebut what if your doing a batch render it only renders the 1st frame as wireframe
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteWhat if the attribute editor doesn't have a mentalray option in hypershade, nor a contour option in the mentalray dropdown in the normal window attribute editor?
ReplyDeleteiam also facing the same problem. iam using 2017. iam not able to see the contours in "surface shader" attribute editor in the mental ray tab.
Delete