Surface Luminance

Does anyone know anything regarding the Surface Luminance node.
How does it calculate the value it outputs, what is the output (a single value or an array of values), when does it calculate this value, and can you hook the output of the node to an objects geometry attributes, such as translation or whatnot.

Thanks in advance for any info.

Novy Dhillon
Radical Entertainment Inc.
Vancouver BC.
ndhillon@radical.ca

I think you are out of luck if you wish to hook this node into geometry. It outputs general diffuse light intensity for
a surface in a lambertian fashion. It works in the context of shading node evaluation. The input light data and surface normal parameters are set every shading sample by the render engine. The render engine knows of several attribute types by name, such as normalCamera, and it automatically sets these attributes before evaluating a shading network for a given sample. Thus it relies on the context of the scanline rendering.

You could try creating a looping script or expression where you set all the input values with setAttrs and get the output with a getAttr, but I'm not sure this can be made to work because you cannot properly define the light data info in mel.

Hi Novy

I've been playing around with surface lumanance for a few days, but have yet to get it to work. I haven't been able to get it to output anything other than 0. Does anything special need to get set up in the scene before it will work? I was just using a basic spotlight shining on a sphere.

Perhaps I am misunderstanding the purpose... I had assumed that it would return a vlaue that was indicitive of the amount of light shining on the surface... Is this the case?

-e-

The value will only change when you render the scene.
If you use the connection editor. Connect the outValue of the surfaceLuminance to the in value of the material node.
to test try this. Connect surfaceLuminance.outValue to Lambert.colorG. This should give you a green value that depends on the amount of light hitting the surface.

Novy Dhillon
Radical Entertainment Inc.
Vancouver BC.
ndhillon@radical.ca

Novy :

The result of surface luminance is a scalar value that represent the sin() of the angle between Light Direction and Normal of Surface ( Lambert's Cosine Law ), of course, this value changes at each sample point.

Given vector A ( Light Direction )
and Vector B ( Current surface Normal Direction in camera space )

scalar O=A*B ( Where "*" represents dot product between vectors.)

Math of Dot product:

float O = (lightDir.X*normalDir.X)+(lightDir.Y*normalDir.Y)+(lightDir.Z*normalDir.Z);

Result "O" represents diffuse component.

Martin
laupamar@satlink.com
wireData Plug-In Developer.