[Bf-committers] Shading System Proposals

Brecht Van Lommel brecht at blender.org
Wed Dec 2 21:21:56 CET 2009


Hi,

On Wed, Dec 2, 2009 at 8:02 PM, Nathan Vegdahl <cessen at cessen.com> wrote:
> I have a thought.  Based on discussion and reading the wiki, it sounds
> like the output node of shader node trees will have inputs for both a
> bxdf and a color, similar to this image from Matt's wiki page:
>    http://wiki.blender.org/uploads/0/03/Shadsys_node_passes.png
>
> For global illumination, I get the impression that the renderer will
> use the bxdf output for both sampling and evaluation, and it would
> only use the color output for direct-to-screen shading.  But I wonder
> if it wouldn't make sense to instead only use the bxdf for sampling,
> and use the color for all evalulation.
> And it could still fall back to the bxdf if there is nothing hooked up
> to the color.

> This would allow more flexibility in designing shaders that work
> globally (i.e. not just shading directly to the screen).  For example,
> if I wanted to implement a Lommel-Seeliger brdf via math nodes, I
> could do so.  Then I could separately construct a sampler for it by
> mixing bxdf's similar to the Lommel-Seeliger brdf, and plug it into
> the bxdf output.
>
> It's an advanced use-case, and most people could ignore it by just
> mixing bxdf's and ignoring the color output.  But it seems valuable
> for doing more advanced things than just material mixing.

The reason for a separate color output I think is to allow using nodes
that do not work in a BXDF. For example:
http://wiki.blender.org/uploads/1/1d/Shading_nodes_C.png

The BXDF contains both evaluation and sampling, so if you wanted to do
sampling yourself, perhaps a combine BXDF node should be added:
http://wiki.blender.org/uploads/1/15/Shading_nodes_D.png

> (It would also, perhaps, be interesting for constructing physically
> implausible shaders and having them interact with GI.  Like toon
> shaders showing up in glossy reflections/refractions.)

If you want to use a different BXDF for different circumstances,
perhaps that could be done with a node that tells you what it is
evaluating the BXDF for (direct visible, photon mapping, SSS
preprocess, ..), and then you could alter the behavior based on that.
Note sure it is a good idea to make a node for that, but that
information would be available when writing your own nodes.

Brecht.


More information about the Bf-committers mailing list