Hiya
I’ve noticed something about the realtime shadows in a project Im working on. Although the object is definitely on the ground the shadow makes it look like its hovering. See pic. My guess is that the shadow map resolution is too low to be accurate with every little object but wondered if there was a way round it. This is with high resolution on and shadow casscade set to 4 and distance of 80. The shadows are a big part for creating the atmosphere but I have a feeling I need to lower the distance. Any other thoughts or confirmation?
cheers
Gaz
This is “shadow bias” in action. Basically, for shadow mapping to work, shadows have to be “pushed back” a bit. How much depends primarily on angles between surfaces and light, and on your scene setup (and a bit on shadow resolution, but not much).
Default bias settings (per light) are 0.07 (7 centimeters) plus 1% of shadow casting object size (0.01). Depending on your scene size, you could try lowering those values.
Note of caution though: in Unity 2.0.1 shadow bias in OpenGL works a bit differently than it does in Direct3D. So you might lower bias settings to zero and often it would look good on a Mac, but look horrible on Windows. So be careful with those; in Unity 2.0.2 we’re making sure bias will be consistent on both platforms.
fantastic! thanks for the reply Aras. Now I know what settings to play around with.
cheers
Gaz
Nice, I was wondering the same thing as I’ve run into this also! Off to play now.
hi Aras. Tried lowering the settings and your right-looks great on Mac but on PC get lotsa stripes on everything.(which look pretty cool but not really what I’m after haha.
the settings were 0.002 and .3 I think. Looking forward to the 2.2 version. I’ve attached a screenshot for anyone interested.
cheers
Gary
Then you have to increase the bias until it works for your scene. Unity 2.0.2 won’t make bias issues disappar, it will just make them visible on OpenGL the same way as on Direct3D. Shadow bias is just an inherent issue with shadow mapping; CG movie studios spend hours tweaking bias settings for each frame in the movie
wow! glad I don’t work in the movie industry! javascript:emoticon(‘:lol:’)
thanks for the clarification. It will still be useful to know that what i see on the mac will be what i see on the pc.
cheers
Gaz