[tuhopuu-devel] Re: Minnaert diffuse shader

Alfredo de Greef eeshlo at yahoo.com
Mon Jan 10 04:00:47 CET 2005


I decided to join the mailing list.

First, to Jorge Bernal: your 'real' Minnaert shader is
not quite correct. For one, the result for raising to
a negative power is undefined, better to clamp to some
minimum value. The correct equation should be
something like:

nl * (k+1)*0.5 * pow(max(nv*nl, 1e-4), k-1);

for blender, the (k+1)*0.5 factor could be omitted, it
is for energy conservation.
Also note that when nl<=0, you can return early, the
result is zero. The 'legal' range for k is 0 to 1, but
I guess for artistic purposes it could be a bit
higher, but 50 as you seem to have in your code seems
too high. When >1 it starts to look more like a
specular model. As a velvet type material the nvidia
model might be more useful.

To Jonathan Merrit:
> It has been suggested that diffuse shading models 
> like this one may be 
> implemented "intuitively" using appropriately
> configured color ramps.
> Hence, I think it is valid to question whether a
> shading model like this 
> actually needs to be implemented explicitly.

I suppose you are referring to what I said about using
a ramp for a similar effect. I wouldn't call that
'intuitive', that was just my observation (and only
for k=0). It is just how my mind works, that is how I
started my Blender 'career', creating certain effects
others thought impossible in Blender. To others these
tend to be far from obvious and too cumbersome, a
shader would be much easier to use. So I think it
should be committed.

> I'm not sure who else is working on renderer-related

> stuff, but I've 
> fixed a couple of renderer bugs (which were only
> mis-matches in the 
> merge process). 

On renderer related things, I'd like to contribute to
tuhopuu, I might have some things to contribute at
some time. It probably is also best to start the
'external renderer framework' here.
How do I get 'officially' involved (if possible)?
Is the submit-patch-for-review-first method less
necessary here?

Alfredo


		
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 



More information about the tuhopuu-devel mailing list