Adverti horiz upsell

Mentalray Render Pass Toolkit 1.0.0 for Maya (maya script)

A Toolkit allow pass rendering with mentalray

License
Button download
2,203 Downloads

Compatibility

  • 2008

Operating Systems

  • Windows

History

Created:08/05/2008
Last Modified:08/05/2008
File Size: 19.3 KB

I. Introduction

Rendering pass with Mentalray for Maya is a problem from version to version. All user just want a ONE CLICK solution, but Alias, and now Autodesk, never think of us as end-user, but more "developer" when giving us pieces of shader, buffer, multi-output, all WHAT THE HELL THING and tell us: Do your job, you guys are prof !

Ya, I wont make complain any more, this has been discussed too much on cgtalk.com also many other CG site. So I decide to make a Tool Kit to allow pass-render for Maya Mentalray with ONE CLICK SETUP.

Currently, this Toolkit will support 2 SHADER and they are PHENOMENON.

1. Mia_material: This is the compo shader for MR allows you to do all task with MR.

2. Misss_fast_skin_maya: This is the sss shader used in many project for character skin, or other SSS effect object

II. Pre-Installation:

$shaderPath = $env + ";" + $mrayInclude;

into

$shaderPath = $mrayInclude + ";" + $env;
  • Open (or create) Maya.env in User_Documentmaya2008 Folder. Edit
MI_CUSTOM_SHADER_PATH = C:shaderlib;C:shaderinclude;
  • Create a folder in C driver with this construction

NOTE: This guide is for newbie or some one never edit their Maya.env, you could go with your custom folder shader of MR in your setting

III. Installation

  • Download this package here, then copy gl_mrRenderTool.MEL to User_Documentmaya2008scripts folder
  • Open userSetup.mel (create one if you dont have) and paste this into content
source gl_mrRenderTool.mel;
  • Copy renderLayerPreset_Occlusion.mel and renderLayerPreset_zdepth.mel to User_Documentmaya2008presets
  • Copy mia_pass_phen.mi and misss_pass_skin_phen.mi into C:shaderinclude folder
  • Copy AEmiaTemplate.mel and AEmisss_fast_skin_passTemplate.mel to User_Documentmaya2008scripts folder
  • Copy render_mia.xpm and render_misss_fast_skin_pass.xpm to User_Documentmaya2008prefsicons to get the icon file
  • Shader Preview and necessary connection when create shader: Find mentalrayCustomNodeClass.mel in Maya_installation_folder/scripts and under
if ($nodeType == "mia_material" ||
$nodeType == "mia_material_x")
return "rendernode/mentalray/material:connection/mentalray/shadow:

/connection/mentalray/photon:shader/surface:swatch/mentalRaySwatchGen";

enter

if ($nodeType == "mia")
return "rendernode/mentalray/material:/connection/mentalray/photon:shader/surface:swatch/mentalRaySwatchGen";

if ($nodeType == "misss_fast_skin_pass")
return "rendernode/mentalray/material:shader/surface:swatch/mentalRaySwatchGen";

IV. Usage of Tool

  • Start a new scene, SWITCH TO MENTALRAY RENDER, enter mrRenderTool; to run the tool, or create button for it to easy access later

  • Press Setup Pass Nodes and you will create all neccessary thing for your file. Now just use my Phenomenon and you will get pass automatically. Delete Pass Nodes will delete these Nodes if you dont like to output pass.
  • Select Buffer Write will give you access to buffer Write. With this tool the ONLY thing you should CARE is format output of your pass. Default setting is JPG, but I advice to change to EXR in production so you could get 32 Bit Floating.for compostiting.
  • 5 button below: basic Pass, Basic Pass+Mask, SSS Only, SSS+Mask, Render All Pass defined what you will out put in render. Will be explain more in Shader output pass below
  • Create Occlusion Pass will create Occlusion Pass for your render automatically with good setting. You need to press update Occ Pass when have new object in scene. Play with these button and see.
  • Create Zdepth Pass: The same as above Occ Pass. Learn Z setting from https://homepage.mac.com/bauer/portfolio_shaders/zDepthDOF/

V. Phenomenon

  1. Mia_pass_phen

Could be found here

The same setting AS mia_material_x so go with Maya documentation, also photon shader of this phen is plugged. please dont ask me how to use it.

Different/Feature Node

  • Gamma default: 0.454. My phen is embed a gamma node, and the DEFAULT is 0.454, for LINEAR work flow (why linear work flow go with google). I will advice use the mia_simple_exposure lense shader for tonemap with gamma = 2.2 and gain = what you like. Then in compositing application, apply the Color Correction Node/effect to these pass with Gamma = 2.2 and gain = what you like. And You will get what you want.

  • Bump could be found here. No more bump mode in my phen but only 1 slot. Plug bump2d or bump3d node so go with Bump. Or mia_roundcorners to get round corner effect

  • Mask Render: If you check mask, you will get a seperate mask pass used for compositing of this shader. These thing are MASK in mrRenderTool

  • Output Pass and Example, these Pass is called BASIC PASS. Pass should be EXR for 32 bit floating
    • diffuse
    • indirect
    • specular
    • reflection
    • refraction
    • transclucent
Transclucent pass: Will has If you has mia setup with transclucent

Default Render from Maya

Composite Final With Gamma Correct/Gain Correct and other things

2. Misss_fast_skin_pass

  • Mostly the same as misss_fast_skin_maya, so please read Maya Document and Please dont ask me how to use it. Could be FOUND here.

  • Different/Add feature
    • Lightmap wont create so you need to press to lightmap button, It will automatically create new lightmap or ask you use exist lightmap. That is all for setup SSS.
    • Gamma Control: Default is 1.
    • Overall Exposure: You need to control overall exposure to get exposure on shader if use a color/texture diffrent white color.
    • Mask render.
    • Composite Type: MR Internal composite for this shader. 5 mean "screen" and you will use "screen mode" in compositing and 2 mean "Add" and you will use "Add mode" in compositing.
  • Compositing with Screen Mode (5): PASS should be in EXR for 32 bit floating

SSS epidermal pass

SSS back pass

SSS sub-dermal

SSS diffuse pass

SSS specular pass

SSS overall color (will be in 32 bit floating exr for compositing)

Mask 1 pass (if check pass 1 in shader)

Final with formula:

overall * (specular + epidermal+subdermal+back+diffuse)

With * mean "multiply" and + mean "screen mode"

VI. Limitation:

  • These PHENOMENON must be use directly on object, mean cant use layer shader or they cant be child of other shader.
  • No shadow pass: Sorry but no shadow pass, this is really a headache if you need it.
  • misss_fask_skin_pass a slower than the normal misss_fast_skin_maya
To discussion, bug report, please visit here

https://forums.cgsociety.org/showthread.php?f=87&t=602613


Please use the Bug System to report any bugs.
Please use the Feature Requests to give me ideas.
Please use the Support Forum if you have any questions or problems.
Please rate and review in the Review section.

More Items from author ghostlake114:


People who favorited this item:

  • Sheldon Whittaker
    Sheldon Whittaker
  • Jace Xie
    Jace Xie
  • alex rose
    alex rose
  • Salvador Simo
    Salvador Simo
  • biggaman
    biggaman
  • gurus
    gurus
  • wagidfbx
    wagidfbx
  • CGus
    CGus