[Bf-cycles] What are 'throughput' and 'weights'?

storm kartochka22 at yandex.ru
Sun Apr 1 00:06:12 CEST 2012

В Сб., 31/03/2012 в 17:22 -0400, Nikhilesh Sigatapu пишет:
> I was studying the cycles source code, and I think I'm beginning to 
> understand it better. I was looking at the integration algorithm and two 
> terms keep showing up - 'throughput' and 'weight'. What exactly do these 
> signify in this context? I have a feeling throughput is some measure of 
> the modulation across bounces (red surface modulated by red float3 for 
> example), eventually becoming low and making probability of termination 
> high.
> I was also confused by closures for a bit, thinking it to be similar to 
> the computer science term about functions, which seemed related to the 
> execution context of shader functions. The way I see it now they are 
> actually just shaders. Any clarification about this?
> Thank you for your help, and the great cycles code!

You right, 'throughput' is some attenuation to photon package, but
measured in backward direction, from eye to light. In other way, it
named "importance photon" in Eric Veach 1997 dissertation. In reality,
photons must be measures individually, and in every iteration we just
have binary result, photon reach target or not. But in that case we get
very noisy image in first samples. So the trick is we tracking whole
photon package every time, and throughput mean 'what part of package
reach target'.

weight (mis_weight) is optimised Multiple Importance Sampling term,
better google it.

weight in ShaderData shader structure is main value changed by nodes,
like Mix/Add, to allow easy block connection logic. Mostly used to
attenuate final surface color.

Closures in Cycles are maybe not exact closures in term of closures as
in other programming languages, but in general they same. Closures are
some black box function that can modify some abstract set of values
other then parameter, like current surface color. In Cycles, closures
usually change ShaderData structure.

More information about the Bf-cycles mailing list