[Bf-committers] Realistic materials question (Farsthary)
ypoissant2 at videotron.ca
Wed Feb 25 16:11:24 CET 2009
From: "javier loureiro" <derethor at derethor.net>
Sent: Wednesday, February 25, 2009 7:34 AM
> I believe that the main problem with complex BxDF's is how to sample it
> in an efficient way. There is no a way to sample according to a complex
> BxDF (a tabulated one, for example) , so, you sample cosine weighted
> around the normal.
There already exist different techniques for importance sampling BxDFs.
AFAIK, though, importance sampling tabulated BxDF is not efficiently solved
yet but given that tabulated BxDF are not easily and/or cheaply accessible
right now, I would not consider this an important issue for Blender.
However, good importance sampling strategy do have a very important impact
on performance for non-tabulated BxDF as well. And there are many importance
sampling strategies and new ones are designed regularly and different
strategies are better suited to different situations. An implementation in
Blender should, thus, attempt to include that concept in some more or less
abstract way. This is a thought I have since I would not know how to design
and implement an abstract importance concept right now but this looks to me
like a necessity and have been simmering on my backburner for a while.
But for truely efficient importance sampling, the samples should not only be
distributed according the the BxDF PDF but also according to the environment
lighting PDF. Imagine the BxDF PDF is very strong in a direction where the
environment PDF contributes no light. So the optimal PDF from which samples
should be drawn is the product of the BxDF PDF and the environment PDF. That
complexifies the matter a bit more.
> Also, you must define multiple leyers of BxDF for a
> material, with different weights (like 20% diffuse, 60% phong, 20%
> emissive), and "weight maps". The random number generation, and previus
> stratification of samples is fundamental to sample correctly the whole
>From my experience, good results can be obtained by using a
multi-dimentional low-discrepancy vector sample generators. Generate one
sample per path and then use additional dimension for sampling the light,
the material, the different layers, the bounces, etc. Those additional
dimensions can be supplied on demand and used for bounces too. There are
more complex schemes but this one is cheap and works very well.
> Another question: what happens when a material is emissive (like lava)..
An emissive material does emit light. It is a light source.
> how to deal with non realistic light sources, like point lights,
> directional, etc?
There are easy solutions for those. The actual issue is not so much the
concept of point light or directional light themselves as how their
properties are defined by the user. For instance, how do you translate a
light that have been specified with an energy of 1, a half distance of 30
and a linear attenuation? What would that mean in term of physical
> pd. first time i write here :)
Cool! Welcome to the discussions.
More information about the Bf-committers