View Full Version : Physical Sun and Sky with useBackground material
06-10-2009, 11:48 AM
Hi all, I am having a problem with shadows using Physical Sun and Sky in mental ray. I can not get sharp shadows to cast on a useBackground material that is being used as the ground of the scene. Any other object that has a different shader will receive sharp shadows but the useBackground is only giving me very diffuse shadows. If anyone knows a way to get sharp shadows with the useBackground while using mia_physicalsun and mia_physicalsky I would really appreciate it.
Not really sure about the useBackground. I think that mip_matteshadows works better in mentalray. A while back I wrote some notes about using it. Here's a link (http://www.djx.com.au/blog/2008/04/08/mip_matteshadow-and-how-i-have-used-it/) if you are interested.
06-11-2009, 06:33 PM
Thanks David, I had no idea about these shaders. It looks like this is exactly what I need but I am new to mental ray and I can not figure out how to use this shader. I had a look at the sample scene in the link but I think that is probably doing more than I need by also capturing reflections and also going through the mip_rayswitch. The only thing I need is just the shadows so do I just plug the mip_matteshadow into a mia_material_x? I'm just unclear on what to connect to what. I found a .pdf with some documentation on these shaders but I think it assumes a proficient level of understanding in mental ray and didn't really help me except to confirm that this is definatly what I should be using. Thanks again.
Yes it can be a bit confusing till you get the hang of it.
Have a read of zap's tips here (http://mentalraytips.blogspot.com/2007/10/production-shader-examples.html). The scene files there may explain it better.
Essentially you need to use mip_matteshadows as the mi material shader (so you dont connect it to mia, but you do connect it to the SG node). Then you need to think about what connects to the background slot - which depends on whether you want to see the actual background image, or whether you want just black with your shadows in alpha. (In my blog I was using the 2nd method).
06-12-2009, 09:35 PM
Thanks for the links and the further explanation. I really appreciate it, I think it is beginning to make sense. The files in your example scenes are very helpful.
06-12-2009, 09:35 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.