[Bf-committers] Proposal for unifying nodes
roblovski at gmail.com
Mon Jun 15 17:22:10 CEST 2009
2009/6/15 Brecht Van Lommel <brecht at blender.org>:
> I mean the system of passing functions rather than vectors or color
> values. What kind of node does this make possible, which is not possible
> without passing functions?
> My point is, that I can't really think of one with practical use.
> Simpler things like blurring or sharpening can be done with texture
> derivatives, more advanced things seem to be inefficient or difficult to
> the point of not being useful in practice.
Oh, okay. To name a few: Rotation, translation, scale.
But that's only part of the reason why functions are the right choice.
Let's imagine we're passing color values directly instead. Obviously
if the ultimate output from your tree is going to be a color value,
this requires the tree to be evaluated in the context of a given set
of coordinates. The tree itself then 'is' the texture; you call, for
example, evaluate_texture_tree(mytree, mycoords). And once you're
doing that, you're back to separate tree types!
To put it another way, passing color values requires the evaluation of
the tree to be 'tied' to some particular interpretation of the tree,
which is what we should be trying to get away from. If your texture
node only passes out a color value, what good will it be in a shader
or compositor tree?
Having the node output the texture itself as a functional type solves
all these issues.
More information about the Bf-committers