[Soc-2009-dev] Bug handling qmc/jitter sampling on HEMI and SUN lights

André Pinto andresusanopinto at gmail.com
Thu Jun 25 15:32:45 CEST 2009

While fixing a bug on my SoC branch, I found a bug on the way blender
handles hemi and sun lights.

Trunk raytrace code only allows to raycast with (origin, final).
As so blender implements SUN and HEMI lights by calculating the point on the
boundaries of the scene BB, thats has the same direction.
After that a QMC displace vector is added to the light position, leading
that the effect of the displace vector is proportional to the scene BB. (if
the scene has a large BB then the displace vector doens't has a big effect,
reducing the effect QMC, leading to hard-shadows)

As you can see in those 2 renders (where only the BB of the scene was
small BB
large BB (got harder shadows)

If I am not mistaken the displace vector should be applied at the light
vector and then having the light vector be transformed to an "end_point"
outside the scene.

Anyway I implemented such aproach on my branch (since the new render API
uses parameters (origin,vector,max_dist) ) and got the following result:

There is a large difference between images as now the QMC is used at the
direction level (which I belive to be the right way todo it) instead of
final point.

I would apreciate feedback as this makes that all HEMI and SUN lights
rendered from now on will change a lot.

PS: maybe I should email this to bf-commiters (not really sure)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/soc-2009-dev/attachments/20090625/bfa8d430/attachment.htm 

More information about the Soc-2009-dev mailing list