[Bf-funboard] Proper soft shadows in composer
Matt Ebb
matt at mke3.net
Sat Nov 3 04:01:10 CET 2007
On 03/11/2007, at 2:34 AM, toontje at telbonet.an wrote:
> I would like to see the shadow pass Z-valued. Every pixel in the
> shadow
> area should have the information what the relative distance is from
> the
> lightsource(s) to the object(s) that is causing the shadow. That
> way, I
> think, you can feed this information into the defocus node. The result
> should be the same as raytraced soft shadows (sharp near object and
> blurry
> far from the object). The other aspect is that the blurrier the shadow
> gets, the less intense it is. But that is not a problem because you
> can
> stack alpha on the very same z-values.
>
> I wonder why this was never coded into Blender, since I think this
> is the
> cheapest way (render time and coding) to achieve this.
It was never coded because it won't really work - it's a lot more
complicated than that.
It's not really worth going into detail about here, but you can find
out why, by reading up on how raytraced shadows work, but a few hints
to consider why this isn't that feasible is:
* it's not the distance from the light source to the shaded point
that's important, it's the distance between the shaded point and the
shadow caster (and the relationship to coverage of the light area)
that's important, and there's no way to get enough accurate
information on the whereabouts of geometry in the compositor (for
that you need, surprise, the scene geometry information and an
acceleration structure like an octree)
* there can be multiple light sources, multiple light directions,
light areas/shapes. This is much more info than can be stored in a
single float channel.
* shadows do not get uniformly 'blurred' in screen space, the
softness happens along the geometry itself relative to the light
location and angle.
* shadows behind transparent/refracting/motion blurred objects
* and so on...
cheers
Matt
------------------------------------------
Matt Ebb . matt at mke3.net . http://mke3.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-funboard/attachments/20071103/3cdfdc32/attachment.htm
More information about the Bf-funboard
mailing list