PDA

View Full Version : Nodal-- more misonceptions by me

jeric_synergy
02-17-2011, 09:44 PM
So, here's a rather stream of consciousness thing I typed out while I was trying to understand a Displacement network that some people were kind enough to construct for me, but which I still don't really grok. Feel free to illuminate my misconceptions. It's long.....)
(attached are two jpegs, and the scene file in question)

It's no secret that I find Nodes exceptionally confusing. :cry: Here's my attempt to grok a simple displacement network, and put it in a vernacular that will be useful to further comprehension of just WTF is going on.
This network (below) allows you to rotate a suitable weighted mesh around it's #1 vertex. this was designed to be used specifically for pie charts.

(picture 1 goes here)
and just the network:

(picture 2, the detail, goes here)
Some people say you can read a network left-to-right, others say it's easier right-to-left. I suspect there's hidden information flows that require one to look both ways to comprehend what is going on.*

RIGHT-TO-LEFT (stream of consciousness)
(see "NEW INFO" in subsequent paragraph for clarification)
OK, what's confusing me: So, the DISPLACEMENT NODE says to its input, "Tell me where to put this spot I'm lookin' at." In this case, I'm thinking a "spot" is a point on the surface that would normally get rendered, i.e. would result in a pixel. (Actually, that doesn't make sense, because some spots on the surface would have been hid with no displacement. But, carry on...) The input says, "Displace the spot in question along this 3 dimensional vector." So, the Displacement Node is looking for a vector, 3 individual pieces of information, x/y/z.

NEW INFO: Displacement only works on vertices, so there's a finite number of points it has to evaluate, unlike, semi-potentially, "spots". So the displacement value only needs to be evaluated a less-than-infinite number of times to make this all work. So, the information is polled down the net work, once for each vertex, or each virtual vertex in an APS type situation.

So, the Displacement node queries the next node in the network, which in this case is the Rotate Node from Denis Pont's DPKit plugin set, the bane of my comprehension. Since the Rotate Node has two inputs, it 'knows' it has to go get these two values. So, it goes gets the Center value, which in this case is a static value, but since it is a World value, will track with the object, so the object could be animated and this would all still work.

(CONFUSION AHEAD WARNING) Now, the ROTATE input of the Rotate Node could require only a scalar value. But it's color coded blue, which seems to be the code for 3 value vector: this could be true if two values were used to establish an axis, and the third used for the rotation value around that axis. Or something. I dunno.

Anyway, what IS being fed the Rotate Input is from the Gradient Node. The Input to the Gradient Node is the Weight Map, a list of values associated with all the vertices of the mesh. So when you query a specific vertex, you get a value that is the Weight Map value for that vertex (was that circular?). *It's like the Displacement Node reached over the other nodes, poked the Weight Map Node, and said "Output the value for vertex #75", which is then handed to the Gradient Node's Input.

The other input to the Gradient Node is a Vector x/y/z value which has ONE of the 3 values, the X value, varying due to an envelope. For some reason, the value that corresponds to a full rotation is 6.27. WTH? The envelope drives the Gradient's Key(1) Color---- huh?

At this point I'm just totally lost. What is the function of the Gradient Node? It's obvious it's driving the rotation of the vertices, scaled by their W.Map values, but I just don't get how that is being accomplished.

Thanks for anyone kind enough to explain this to me in a way I can actually absorb and comprehend.

:help:

jameswillmott
02-17-2011, 10:10 PM
The gradient node is just remapping the output of the weight map.

The value of the weight map, from 0 to 1, is processed by the gradient, which maps an input of 0 to an output of 0 and an input of 100% to an output of X, where X is the input from the Vector node, the one with the envelope. All other values are interpolated inbetween 0 and X.

As the animation proceeds, the value of X increases, which means values of 100% in the weight map are mapped to this new higher value, with all the other weights spread evenly down to 0. Therefore weights of 100% correspond to a value defined by the envelope X, the other values are interpolated smoothly from X to 0.

The reason that Color is being driven on the Gradient node? A neat 'feature' of LW nodes is that most of the inputs are not 'prejudiced', you can feed a color into a vector, a scalar into a color etc, and it mostly behaves nicely. Feeding a vector into a Gradient via a Color input is a neat way of blending between vectors, for example bump maps of morphs. It's a little confusing but try to imagine colours and vectors and nothing more than a triplet of numbers and you can pass one as the other to most nodes ( Bump input on the Surface node won't take a colour, for example )

I hope that explains it?

A value of 6.27 corresponds almost with a full rotation about a circle, in radians.

jameswillmott
02-17-2011, 10:11 PM
Now, the ROTATE input of the Rotate Node could require only a scalar value. But it's color coded blue, which seems to be the code for 3 value vector: this could be true if two values were used to establish an axis, and the third used for the rotation value around that axis. Or something. I dunno.

I think the rotate node takes a vector and treats it as Heading, Pitch, Bank.

RebelHill
02-18-2011, 02:58 AM
yeah...

vectors are arrays, or matrices of three values... xyz, hpb, etc... and colours are the same with rgb.

Thats why you can cross wire vector and colour tools together, cos each is just working on a 3 value array <a,a,a> unlike scalars or integers which just hold a single value <a>.

The node section of the manual is pretty well documented for which kinds of input/outputs can be crosswired and why.

jeric_synergy
02-18-2011, 01:26 PM
James, thanks so much!:

The gradient node is just remapping the output of the weight map.
This explanation was VERY valuable to me: the idea that a gradient can be used to proportionately remap to a VARYING target is something I would never have thought of. Just puzzling at the connections doesn't make it clear to me, but assign it a functional label "Remap Varying Value" totally works for me (and people who think like me).

The reason that Color is being driven on the Gradient node? A neat 'feature' of LW nodes is that most of the inputs are not 'prejudiced', you can feed a color into a vector, a scalar into a color etc, and it mostly behaves nicely. Feeding a vector into a Gradient via a Color input is a neat way of blending between vectors, for example bump maps of morphs. It's a little confusing but try to imagine colours and vectors and nothing more than a triplet of numbers and you can pass one as the other to most nodes ( Bump input on the Surface node won't take a colour, for example )
So, it's just a straight "here's three numbers"? Sometimes it seems the vectors/triplets are applied in places that would only take one or two numbers as input: in that case, does it only regard the first, "x" value and toss the "yz" values?

A value of 6.27 corresponds almost with a full rotation about a circle, in radians.

Many thanks.
++++++++
Rebel, what do you call a TWO number array?

RebelHill
02-18-2011, 02:19 PM
there are no nodal inputs/outputs in LW that use a 2 number array (or 4 or 5, etc). 1 and 3 only. (well, there are a couple thigns that handle UV co-ords, which are jsut 2 values, but they still use a triplet but with the last value at 0)

jeric_synergy
02-18-2011, 05:19 PM
Huh. I would have thought things like axes of rotation could have profitably used a .... oh wait, that would be 2 3-value things.

They just got lazy with UV. All those wasted place holders, it's a shame really.

RebelHill
02-18-2011, 06:18 PM
a radian is an arc length (chunk of a circles circumfrence) who's length is equal the radius of the same circle.

n radians X (180/pi) = n degrees

dwburman
02-18-2011, 07:09 PM
I think when you plug a vector or color node into a scalar input, LW takes only the first channel. While I'm not 100% sure about that fact, I do remember reading about it in the manual. I was going to give an intro to nodes talk at a Seattle LW user group meeting, but it got canceled at the last minute. It's been a while since I read that chapter so it's not so fresh.

If I remember correctly, the manual does a decent job describing the node environment. It's a different story when it comes to describing what a particular node does and how to use it.

jeric_synergy
03-28-2011, 01:29 PM
The value of the weight map, from 0 to 1, is processed by the gradient, which maps an input of 0 to an output of 0 and an input of 100% to an output of X, where X is the input from the Vector node, the one with the envelope. All other values are interpolated inbetween 0 and X.
By "processed" do you mean "multiplied"? Is the "Input" input (geeze) always multiplied (when Blending mode is "Normal") to the START value of the gradient? --what exactly does the Input input drive inside the gradient?? (very confusing)

BTW, I found that when feeding a Vector input to a key color, only the first value is considered, i.e. the Red channel.

shrox
03-28-2011, 04:02 PM
Nodes, my bane as well my friend...

hcoat
03-28-2011, 11:14 PM
They just got lazy with UV. All those wasted place holders, it's a shame really.

UV is actually UVW, technically it is a vector. UVW is the same as XYZ, except it is used as a coordinate system for the mapping of a polygons. It would be very confusing to have XYZ in an XYZ, so gladdly UVW is used instead. Typically W is equal to 0 and that is why it is referred to as just UV.

jeric_synergy
03-28-2011, 11:54 PM
Nodes, my bane as well my friend...
I just hate applying them blindly with assistance, and having them work, and not understanding how to construct the network myself.