PDA

View Full Version : How to make a Mental Ray Material recieve shadows?


Jonathan33
03-10-2005, 08:24 PM
I'm having a problem with a mental ray shader,
i have asked in the mental ray shader thread but didn't really get a response so hopefully some more people will see this :)

Right now i'm trying to use mental ray displacement for bark on a tree, at first i used just a standard max texture, and put the displacement under the mental ray Connection list. This model recieved shadows, but the problem is the displacement seems to "Break" the mesh along the seems, so there are black lines at the edges.

So i created a mental ray shader, and put the surface and displace in there, now the thing is, no wonder what i put in the shadow slecetion (Edge, facade, glass, glow, material to shader, Metal, Shader list< shadow transparency, Translucency, Transmat, water surface shadow) No matter what one of those i put in there, the object recieves NO shadows what so ever.. the displace works much better, but i can't use it without the shadows :(!

Can anyone help me with this problem? its driving me crazy!

psv
03-10-2005, 10:30 PM
maybe your bark is set to not receive shadows geometry properties (right click ,properties general, creceive shadows)or in light properties.........


don`t give up:thumbsup:

Jonathan33
03-10-2005, 11:05 PM
maybe your bark is set to not receive shadows geometry properties (right click ,properties general, creceive shadows)or in light properties.........


don`t give up:thumbsup:
Nope it's set to recieve shadows :( SIGH!
thanks though!

sampson
03-11-2005, 04:03 PM
Just a thought, but not tested.

- in the general parameters for the light you can set shadows to "mental ray shadow map" have you tried that?

Jonathan33
03-11-2005, 05:09 PM
Just a thought, but not tested.

- in the general parameters for the light you can set shadows to "mental ray shadow map" have you tried that?
Yep used Mental ray shadow map and RayTraced shadows and default shadow map

Jonathan33
03-11-2005, 05:29 PM
I decided to take a couple screenshots to better explain the problem i'm having, as you can see in this picture, i'm using a standard material with a diffuse map in the standard max diffuse slot, and a mental ray displacement in the mental ray roll out area. You can see that it does receieve shadows, but the mesh seems to explode at the seems.
http://members.dxlab.com/jsnyder/ftp/standardmaterial.jpg (http://www.imageshack.us/)

This is using a mental ray material with my diffuse in teh surface tab, and the displacement in well the displacement spot, anow i don't know what to put under the shadow slot for this to recieve shadows as nothign seems to work, the displacement is much better on this one though.
http://members.dxlab.com/jsnyder/ftp/mentalraymaterial.jpg (http://www.imageshack.us)

EDIT* You'll have to copy and paste the images into a window.

cpan
03-17-2005, 09:45 AM
dunno, in maya mray shaders recieve/cast shadows by default. Altough there is a possibility to add your own shadow material to an mray shading group. So if you find on your material an slot called Shadow Shader (dunno max at all) plug into it an shadow material ( eg. mib_shadow or transparent_shadow) to force it use this shadow shader.

hope it helps.

psv
03-17-2005, 09:52 AM
dunno, in maya mray shaders recieve/cast shadows by default. Altough there is a possibility to add your own shadow material to an mray shading group. So if you find on your material an slot called Shadow Shader (dunno max at all) plug into it an shadow material ( eg. mib_shadow or transparent_shadow) to force it use this shadow shader.

hope it helps.

yes it is a shader slot , like for any mr material , but that shader control only the way that material cast shadows, not receive.......that problem apear only if there is a displacemment aplied...

and Jonathan try to use a material to shader in the surface slot of that mr material......

cpan
03-17-2005, 11:24 AM
yes it is a shader slot , like for any mr material , but that shader control only the way that material cast shadows, not receive.......that problem apear only if there is a displacemment aplied...

and Jonathan try to use a material to shader in the surface slot of that mr material......

not quite correct...
if this controls how the shadows are casted, wouldn`t this mean the shadow shader controls the way shadows are received on other materials?
In fact the shadow material is used for both cast/receive ways.

maybe it`s a limitation of the current max mray version, dunno, or maybe it`s a very little trick to do...

psv
03-17-2005, 11:42 AM
Iashule.......

Shadow

Shadow shaders can only be attached to shadow statements in material statements, directly or indirectly in a Phenomenon. They are called when a shadow ray hits an occluding object; the shadow shader of the occluding object controls how much light is transmitted. Shadow shaders are special in that their result color is also an input color, which means that the output cannot be attached to another shader parameters because such attachments are one-way, output-to-parameter only. In a Phenomenon, shadow shaders can only be attached to a material inside the Phenomenon, or to the Phenomenon root if the Phenomenon is attached to a material's shadow shader.

mr manual

http://img124.exs.cx/img124/8084/16bj1.jpg


jonathan ...use a standard material as a ~~material to shader~~~map
and put that map in the surface slot of your mr material

both the ocludding , and the occluded objects must have a shadow shader attached in the shadow slot.....

i remember readind somewhere about the same problem,..... and the same solution:thumbsup:

cpan
03-17-2005, 11:55 AM
psv,

pai in maya dak plugez un mib_shadow_trasnparent in slotul Shadow Shader pe SG totul merge bine, inclusiv cu displace, da merge shi fara sa-l plugez. Io folosesc mereu Raytrace Shadows ca-s mai rapide decat Shadow Map, poate asta-i problema, nush...

that`s it, I`m out of here :)

psv
03-17-2005, 12:28 PM
psv,

pai in maya dak plugez un mib_shadow_trasnparent in slotul Shadow Shader pe SG totul merge bine, inclusiv cu displace, da merge shi fara sa-l plugez. Io folosesc mereu Raytrace Shadows ca-s mai rapide decat Shadow Map, poate asta-i problema, nush...

that`s it, I`m out of here :)

no problem Yashu let`s keep it on private ....:)

sorry guys

CGTalk Moderation
03-17-2005, 12:28 PM
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.