[Bf-committers] Proposal for unifying nodes

Brecht Van Lommel brecht at blender.org
Mon Jun 15 12:41:51 CEST 2009


On Mon, 2009-06-15 at 20:06 +1000, Matt Ebb wrote: 
> On 15/06/2009, at 7:38 PM, Aurel W. wrote:
> > 2009/6/15 Matt Ebb <matt at mke3.net>:
> >> No they're not. Textures need to be completely independent:
> >> coordinate in -> values out.
> > The problem is, with every node operating on more, than just the
> > current coordinate, as a filter node does, you would need to evaluate
> > the incoming texture on every coordinate, which is needed for the
> > calculation.
> Well, it's quite simple, you can't have things like filter nodes as  
> part of a shading pipeline after the texture has been evaluated. The  
> idea of 'the surrounding pixels' doesn't really even make that much  
> sense, especially when you're talking about 3d procedural textures.

I agree with Matt here, there's really no way to evaluate textures as an
image always, it can be part of an arbitrarily shaped surface, a
volumetric material, a texture influence field on particles, a 3d
painting brush, etc.

So if you're going to implement the filter functions here, I don't know
how to do this without doing extra texture evaluations, not to mention
what happens when chaining such filters. It could work more efficient
for exceptional cases, but not in general.

If you want to do blurring, the more efficient way to do that is by
scaling the texture derivatives up, and for sharpen scaling them down
(or doing an unsharp mask perhaps). Directional filters I guess you
could also emulate some way, but then you need to specify a vector for
this direction to make sense, seems a bit too specialist.

Anyway, I'm not sure there are that many cases where you actually
benefit from have such a function callback available? What kind of nodes
would you implement with them, if blur and sharpen could already be done
(in a bit limited from)?

Somewhat related, I think texture coordinates should perhaps be a
separate type, which would be a point and two derivative vectors. This
can be easily converted to a vector and back, but if you want proper
filtering while manipulating the texture coordinates, the derivatives
need to be passed along and transformed too.


More information about the Bf-committers mailing list