[Bf-committers] Nodes
Joe Eagar
joeedh at gmail.com
Wed Jul 19 07:01:21 CEST 2006
Branan Riley wrote:
> I've been trying to figure out how to split the current Material input
> node. Create a "Diffuse" node, "Specular" node, etc. The Material node
> can still be there, of course. I'd also like to be able to add a
> "lights" node, which gives the vectors to the lights for each pixel as
> well. Coupled with some easy-to-write vector math nodes, this gives a
> very powerful low-level shader design system, but also allows for less
> advanced users to create simpler systems.
>
> My problem is the three main nodes - diffuse, specular, and lights.
> I've been digging through the source, but I can't find any sort of
> easy-to-use hook already in place. I tried looking at the Material
> Node code, but that pretty much is a front-end for the Material code
> itself, which is not very fun to look through at all. Any advice on
> where to get started on any of those nodes would be greatly appreciated.
>
> Branan
Also, cessen (I don't know his real name -- eh, is it you?) was working
on this a while back.
Anyway, you might want to write a document on the wiki detailing what
you intend to do. Really the material node system needs a comprehensive
usability review, with suggestions on what new nodes are needed, etc.
The current paradigm of using nodes to blend materials together should
be kept, IMHO, but I also think there should be support for writing
shaders from scratch, too.
Keep in mind, I don't think a material node network is executed once for
every light. I believe the network is only executed once per pixel,
when each component material has been fully calculated. If you added
something like a light node, you'd probably have to write code to detect
it, and if it exists, to execute the node network once for each light,
accumulating the result. It might be complicated.
joeedh
More information about the Bf-committers
mailing list