[Bf-committers] Shading System Proposals
Yves Poissant
ypoissant2 at videotron.ca
Wed Jan 6 01:38:12 CET 2010
Brecht,
> Right, I think the random number or the sampler should indeed be
> provided by the caller.
>
> One thing that occured to me is that for an arbitrary node setup you
> may need more than two dimensions. In pbrt it seems there are always 3
> random numbers passed into Sample_f, which works if you have for
> example one mix node + some individual bxdfs plugged into it, but
> doesn't generalize to an arbitrary node setup, as you can't reuse
> those random numbers. So I guess we need to take that into account as
> well somehow.
Yes. I agree. You will need an arbitrary number of dimensions in the
sampler. By "arbitrary node setup", I'm going to assume explicit as well as
implicit node links.
The n-dimensional sampler may be viewed like a 2-way sampler that can then
be called in two different ways. One call generates a new sample vector (in
a sense, because all the possible dimensions don't really need to be
generated in advance). Then a second way of calling the sampler that
provides the next dimension number from that vector. So at every bounce, you
would call Sampler.GetNextDimValue() or Sampler.GetNext2DimValues(&u,&v).
By explicit I mean connecting a light node to a BSDF node and connecting the
BSDF node to an output node for example. By implicit, I mean a BSDF node
that would be called implicitly from light rays or view rays bouncing around
and hitting a surface for which a BSDF node setup is defined.
>>> * intensity estimate: given in vector (or not)?, integral over
>>> outgoing directions
>>
>> Not sure what this is for. Is this equivalent to the rho function from
>> pbrt?
>> Or is this like a final gathering function?
>
> It is the rho function from pbrt. I think this is needed for
> importance sampling, and also to compute the color pass (at least I
> hope it will work well for that).
The rho function computes a diffuse reflectance. I think what confused me is
your use of "intensity estimate". It is really a reflectance so it should
return a color. What this does is compute the average reflectance from over
the hemispphere. The result is a reflectance that would be obtained if the
object was photographed in an open cloudy sky environment. This particular
reflectance is also sometimes called albedo but the term albedo is loosely
defined.
If I understand it right, pbrt uses that to separate the diffuse from the
glossy parts when performing different radiance precomputations. That is an
interesting trick. When doing radiance precomputation, we must assume that
all surfaces are diffuse because there are no efficient ways to store
precomputed radiance with its directional component in a way that can be
used later when doing a final pass such as final gathering. Spherical
Harmonics are good devices to get there but they are also full of artifacts
for very glossy materials.
Yves
More information about the Bf-committers
mailing list