[Bf-cycles] sample with lamp changes light paths- normal behavior?

Thomas Dinges blender at dingto.org
Wed Nov 14 01:54:19 CET 2012


Hi,
Sample as Lamp in the World settings is different. This is only 
beneficial for non solid colors or especially HDR backgrounds.
For simple solid colors it's a bit slower.

Regards,
Thomas

Am 14.11.2012 01:51, schrieb Bassam Kurdali:
> I've noticed it's off by default in the world (or is this a .B.blend
> thing?) It does seem better to me (at least when I'm using an HDR for
> the world, to turn this option on.
> On Tue, 2012-11-13 at 23:37 +0100, Brecht Van Lommel wrote:
>> If the material does not contain an emissive shader, the option does
>> nothing. Ideally we should gray this out in such cases but it's slow
>> to check this when drawing the UI.
>>
>> Brecht.
>>
>> On Tue, Nov 13, 2012 at 11:07 PM, Matthew Heimlich
>> <matt.heimlich at gmail.com> wrote:
>>> Are there any inherent pros/cons of leaving sample as lamp on for every
>>> material? If there are cons, why is it enabled by default and not just when
>>> you make an emissive material?
>>>
>>> On Nov 13, 2012 4:54 PM, "Brecht Van Lommel" <brechtvanlommel at pandora.be>
>>> wrote:
>>>> I would not call this a bug, not because it's great behavior but
>>>> because it's part of an important optimization.
>>>>
>>>> When sample as lamp is disabled, what happens is that rays just bounce
>>>> around based on the BSDF, and when they happen to hit a an emitter,
>>>> then that illuminates the surface. In this case we don't know
>>>> beforehand that we are going to hit an emitting surface, and so we
>>>> don't know if it's a "shadow ray".
>>>>
>>>> With samples as lamp enabled, that same type of bouncing still happen.
>>>> But in addition we now pick a points on emitting surfaces and trace
>>>> shadow rays directly to it, which helps finding small emitting
>>>> surfaces. In this case we know it's a shadow ray, and so the ray is
>>>> tagged as such.
>>>>
>>>> The solution would involve executing shaders twice to distinguish
>>>> between these two cases, so not ideal.
>>>>
>>>> Brecht.
>>>>
>>>> On Tue, Nov 13, 2012 at 10:01 PM, Bassam Kurdali <bassam at urchn.org> wrote:
>>>>> Hey folks, I've constructed an artificial example here to illustrate the
>>>>> issue.
>>>>> I've got a plane (named selective) that has transparent shader and a mix
>>>>> node with Light Path 'Is Shadow Ray' as input to factor. The idea is
>>>>> that the shadows would be colored one color, but e.g. diffuse and glossy
>>>>> reflections with another.
>>>>>
>>>>> This is being lit with a mesh cube and an emission shader.
>>>>>
>>>>> If 'Sample as lamp' is on on the Cube emission shader, the result is a
>>>>> yellow transparent plane, with a blue shadow.
>>>>>
>>>>> If 'Sample as lamp' is off on the Cube emission shader, the result is a
>>>>> yellow transparent plane, with a yellow shadow.
>>>>>
>>>>> Is this quirk a normal result? I realize that transparent shader is
>>>>> somehow 'fake' - or is it a bug?
>>>>>
>>>>> blend file http://urchn.org/misc/test.blend
>>>>> image1 http://urchn.org/misc/sample_aslamp.png
>>>>> image2 http://urchn.org/misc/nosampleaslamp.png
>>>>>
>>>>> cheers
>>>>> Bassam
>>>>>
-- 
Thomas Dinges
Blender Developer, Artist and Musician

www.dingto.org



More information about the Bf-cycles mailing list