PDA

View Full Version : Nodal concepts/theory explanation??

jeric_synergy
01-14-2011, 01:47 PM
I find nodes really hard to wrap my head around, especially the "SpotInfo" type nodes, and especially the use of same in Displacement.

Anyone got links to a nice clear explanation of what's going on in there? I'm not looking for a tutorial, but something that will cover the concepts of the whole nodal..... thing.

Thanks!

Tobian
01-14-2011, 02:09 PM
So you want someone to write an explanation of the whole of the nodal system? Uhm no :p

Sensei
01-14-2011, 02:28 PM
I find nodes really hard to wrap my head around, especially the "SpotInfo" type nodes, and especially the use of same in Displacement.

In Object Displacement context the only things in Spot Info that are useful are Object Spot, World Spot and Normal. The others are meaningless not initialized.

Anyone got links to a nice clear explanation of what's going on in there? I'm not looking for a tutorial, but something that will cover the concepts of the whole nodal..... thing.

Weird question. It's like asking for concept of mathematic. Who needs mathematics, knows it.
Example from real world - you have room that needs wood plank floor, so you have to use math to calculate how many planks buy in shop, and multiply width * height of room + some spare..
The same is with nodes- you need to change color or attribute f.e. distance to other element(s) in scene, so you're using Math > Vector > Distance.. etc etc
if distance == 0.0 has to give red, and distance == 10.0 m has to give blue, then you're using output from Distance node as input to Gradient. etc. etc.
Whatever you like in wanted by you order..

wrench
01-14-2011, 02:30 PM
And besides, explaining the Spot Info node theoretically is like explaining Quantum Physics - a spot is an area of an image occupied by a surface in an image that has not yet been rendered and so does not exist yet.

B

RebelHill
01-14-2011, 03:16 PM
The concept of nodes is kinda self evident is it not?? I mean the "concept" is basically the same as what is more commonly known as a "flow chart"..

funk
01-14-2011, 04:03 PM
I have the basics down with nodes, but yeah stuff like spot info still has me confused.
The LW docs havent helped at all. What Id like to see is usage examples! No better way to learn :)

cagey5
01-14-2011, 04:09 PM
Example from real world - you have room that needs wood plank floor, so you have to use math to calculate how many planks buy in shop, and multiply width * height of room + some spare..

If that's your equation for calculating floor area then I'd stick to the day job.. :thumbsup:

RebelHill
01-14-2011, 04:20 PM
Well, spot info for example, is pretty clearly described in the manual...

-------------------------------------------------------------------------

"First let’s define what a “spot” is. A spot is just a spot - a fleck, a
pinpoint. You can think of a spot as a single element area that is
calculated or evaluated, on a surface and that is arbitrary in size. Any
given spot contains several types of data including color, normal
angle, the direction that a ray is coming or going from relative to that
spot, and etc.
Remember Node Editor is a surface texture and shading editor so the
word spot here pertains to the spots of an objects surface. Spots are
a useful primitive type for texture design, because, in general, the
relations between features of the spot and features of the texture are
straightforward."

------------------------------------------------------------------------

So from that, we can see that a "spot" is basically just that, a spot on the surface of a mesh... You can evaluate a spot to take information from it, colour, normal, etc.. and use that info/value to plug into other things... Or you can just use the info of which spot is being examined to apply something, colour, displacement, whatever to that spot of the mesh...

But how to know which spot is actually being examined... well the truth is... all of them... every possible spot on the surface of that mesh. Ok, yes, taht would be infinite... so for the majority of purposes, since the meshes we use are made out of polygons, each spot can be thought of as a single polygon.

So in the case of displacement, for instance... You apply a UV map to the mesh (which is fitted to the mesh via its UV co-ords), and the spot info measures the normal direction of every spot, on every polygon, to tell LW which direction the displacement should be pushed away from the surface at each of those "spots".

Tobian
01-14-2011, 06:28 PM
Cagey I hope your day Job isn't selling wood flooring, as that's exactly how you do it :p

it's really difficult for many of us to explain the how's and wherefore's of Nodes. Quite often I open node flows and have no idea what they are doing, and have to work it out. Most of the time, it's just about maths nodes, and the point of them. I certainly never did vector maths in 3D at school (well it was so long ago, I can't remember if I did hehe). so it's hard to get your head round a lot of it, and even when I do, I then find it really hard to re-explain it back, because I understand it on an artistic level.

The spot node is probably one of the most complex nodes in the system, so it's a difficult one to get! it's multifunctional, and each output is for a different type of thing!

Think of the spot node as a 'get info about here' node.The type of data that's being got is colour coded in LW. Blue is vector information (xyz), red is colour (rgb) green is scalar (single channel, grey-scale), and pink is a integer (whole number). These bits of data are often used in other things, without having to get them from the spot node, you can do some unique things with these little bits of 3D scene information.

With the vector data points, You can find the world space or local space of a bit of geometry, and then transform that, or use it to drive a texture, or move some geometry. find out where a ray is coming from, or going too, or measuring between objects of other points in 3D space. Normals are the direction a surface is facing, which is important for doing stuff like displacement, multiplying it with a texture height to get a displacement from the normal, rather than a single direction. Most shaders and 3d textures with bump output already assume the normal information anyway, but it's useful to be able get back to it for surfacing.

The pink integer outputs are really interesting for rendering mostly, because they pertain to specific data about rays which fire child rays, in ray casting or ray-tracting functions. for example. if a ray is reflecting in a scene, it might recurse a number of times off reflective or radiosity bounces, or through transparent objects, from he camera. because we can get at that spot info we can transform it or use it to drive anything that effects, like controlling the colour of child rays, adding or subtracting information. They all do the same basic things, 'bounces' being generic and the others pertaining to specific things, and it's what I use to do some reflection bluring optimisation tricks, using either gradients or logic nodes (telling a ray to return X after N bounces limits the recursion independently of the global ray recursion setting.

Trouble is I only know what I've thought up uses for, and there's a load of extended spot info nodes to do things I don't understand either. Like most people I just picked up a bunch of tricks :)

Matt
01-14-2011, 09:12 PM
I asked about the SpotInfo node in a thread quite a while ago (before I joined NewTek) and someone kindly explained what each of the outputs meant in lamen terms, I've tried searching for it, but I can't find it.

Edit: It was probably you Tobian! :)

One of the things I really want to do is create more diagram based explanations of more difficult concepts in LightWave, and this would extent to nodes.

It's just finding the time! Here are some examples I found that I did that shows the kinda of explanations _I_ would want to see (some are not node related)

Bear in mind these were done when I was on "the other side" :D Are probably out of date now, were never finished (hence the crap layout) but you'll get the idea!

Tobian
01-14-2011, 09:22 PM
Nah there are people who understand this stuff much better than me, and I don't know what they all mean :D it doesn't help that they aren't even all in the manual, because they increased the number of outputs since 9.0 :) Maybe they can do an expanded explanation for the 10 manual :)

Sensei
01-14-2011, 09:27 PM

Mr Rid
01-15-2011, 01:06 AM
...something that will cover the concepts of the whole nodal..... thing.

Lemme know when you find it. I continue to scratch my head over nodes, poking at them with a stick til something happens. Here and there are scattered tuts and posts that usually describe how to achieve one effect. Its like a crate of curious components with wires and doodads hanging off each, dumping them on the floor and trying to figure out what plugs in to what in order to do huh?

jeric_synergy
01-15-2011, 01:48 AM
So you want someone to write an explanation of the whole of the nodal system? Uhm no :p

Meanwhile, several people here have stated they also have troubles with nodes, so it's not like I'm alone.

Matt
01-15-2011, 04:22 AM
So, STFU if you can't help.

He just did help, calm down Jeric, no need to start a fight!

Group hug everyone! :)

cagey5
01-15-2011, 04:36 AM
Cagey I hope your day Job isn't selling wood flooring, as that's exactly how you do it :p

Well I'm just an amateur so I usually measure the Width and the Length of the room and not worry too much about how high the room is, but what do I know... carry on. :thumbsup:

3DGFXStudios
01-15-2011, 04:43 AM
He just did help, calm down Jeric, no need to start a fight!

Group hug everyone! :)

I got banned for talking like that :bday: and I didn't even get a hug when I said sorry :(

:D

Tobian
01-15-2011, 07:26 AM
Consider me S'ing T F U then :p If your looking for existing explanations, then I suggest you try http://lmgtfy.com/?q=lightwave+nodes

you know I had a load of good explanations I thought up last night, but now, I think I won't bother.

Tobian
01-15-2011, 07:36 AM
Well I'm just an amateur so I usually measure the Width and the Length of the room and not worry too much about how high the room is, but what do I know... carry on. :thumbsup:

he must be using 3DS Max system for measuring :D X x Y instead of X x Z :)

Kuzey
01-15-2011, 07:38 AM
Consider me S'ing T F U then :p If your looking for existing explanations, then I suggest you try http://lmgtfy.com/?q=lightwave+nodes

you know I had a load of good explanations I thought up last night, but now, I think I won't bother.

That's a shame indeed...but totally understandable!

:D

Kuzey

JeffrySG
01-15-2011, 07:40 AM
Consider me S'ing T F U then :p If your looking for existing explanations, then I suggest you try http://lmgtfy.com/?q=lightwave+nodes

you know I had a load of good explanations I thought up last night, but now, I think I won't bother.

Feel free to PM them to me Tobian! :)

Yes, let's all hug this out like Matt said! This is a great thread already and there have been a ton of great explanations so far from many people including Tobian - which have opened my eyes as well. Let's definitely keep them going!

The only 2cents I can add is that since having VPR in v10 I've had it a little easier with the nodes as I can see my results much quicker and try different combination and settings easier. Many times I'll plug different outputs into the main color input just so I can 'see' whats going on by getting a visual of the math that is going on.

JeffrySG
01-15-2011, 07:42 AM

I'll have to too look at that! I didn't know about it at all. Although I have a feeling it will be very mathematical/technical in explanation. Thanks for the info!

omichon
01-15-2011, 08:18 AM
Here is a clear explanation of the spot info node and its outputs, from Weepul :

Matt
01-15-2011, 10:07 AM
Here is a clear explanation of the spot info node and its outputs, from Weepul :

THAT'S the one I was looking for! Thanks! :)

Tobian
01-15-2011, 10:31 AM
It's in some sort of private area I can't view BTW.. probably the 9.x Beta area, which (for some reason) I don't have access too, so others may also not be able to view it..

JeffrySG
01-15-2011, 10:40 AM
It's in some sort of private area I can't view BTW.. probably the 9.x Beta area, which (for some reason) I don't have access too, so others may also not be able to view it..

Here's the text from the first post:

First of all, the definition of a "spot":

The pinpoint location on geometry that is being sampled by any ray. For example, if a camera has no AA, each pixel is one ray and the exact location that's hit by that ray is a "spot" and the Spot Info node will give info about that "spot".

Object Spot: the coordinates of the spot relative to the object file. Example: a 1 meter cube that was shrunk to <0.1, 0.1, 0.1> in Layout would still output a value up to <0.5, 0.5, 0.5> at the corners.

World Spot: the coordinates of the spot relative to the scene's world coordinates, after the object has been moved, rotated, resized, deformed, etc.

Spot Size: an approximation of the area the spot represents. Even though each spot is infinitely small, it often would still represent an area, like a pixel. I don't know how that's calculated and is mostly useful for programmers making procedural textures.

Ray Source: the coordinates that the incoming ray came from in world space. Examples: if the camera has no DOF, the Ray Source output would be the location of the camera for each of the rays the camera uses to trace the scene. For an object seen by a reflection, it would be the location of the point on the reflective surface that can see this spot.

Ray Length: how far the ray went; the distance from the Ray Source to the World Spot.

Ray Direction: the normalized direction vector of the incoming ray.

Geometric Normal: the unsmoothed, unbumped surface normal vector of the geometry at that spot in world space.

Smoothed Normal: the surface normal vector of the geometry at that spot including any surface smoothing, but ignoring any bump, in world space.

Normal: the surface normal vector of the geometry at that spot, including surface smoothing and bump mapping.

Incidence Angle: the cosine of the angle of incidence between the ray and the surface normal. Equivalent to the dot product of the Normal and the Ray Direction, multiplied by -1. Same thing as the Gradient > Tools > Incidence node's default settings.

Incoming Eta: the refractive index of the incoming ray, so for example if you have an object embedded in glass with IOR 1.5, this value would be 1.5 when that object is seen through the refraction. Plain rays have the IOR of vacuum, which is 1. If a ray exits a glass object, it would return to 1.

Polygon Side: outputs a value of 1 if the ray sees the front of a polygon, and 0 if it sees the back (eg. when using Double Sided.)

Bounces: the index of the current ray bounce. Initial rays from the camera are bounce 0, then for example after one reflection it would be 1, then if it reflects again it would be 2, etc. Does not change for diffuse bounces of radiosity rays.

Preview: outputs 1 if the incoming ray is sent by a "preview", basically VIPER and the little previews in the node editor and surface editor. Otherwise, outputs 0.

Shadow Ray: 1 if the incoming ray is a shadow ray, 0 if not. Example use: making an opaque object cast a partially transparent shadow or a tinted shadow, for special effects.

Sampled Ray: 1 if the incoming ray is a "sampled ray", 0 if not. "Sampled rays" are typically any ray that's part of a group of multiple rays. For example, if a surface appears in a blurry reflection that's set to send out 8 rays, this will let you know. Blurry refraction and radiosity rays are, I think, the only other "sampled rays". Maybe the shadow rays for area lights/linear lights/etc. also - I don't know.

Radiosity Ray: 1 if the incoming ray is from radiosity, 0 if not.

Preprocess: 1 if the incoming ray is from preprocessing, 0 if not. Preprocess rays are cast for the previews during preprocessing of radiosity or SSS, or interpolated reflection/refraction.

How did I learn all this? Experimentation, reading some of the SDK, and some experience writing LScript shaders.
__________________
.

UnCommonGrafx
01-15-2011, 11:33 AM
I have often looked at the other apps tutes for explanation of things. Often, they are the same; more often than not, lw is different in some way.
Dponts tools really (x100) mess up LW's understanding of nodes. (On re-read, you gotta understand this is good (x1000) for lw!) To that end, Houdini comes closest to an explanation of nodes. Umm...without the global nodality. The killer in the present lw system.
Nodes can be explained; nodality and a global nodal system represent another explanation. I LOVE Matt's examples of nodes.
Wouldn't it be nice to do one to control 1000? Global nodalness would get us that. Core. LW with an Houdini and Blender underpinning...

jeric_synergy
01-16-2011, 12:31 PM
Here is a clear explanation of the spot info node and its outputs, from Weepul :

For some reason that is a sequestered post, as in:

jeric_synergy
01-16-2011, 12:37 PM
Here's the text from the first post:

First of all, the definition of a "spot":
.
thanks Jeffry -- nice to get an answer rather than someone redundantly informing me they wouldn't be helping me.

JeffrySG
01-16-2011, 04:03 PM
thanks Jeffry -- nice to get an answer rather than someone redundantly informing me they wouldn't be helping me.

No problem but to be clear I was just re-posting what olivier MICHON had posted but some people had problems viewing that thread. The info came from Weepul in the original thread. :)

I tried to put it in a quote box originally but couldn't do it on the iPhone when I was making that post.

So real thanks goes to Olivier and really Weepul! :thumbsup::beerchug:

jeric_synergy
01-16-2011, 07:24 PM
I tried to put it in a quote box originally but couldn't do it on the iPhone when I was making that post.
You're living in the future, dood! :thumbsup:

omichon
01-17-2011, 12:46 AM
thanks Jeffry -- nice to get an answer rather than someone redundantly informing me they wouldn't be helping me.

I used the regular search option from this forum to retrieve this post.
I don't know what is wrong on your side with this post, but I just wanted to help here.

jeric_synergy
03-24-2011, 04:46 PM
I'm following one of Bryphi's tour-de-forces of nodal programming, it's all displacement, and at 13:06 he drops in a SpotInfo node.

Someone above mentioned how confusing they found nodes (too), and IMO this is one of the things that contribute: it would seem (to me) that a "Spot" in the surface sense is quite different from a "Spot" in the displacement sense. So that, using the same named node for these two different functions is confusing to this user.

Perhaps mathematically it makes perfect sense, but to me it's just adding to the (popular) confusion surrounding nodes. Because while a surface is continuous, Displacement only occurs at discrete locations (the points), so how can the same node apply in both cases? 8~

Obviously, it can, but that doesn't make it less confusing.

wrench
03-24-2011, 04:50 PM
Suggest an alternate Jeric? It has to encompass everything that Spot Info covers - not an easy task.

B

RebelHill
03-24-2011, 06:16 PM
while a surface is continuous, Displacement only occurs at discrete locations (the points), so how can the same node apply in both cases?

Because a spot is a spot... its not a point, or a polygon, or anything else... its just a spot.

What spot info does is deliver info about things going on at a certain spot... If you're talking textures, then spot info is pulling info about a pixel that is at a given spot... if you're talking displacement then its the info about point or polygon at each given spot, such as its normal, or index.

jeric_synergy
03-24-2011, 06:43 PM
Suggest an alternate Jeric? It has to encompass everything that Spot Info covers - not an easy task.B
It's not like I have a better idea, it's just that I find the application of a tool that seems to address two totally different concepts (continuous surfaces versus discrete points) baffling. IMM, it's like applying a thermometer to a sound.

It's like I'm missing a very basic foundational piece of the nodal puzzle.

Sensei
03-25-2011, 01:12 AM
Spot Info and TrueArt's Extended Spot Info (http://www.trueart.pl/?URIType=Directory&URI=Products/Plug-Ins/TrueArt%20Node%20Library) nodes contain informations which are send from Node Editor (NodeEditorFuncs LWSDK global) to node evaluation function. Who is using Node Editor, is initializing this structure (LWNodalAccess). If environment which is evaluated by Node Editor, doesn't have equivalent of some information, it's just set to zero. Like f.e. Bounces or Pixel X, Y, in Displacement environment - spot is evaluated at currently processed vertex, so it doesn't have specified location on render image, and it's never using recursion (displacement nodes can't use ray-tracing functions, and therefore probably be executed another time in higher level of recursion).

If f.e. there is environment which is using Node Editor has to generate image 640x480 pixels, evaluate will be executed 640 * 480 times (if no AA, and no bounces) = 307200 times. And Pixel X/Y fields will be initialized with currently evaluated pixel in this image.

Because while a surface is continuous

For renderer surface is group of spots. How many depends on distance from camera. In the best case triangle is hit by just one ray, and only one evaluate is done on whole triangle. In the worst case, triangle is covering whole render image, and is evaluated width*height*aa passes+(not possible to count) evaluations from recursion times..

jeric_synergy
03-25-2011, 09:26 AM
So, if you're in the Surface Editor, SpotInfo evaluates pixels, and if you're in the Displacement Editor, SpotInfo evaluates points?

+++
Is it useful to think of Nodes as a kind of Expression, and that every entity capable of evaluation in a given network on a given frame is evaluated automagically? That seems kind of Expression-like to me.

Captain Obvious
03-25-2011, 09:54 AM
So, if you're in the Surface Editor, SpotInfo evaluates pixels, and if you're in the Displacement Editor, SpotInfo evaluates points?
No.

The spot info node doesn't evaluate anything. It tells other things what to evaluate. You can think of the spot info node as "this thing right here" no matter what you're doing. To keep going with some kind of carpentry analogy, the spot info node gives you information about the thing you've currently got in your hand, regardless of what it is.

So, with displacements...

Suppose you've got a turbulence procedural in a displacement setup. The displacement effect evaluates for each vertex. Suppose the turbulence uses something from the spot info node.

For each vertex, it checks the turbulence.

Each time it checks the turbulence, it checks the spot info node.

So when it's evaluating the displacements on vertex number 5123, it will check the turbulence node and the spot info node. The spot info node will return information about vertex number 5123. Its position, normal, whatever.

If you're using it in a rendering context, it does not give you information about the current pixel. It gives you information about the current... well, spot.

So, it kind of goes... (each > is a ray)

Camera > Surface1 (has reflections) > Surface2 (has GI) > Surface3 (STOP)

If Surface3 has a spot info node, the spot info node will give you information about the location where the last ray hit.

if Surface1 has a spot info node, it will give you information about the location where the first ray hit.

Simple. Spot info is just info about "the thing I'm doing now".

Oh, and all nodes are evaluated as many times as there are elements that need evaluation. With displacements, that means you'll get at least as many full node tree evaluations as there are vertices in the mesh. With surface shading nodes, it'll be at least one per AA sample per pixel, but with reflections, GI, etc, you'll be looking at tens of millions of full evaluations per frame.

jeric_synergy
03-25-2011, 10:07 AM
The spot info node doesn't evaluate anything. It tells other things what to evaluate. You can think of the spot info node as "this thing right here" no matter what you're doing. To keep going with some kind of carpentry analogy, the spot info node gives you information about the thing you've currently got in your hand, regardless of what it is.
Good stuff! Thanks.

(But anybody else feel free to chime in......)

jrandom
03-25-2011, 12:20 PM
I think Captain_Obvious hit all the necessary parts. The only thing I can add is that Spot_Size appears to output the area covered by the spot in square meters.

This means that spots closer to the camera will have lower values and spots farther away (or on surfaces at a sharp angle to the camera) will have larger values.

dwburman
03-25-2011, 01:50 PM
So... the Spot Info Node is the lens through which we can access the mathematical "surface" the an object?

jrandom
03-25-2011, 01:58 PM
So... the Spot Info Node is the lens through which we can access the mathematical "surface" the an object?

Pretty much. Spot Info outputs information about the point currently being evaluated for coloring during a render. The renderer shoots out a ray from the camera or (in the case of GI or reflections) a surface, and the intersection point of where that ray hits something becomes the current "spot", along with information about what it hit.

Technically, a spot has no size, but when a pixel's (or subpixel's) worth of information is being computed, the effective surface area of the spot is also provided. I'm looking at using this information to blend between a bump map and no-bump-map-but-higher-roughness-value to (hopefully) reduce the number of necessary AA passes on highly-detailed surfaces.