Quote from: PabloMack on April 24, 2010, 08:45:18 AM
After thinking about it some more, I must rescind some of what I wrote two posts ago. I think that many of the lines connecting nodes represent light (correct me if I'm wrong) and some of the nodes represent objects acting on the light. In such case, there is no Alpha channel to light because Alpha is a property of an object (or part of the object's surface) that acts on the light. And for realism, you would only connect a Blue light output into a Blue light input because light doesn't suddenly become another color unless it interacts with something that makes it change (i.e. an object/node). So I now think that node interconnects may never need to be broken up into channels. After all, we all want realism in our renders, correct? If someone really wanted to alter a light channel, he/she should have some sort of math node to pass the signal thru and do the adjustment inside the node. So if someones connects a light output to an inappropriate input on another node, the software should probably report an error an disallow the attempted change to the node network.
Well, actually your previous thoughts were close to how it works I think.
The reason I think not light is represented is because the light has no output to connect to the input of a surfacelayer/powerfractal/whatever
I'll basically try to tell my understanding how TG2 works, hold your breath
:
Terrain -> Shaders -> Planet
+
Atmosphere -> Clouds -> Planet
= Planet + (water +) Lighting
(water is an "object" and not a shader, that's why it isn't connect to the planet)
So:
In the terrain tab you set up the fractal flavours with which you want to create your landscape.
The fractal is generated inside the node and can either generate displacement(scalars) or colours. Depending on how you configure it. Here's roughly how:
Displacement: if you leave colours unchecked the internal fractal will not create colour, which you for example could use for texturing (in the shader tab).
the fractal is generated using the scale-definitions and the displacement parameters in the displacement tab. The colour settings in the colour tab do not affect the profile of the fractal. Only the scales and displacement settings do. Just try for yourself: start new file, and add a powefractal terrain. Go to the terrain fractal and adjust any of the colour-parameters. No effect.
If you want to have the colour-settings affect the displacements, then feed the powerfractal-output to the shader-input of a displacement shader. This shader allows for colour-based adjustments inside the powerfractal. You can control the displacement with the displacement shader.
The powerfractal probably generates scalars to build up the fractal's displacement and the displacement-shader converts the scalars to colours and that's why you can do colour-based adjustments of the powerfractal.
So basically the node which is being fed determines what happens with the data.
Therefore the breakup-shader, blendshader and colour-input of a surface-layer are programmed to use colour-data.
The displacement-input of a surface layer works similar to a displacement-shader.
The layer-child accepts both data-inputs, since you wouldn't want to discriminate between those two for the logica reason that you can do that with the shader you choose to use as a child.
When I use these principles it is also fairly easy to understand how you can use powerfractals for colour.
To go a bit further:
When you have generated the displacements in the terrain tab the you compute terrain. Why?
- Compute terrain computes the normals and texture coordinates of the geometry generated by the shaders above it.
The resolution of the computation is determined by the patch size.
Compute terrain allows for restriction to slopes (needs computed normals to determine vectors) and height (texture coordinates).
- Compute normal computes the normals of the displacements, so as mentioned this only allows for slope-restriction.
This can be useful if you want to do vertical/lateral displacements, since displacing in these directions demand a "known" normal to function correctly.
- Tex coords from XYZ computes the texture coordoinates/height-information, so allows for height-restriction.
The terrain and shader groups are a guideline for building the scene, that's why you basically generate and compute terrain in the terrain tab and use the computed normals + texture coordinates to texture the terrain in the shaders tab.
Once the terrain and textures are produced it is being fed into the planet-shader.
The planet-shader also has an atmosphere shader for the atmosphere and clouds.
These two are combined with the lighting-settings and generate the final outcome of the scene.
Sorry for the bit messy "quick" (took me half an hour though lol) write-down of how I see TG2 works and so far it works fine and logical to me.
Hope some of this helps.
Cheers,
Martin