What is a spot

From LightWiki

Jump to: navigation, search

Several people have asked what the Spot in "Spot Info" in LightWave v9's Node Editor refers to. Michael "Lightwolf" Wolf provides the answer:

A spot is basically just that, a point on your surface that is being evaluated.
Raytracing visually explained including UV coordinates
Raytracing visually explained including UV coordinates

LightWave casts one (or more) rays per final image pixel into the scene of 3D objects. Once that ray hits a surface, it needs to evaluate the surface properties on the point where it intersects said surface. That point of intersection is (to put it simply) the spot.

If you use AA (anti-aliasing) LightWave casts more than one ray per final pixel, resulting in a spot evaluation each (since the rays point in slightly different directions, the intersections and thus the points will be at slightly different locations).

Also, when rendering reflections and refractions, LW needs to compute the surface values where the reflected/refracted surface is hit as well. This can result in more than one spot being rendered per ray.

As far as nodes are concerned, the spot is a location in 3D space, which is the location where the ray has hit the surface. Basically, the whole node set-up of a surface (as an example) gets evaluated once per spot. So, any of the inputs/outputs can be different for every spot. In the case of texture layers, some values are only evaluated once per frame, for example the position of textures. This gives you a lot more power in the node editor, you could for example change the position of a texture at every spot (using another node that depends on "Spot Info" for example) - something that is not possible using the traditional approach. The downside is that the nodes need to calculate more data per spot than texture layers do, making nodes a bit slower to evaluate. In terms of displacement, the spot would be the current vertex being displaced.

A spot also has a few other properties (such as a size) that are really only interesting for developers. Think of a single final image pixel being projected into the scene as a cone (just like the camera frustum visible in Layout, but only starting from a single pixel). This cone will cover a larger area the further away from the camera it is. Once this cone intersects an item, the intersection (likely elliptical) will have a certain position and size (as well as a shape depending on the angle of intersection).

Views
Personal tools