View Full Version : How to adjust the width of shadow softness?

04-03-2005, 07:05 AM

This might sound like a really stupid question. I've recently scaled my scene down by a factor of 10. In other words my scene is now 0.1 times the scale it used to be. This has fixed quite a few problems for me but now I've got a problem that cannot creep into my project as it looks really horrible.

I've setup new lights to fit the size of my scaled down scene. But now the soft shadows has a soft edge which is way too wide. I cannot use area shadows as it almost quadruples my rendering time and with soft shadows I'm already at almost an hour per frame. In the picture underneeth the number 1 shows the part of the shadow I would like to make narrower. Number 2 shows the loss of shadow definition on the character itself. And number 3 shows a particularly bad area which makes my character look like she's ready for take-off. The main pic shows the problem with spot lights and the inlay shows it with omnis. I cannot decrease the bias(abs) as decreasing it causes arifacts on the character.

Can someone please tell me how I can make the width of the soft edge narrower?

04-03-2005, 07:52 AM
'Sample radius' and 'shadow bias' should be the parameters to tweak here, theoretically scale them by the same factor as the scene. As for the area shadow suddenly being incredibly slow, check the 'area shadow width' which should also be scaled by the same factor (again, in theory... in reality these things may need a few rounds of tweak-testrender-banghead-tweak-testrender)

04-05-2005, 02:05 PM
I like my soft shadows hard. I turn the sample radius down to 1 and set the bias to 10 or at least 7 to get a decent shadow. I usually leave Absolute Bias checked though if it artifacts I check Relative Bias at 1% and it goes away. I asm not sure that scaling a scene has had any effect on my rendered shadows, though my logic dictates that if the object is larger I have more geometry area to project the tighter shadows onto for the object and less floating point variances overall. For dominant/key shadows a map size of 1000 to 1500 seems to do the trick.


04-05-2005, 08:41 PM

Thanx for the replies. It gave me a good starting point. This problem has brought me some interesting experimentation results. Firstly, The sample radius didn't change the softness of the shadow at all (or if it did, it would possibly only be visible with a microscope). It simply makes it better or worse looking (blurred jaggies etc.). I find it very dificult to get a golden mean with the absolute bias. Setting it higher reduces the artifacts on the character's skin but also makes the floating appearance much worse. The map size definitly has an influence on the artifacts on the skin and it's strange that the belief is that spots render faster than omni's when, in fact, in the scene as in my original post, it actually adds about a minute to render time.

So now I've found a way of controling the softness without effecting shadow quality. The shadow cone size must be set smaller to make it harder. Unfortunately that also brings about the problem of parts of the scene possibly falling outside the shadow casting cone but I'll cross that bridge when I get there. Adjusting the shadow cone size to sizes exceeding 120degrees could help a lot with faking radiosity. It softens up the shadow to a point of becoming nearly invisible at 170degrees and hence removes the dreaded multiple direction shadows.

04-05-2005, 08:45 PM
you can simply up your shadow resolution if you want too without adjusting the shadow cone to be too small (though it's always sensible ot tyr and set up your shadow cones).

if you're wanting a shadow that gets softer further away from the object then you should use an area shadow.

CGTalk Moderation
04-05-2005, 08:45 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.