[Bf-cycles] sample with lamp changes light paths- normal behavior?
Bassam Kurdali
bassam at urchn.org
Tue Nov 13 23:37:07 CET 2012
I've found it results in faster renders when you turn it off for
materials that aren't putting a lot of light into the scene (i.e. non
emmissive ones).. probably varies by scene.
On Tue, 2012-11-13 at 17:07 -0500, Matthew Heimlich 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
> >
> > _______________________________________________
> > Bf-cycles mailing list
> > Bf-cycles at blender.org
> > http://lists.blender.org/mailman/listinfo/bf-cycles
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles
More information about the Bf-cycles
mailing list