Forum: Poser - OFFICIAL


Subject: Nodes for Dummies

RobynsVeil opened this issue on Jan 24, 2009 · 490 posts


RobynsVeil posted Sun, 25 January 2009 at 8:53 PM

Quote - Now I get really wacky.

I disconnect the Diffuse node, and build an equivalent from raw math.

The N node is key here.

The N node gives us information about our surface normal vector, N. Not only does it do that, but it  muliplies each component of N (using the parameters) with any values we like.

So if I plug in the components of L for an infinite light with yRotate = 45 degrees, guess what?

This node will give me the value of N dot L!!!

The normalized vector for such a light is approximately [ .707107, 0, .707107 ]. (1 / sqrt(2) is the component value)

The only complication is that we want this as a single number, not a tuple. So we have to plug that into a number. Whenever Poser converts a tuple to a single number, it averages the 3 parts. I.e. it uses (x + y + z) / 3. But we want (x + y + z). So we have to multiply that with 3 to cancel out the average.

This will give us Nx * Lx + Ny * Ly + Nz * Lz, which is our dot product between N and L.

I give you the shader and render. You may not believe it, but this produces nearly identical results to a "lit" prop, but you could completely delete your light here and it would still look like that.

I set it up and it did give exactly the same render, Bill. So, here we are doing what, exactly: simulating light behaviour with math nodes, then? What an incredible potential there!

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks