Mental Ray Basics

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  04 April 2005
Mental Ray Basics

So there are enough guides and movies out for Mental ray Caustics and GI, FG and HDRI but not much on the building of shaders and the use of all those fun nodes in the Hypershader. So here goes. This is Maya specific but might be of use to other programs, I dont use em so I duno.

First to install "most" mental ray shaders. They are made of 2 files usually with the same name ending with .mi and .dll extention.
These go in ..program files/alias/maya6.0/mentalray/ the .dll goes into the "lib" folder and the .mi goes into "include"
The .dll being a link or translation for the .mi into Maya.
Then open the "maya.rayrc" file and you need to add a location for the shader you just pasted.
So in the "link" set add (link "{MAYABASE}/lib/Zimburger.{DSO}")
and in the "mi" set add (mi "{MAYABASE}/include/Zimburgler.mi")


Replacing "Zimburgler" with the name of the files you pasted into the folders above. Make sure you add these lines bellow the Mayabase line.
Then save and when you load mental ray into Maya in the plugin manager it will load all the correctly installed plugins. If a shader is more complicated than this is will have it's own documentation, like the SSS-Skin shader has you install icons and scripts as well.

Now I'll touch on some of the basics that I've found.


You can apply both Mental Ray and Maya Software at the same time to an object. If you are just using only Mental Ray shaders your object will appear as if it is untextured in the hardware render (green shaded) or with the default Lambert. And depending on which renderer your using it will use the Maya nodes or the MR nodes.



The Image shows a network for a sphere to render in both Maya and Mental ray render engines.
The maya Blinn shader has the 3 checker nodes plugged into Color, transparency, and reflection.
The Mental Ray shader has a checker plugged into the diffuse of the mib_illum_blinn.
Then the blinn is plugged into the mib_transparency (out value-input). The second checker node is plugged into the "transp" of this node.
Then the transparency is plugged into the mib_reflect (out value-input). The third checker node is plugged into the "reflect" of this node.





For the render I changed the diffuse/color to a Red color from the checker so we can see what's going on. And as I'm still learning too I dont know what's up with the shadows if anyone has any ideas. *hint* And finally make sure you turn up the raytrace a bit for the mental ray render or the faces visible through the front of the ball will appear black.

So while Everything is contained in one Node for the most part in Maya Software in Mental Ray each component needs it's own node and they are then piggybacked together and plugged into the mental ray material shader of the objects shading engine.

Next Friday I'll add the bump network information that I've found. But if anyone else wants to add info about other nodes I'd love for this to turn into a all inclusive guide. And it would be great if we could keep questions and comments focused so we dont have to search 20 pages to find the info we need thanks.
__________________
I'm here to learn and teach. So lets get our learn on!
Basics of Mental Ray for Maya 6.0
 
  04 April 2005
Edited: Oh, it seems one only need to apply a "mib_shadow_transparency" (mode=1), to say L_glass shader and not a light shader in addition. My other shadows disappeared when using a light shader on the light and I havent figured out why.
__________________
Are you warm, are you real, Mona Lisa?

Last edited by undseth : 04 April 2005 at 04:55 PM.
 
  04 April 2005
Red face

How can I use bump map on mental ray lambert shader PLS help me


.

.
.
__________________
www.facebook.com/Avisgrafik
 
  04 April 2005
look for the "bumpcombiner" shader - it´s the only real solution
 
  04 April 2005
Hey Undseth i messed around for a while but i cant figure out where the connect in the shadow and lights?
__________________
I'm here to learn and teach. So lets get our learn on!
Basics of Mental Ray for Maya 6.0
 
  04 April 2005
Bump Network-MR

Okay I dont know how to tweek this to much but i'll post it and tell you what i know. My buddy Marc set up this Bump "cheat" for Mental Ray.


"mib_texture_vector" connected to "mib_texture_remap" (out value to input)
Then connect the outvalue of the remap into the coord of a "mib_passthrough_bump_map"
Plug a "mib_bump_basis" u and v into the u and v of the "mib_passthrough_bump_map" And plug you bump map into the "tex" of it as well.
The outvalue of the "mib_passthrough_bump_map" goes into the color_Base of a "mib_color_mix" and put your color map into the color_0.

Set the color mix
Number to 1
Mode_0 to 1
and everything else default (far as i know).
Only things to tweak are the Factor (depth) and the step (offset)


Grab the Maya file here.
Hope this helps some people,you can run it into the diffuse on any of the mib_illum material shaders.
__________________
I'm here to learn and teach. So lets get our learn on!
Basics of Mental Ray for Maya 6.0

Last edited by Invader_Zim : 04 April 2005 at 11:02 PM.
 
  04 April 2005
Really great tutorial...i love your teachings...

I hope you can go on.

A lot of beguinners need that!

REALLY THANK YOU
__________________
*God is the King of procedural creation*
 
  04 April 2005
Thanks for the great tutorial
__________________
Online Portfolio

 
  04 April 2005
I was going to post some stuff about layered shaders but the "Colormix" i used in the Bump map isn't a great layered shader. I ussually use the Bump mix combiner and Mix8layer from highend3d. And there's already some posts about them so i figured i wouldn't double up. What else do you guys wanna know?
__________________
I'm here to learn and teach. So lets get our learn on!
Basics of Mental Ray for Maya 6.0
 
  04 April 2005
hi this is great thanks
i was trying this dirtmap plugged into camera trick sometime ago but couldnt make work
can you check it out and make some tutor for that
thanks
 
  04 April 2005
to get the transparent shadow in the MR shading group...add a shadow transparency node to the SG slot....and then map your checker texture to the transparency in the shadow node.
 
  04 April 2005
Talking

Originally Posted by Invader_Zim: I ussually use the Bump mix combiner and Mix8layer from highend3d. And there's already some posts about them so i figured i wouldn't double up. What else do you guys wanna know?


no there isnt, all there are post praising the author of the shaders, then everyone pretend they know how to fully use them and ber cool.
i need to use the mix8 layer for my current project, its the only good layered shader for MR i hear of. but i can nver get it to work...
i have not yet used the bump combiner, but i would like to see it in action.
plz if u could make a tut for the mix8 by this week that would be great im sort of pulling my hair out using the miss skin shaders as it is.

thank you for you efforts. i hope more contribute to this thread and hopefully it will be big enough to be stikied.
i also hope next time some shading guru decides to create a super cool shader, at least have the modicum of commun sense to explain how it works, and not just little bits of ambiguous replies to confusing threads.
__________________
that is statistically impossible
 
  04 April 2005
i use the mix20 by Pixero which is essentially the same as the mix8. It the mental ray version of layered Shader..and you have tons of different compositing methods.

What is so hard about using it? you simply middle mouse drag the shader from Hypershade into the slot you want(in attribute editor) on the Mix20 or mix8. Make sure it is enabled......

For more difficult connections you will have to use the connection editor.

for testing try using JUST textures...and layer those to get an understanding of how to use the shader.
 
  04 April 2005
Originally Posted by oodle: hi this is great thanks
i was trying this dirtmap plugged into camera trick sometime ago but couldnt make work
can you check it out and make some tutor for that
thanks


Hey Oodle, I duno what the "camera trick" is but the dirtmap/occlution shader has it's own documentation and is very versitile. One way to use it is similar to the reflect or transparency I explained above. Connect the outvalue of your Shader into the base color on your dirtmap. Then plug the dirtmap into the SG material Shader. In this example i had to use two dirt map nodes one for the plane and the other for the torus. Put textures into the base color on them and the bright pink into the dirt color so you can see it.

__________________
I'm here to learn and teach. So lets get our learn on!
Basics of Mental Ray for Maya 6.0
 
  04 April 2005
Here's an example of some of the problems I have with the Bump Combiner and color mix plugings. Why are there three inputs in the place where you map the Bump map file? I assume it's something to do with Normal mapping but i dont want to use a normal map. And when i map a file node into the bump on the Bump combiner i get a "type conflict: "m_bump_0" is type vector, "maya_file" returns type color" error. So what's the node that translates a color input into a vector input?
Edit: Ahh i need to plug in a maya bump node, between the file and the bump combiner. Woo i'm cool.

Edit: Been Crazy busy with work. I'll post some info about the BumpCombiner soon. Mix8 is so similar i'm not gonna bother to add info about.
__________________
I'm here to learn and teach. So lets get our learn on!
Basics of Mental Ray for Maya 6.0

Last edited by Invader_Zim : 04 April 2005 at 07:54 AM.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:47 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.