PDA

View Full Version : Mental Ray and DMap Shadow Problem


BillSpradlin
02-14-2005, 10:02 PM
I have an odd issue going on here and hopefully someone has run into it as well. I'm going to do my best to explain it without showing an image (will be difficult to do due to copywright issues) so bear with me.

Basically I have a character that is clothed, cloth simmed with syflex, has multi layered clothing (pants, t-shirt and sweat shirt), and has a pretty standard 3 point light set up using dmap shadows for the lights. I prefer using dmaps for an obvious number of reasons, so giving an answer of "just raytrace your shadows" isn't something I'm interested in (mainly because I can use ray traced shadows but to get soft shadows on ray traced shadows is extremely expensive compared to using dmaps). Basically what's happening is there is a shadow showing up midway on the t-shirt right where the pants end around the waist line. If I turn off "casts shadows" on the shirt then it goes away, but then I loose the shadows being cast by the shirt, which of course I need. I'm not really concerned with shadows being cast by the whole character to the ground, this is more of self shadowing on the clothing etc. If I turn dmap shadows off and use ray traced shadows it works fine, if I render in the software renderer with dmap shadows it works fine. Only when I use dmap shadows in mental ray does this problem surface. I basically narrowed the problem down to the softness attribute of the dmap shadow. No amount of increasing the dmap resolution or samples fixed the problem. If I set the softness attribute to 0 then the problem goes away, as soon as I turn it up to .001 it comes back. I was thinking there might be an issue with the proximity of the geometry of the t-shirt and pants, but that's not really the case because the sweatshirt and t-shirt are right on top of each other and don't have this issue. I've checked the normals on both the t-shirts and pants, they are pointing where they should be.

So if anyone has run into a similar problem let me know. I'd really like to find a solution to this because it's going to be an extreme time saver when it comes to rendering. Thanks.

NrgJake
02-14-2005, 11:19 PM
Ohhhhhh!! i was having this problem aswell.. Incredibly annoying!!

There is a way to fix this tho if you have maya 6.5!!! (I don't think it works on 6.0 but you can try) You need to adjust your dmap bias, the only problem is the settings in maya dmap shadows don't work in mental ray. So the way you do this in mental ray is write this line in the command line

addAttr -ln "smapBias" -at "float" spotLightShape1;

"spotLightShape1" being the example of whatever your light is named. Subsititute your lights name. A new atribute will be added to your light attribrute window down at the bottom in "extra attributes). Each light and dmap is different so you need to adjust accordingly.. but i find a bias between ".15 - and .2" works well.

Mental Ray was driving me crazy with this problem, but now dmap shadows are actually useable.

I hope this helps.

BillSpradlin
02-15-2005, 01:10 AM
Yea that's what I figured was the issue. I'm just going to have to ray trace them for now, and keep that in mind for our future projects. Thanks,

Bill

CGTalk Moderation
02-15-2006, 02:00 AM
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.