1 Tutorials LightWave 3D Texturing 102: Gradients & External Parameters Qua Jan 26, 2011 1:51 am
Admin
Admin
by Gregory Duquesne | |
Gradients and External Parameters We have seen in the "pink dots" example how we can relate a texture to a surface geometry, in that case: the slope. This is just one example of the many parameters that gradients can deal with. The list of parameters available to a gradient will depend on the texture context, that is what the texture is being applied to. For instance a gradient applied as a texture on a volumetric light will have the following parameters:
Now if you have a gradient on a HyperVoxel particle age you will get the following parameters:
The parameters are different because the nature of what is being textured varies a lot from a surface, to a point in a volumetric light, to a hypervoxel particle. Because all these things are very different in nature their offer different parameters to use. One parameter that is always available for any gradient is "Previous Layer", if we take the pipe line analogy that we discussed earlier, that simply means that the gradient is going to use the output from the previous layer coming down the pipe. Here is an example of what it does on a turbulence procedural layer: <table align="center" border="0" cellpadding="0" cellspacing="0" width="160"> <tr> <td></td> </tr> </table> By doing this we did something that is very common in procedural texture schemes, we remapped the values created by the "Turbulence" function to the color values set by the gradient. This way it is very easy to simulate marble for instance. We canot describe all the different parameters here, but here is a list of some of the most interesting ones and the effects they can achieve: <table align="center" border="1" bordercolor="#cccccc" cellpadding="10" cellspacing="0" width="466"> <tr> <td align="left" valign="top"></td> <td align="left" valign="top"> Bump: This parameter sets the color based on the bump amplitude. This is a great way to enhance realism for rock textures, lava effects, etc. </td> </tr> <tr> <td align="left" valign="top"></td> <td align="left" valign="top"> Incidence Angle: This can be used to simulate the Fresnel effect. The good thing about it is that you can apply it on every channel and control the curve by just adding keys. In this example transparency and reflectivity are modulated using the incidence angle parameter. </td> </tr> <tr> <td align="left" valign="top"></td> <td align="left" valign="top"> Light Incidence: This parameter is the same as incidence angle but seen from a light instead of a camera. In principle, cel shading could be simulated using this input parameter </td> </tr> <tr> <td align="left" valign="top"></td> <td align="left" valign="top"> Particle Age: This parameter is available for HyperVoxels only. It is very useful to change particle properties such as color and density over time. In this example, the texture amplitude and color are changed with the particle age, at age 0 the texture amplitude is null and the color is white, at age 1, the texture amplitude is 100 % and the color is orange. </td> </tr> <tr> <td align="left" valign="top"></td> <td align="left" valign="top"> Weight Maps: This parameter uses the vmaps from an object. It extracts the value of the vmap at the current location and uses it as the input parameter. </td> </tr> </table> The great thing about weight maps is that you can use them as a way to "paint" values on your geometry that you can later interpret using gradients in displacement, color textures, etc. Here is a simple vmap on a plane (this is a top view). By applying a displacement texture that uses a gradient with the weight map input parameter will give the bottom results: <table align="center" border="0" cellpadding="10" cellspacing="0"> <tr> <td></td> </tr> <tr> <td></td> </tr> </table> In the previous example we could have used the gradient as an alpha channel on a procedural displacement texture (the way to do that from the example above would be to add a procedural layer and move it below the gradient layer), therefore limiting the displacement texture to the red areas of the geometry with a nice natural falloff where it becomes green. The same idea can be used for setting the surface color or anything that can be textured on a surface. In that respect, the weight map really acts like a built-in image map, used in conjunction with textures it can be a really powerful tool. Up Next: Texturing 103: Creating a Landscape |