Wrapped Diffuse Lighting Model

General discussion about the development of the open source Blender

Moderators: jesterKing, stiv

Post Reply
Jogi
Posts: 0
Joined: Mon Oct 20, 2003 11:53 am

Wrapped Diffuse Lighting Model

Post by Jogi »

I was browsing www.rendermanacademy.com and noticed little modification to Lamberd shading code that would be nice in Blender too.

Here is the page: http://www.rendermanacademy.com/docs/WrapDiffuse.htm
And it seems like quite easy to implement.. (pseudocode..)

Code: Select all

Nn = normalize(N); 
illuminance( P, Nn, PI/2 ) { 
    Ln = normalize(L);
    Ci += Cs * Cl * Ln.Nn; } 
vs.

Code: Select all

Nn = normalize(N); 
illuminance( P, Nn, PI/2 ) { 
    Ln = normalize(L);
    Ci += Cs * Cl * (1 - acos(Ln.Nn) / wrappedangle); } 
}

edit: Or how about replacing the whole shading equation with presets settings & user editable equation.. :) well, mayby next year ;)

eeshlo
Posts: 73
Joined: Wed Nov 06, 2002 10:02 pm

Post by eeshlo »

For the case of a angle of 180 degrees, it is the same as the blender hemilight. But it can be a bit ptoblematic with shadows though.

Post Reply