Shader: "wood"

"wood"

ClassColour
Synopsis A solid texture corresponding to a wood pattern. The wood is based around the idea of having a tree trunk centred on a given axis with concentric rings of light and dark wood colours. This shader provides more subtle control over the pattern than the more basic "simple wood" shader. Using all the features of this shader it is possible to re-create the appearance of virtually any type of wood. For common types of wood such as oak, maple, birch, cherry and pine, however, specific shaders are provided which simply have the relevant values for the arguments pre-set (colour shaders "oak", "maple" and so on). It is recommended that, for most applications, you begin with one of these shaders and modify argument values gradually to achieve the effect you want. The arguments/features of this general shader are presented here so that you can see how to create your own specific types of wood if you desire. This shader also accounts for the appearance of random flecks or grains within the wood pattern, and for random perturbations of the ring pattern, which helps give a much more life-like appearance to the wood.
Arguments

"scale" Type: LtFloat
Default:0.01
Range:[ 1e-006, inf ]
Hint:[ 0.01, 1000 ]
"trunk centre" Type: LtPoint
Default:(0.0, 0.0, 0.0)
Range: [ -inf, inf ], [ -inf, inf ], [ -inf, inf ]
Hint:-
"trunk direction" Type: LtVector
Default:(1.0, 0.0, 0.0)
Range: [ -inf, inf ], [ -inf, inf ], [ -inf, inf ]
Hint: [ -1, 1 ], [ -1, 1 ], [ -1, 1 ]
"wood colour" Type: LtColour
Default:(1.00, 0.96, 0.8)
Range: [ 0, inf ], [ 0, inf ], [ 0, inf ]
Hint: [ 0, 1 ], [ 0, 1 ], [ 0, 1 ]
"ring colour" Type: LtColour
Default:(0.98, 0.85, 0.53)
Range: [ 0, inf ], [ 0, inf ], [ 0, inf ]
Hint: [ 0, 1 ], [ 0, 1 ], [ 0, 1 ]
"ring width" Type: LtFloat
Default:0.5
Range:[ 0, 1 ]
Hint:[ 0.1, 0.6 ]
"ring fuzz in" Type: LtFloat
Default:0.3
Range:[ 0, 1 ]
Hint:[ 0.1, 1 ]
"ring fuzz out" Type: LtFloat
Default:0.1
Range:[ 0, 1 ]
Hint:[ 0.1, 1 ]
"gnarl" Type: LtFloat
Default:0.5
Range:[ 0, inf ]
Hint:[ 0, 2 ]
"grain" Type: LtFloat
Default:0.0
Range:[ 0, inf ]
Hint:[ 0, 2 ]
"ring fuzz grain" Type: LtFloat
Default:0.3
Range:[ 0, inf ]
Hint:[ 0, 0.5 ]
"grain colour" Type: LtColour
Default:(0.15, 0.05, 0.05)
Range: [ 0, inf ], [ 0, inf ], [ 0, inf ]
Hint: [ 0, 1 ], [ 0, 1 ], [ 0, 1 ]
"grain scale" Type: LtFloat
Default:0.4
Range:[ 1e-006, inf ]
Hint:[ 0.1, 2 ]
Locationlishclas
Description A solid texture corresponding to a wood pattern. The wood is based around the idea of having a tree trunk centred on a given axis with concentric rings of light and dark wood colours.

This shader provides more subtle control over the pattern than the more basic "simple wood" shader.

Using all the features of this shader it is possible to re-create the appearance of virtually any type of wood. For common types of wood such as oak, maple, birch, cherry and pine, however, specific shaders are provided which simply have the relevant values for the arguments pre-set (colour shaders "oak", "maple" and so on). It is recommended that, for most applications, you begin with one of these shaders and modify argument values gradually to acheive the effect you want. The arguments/features of this general shader are presented here so that you can see how to create your own specific types of wood if you desire.

The orientation of the tree from which the wood is taken is specified by a point which lies on the axis in argument "trunk centre" and a direction vector pointing along the axis of the tree in argument "trunk direction".

An overall scaling factor is supplied in argument "scale", which determines the radius difference of two adjacent rings. 0.01 means that there are 100 rings per unit length along the trunk radius. Choose a value appropriate to the units in which your geometry is modelled. The default value is appropriate for modelling in metres.

The colour of the rings and the wood between the rings is specified in arguments "ring colour" (the darker rings) and "wood colour" (the lighter coloured wood representing spring growth in the tree), respectively.

The width of the rings relative to the tree's trunk is specified by argument "ring width". 0.0 means no ring at all, 1.0 means that all the trunk area is covered by the ring colour. The default value, 0.5, gives a reasonable look for many simple situations. Only values between 0.0 and 1.0 are acceptable.

In addition, the `fuzziness' of the boundary between the areas of ring colour and standard wood colour can be specified using the arguments "ring fuzz in" and "ring fuzz out". These specify the sharpness of the edges of the inside and outside of the rings respectively (the values actually represent the fraction of the ring width over which the interpolation from one colour to the other is done). Values between 0.0 and 1.0 are acceptable. Again, sensible default values have been chosen for these values, which essentially represent common growing cycles in temperate climates (a reasonably quick start of new growth in the spring followed by a slower decline in growth during the late summer).

The "gnarl" argument allows random perturbation of the regular rings inside the trunk. This allows localised `knot' patterns to form, for example. The higher value of the parameter the more `gnarled' the rings pattern becomes.

This shader also accounts for the appearance of random flecks or grains within the wood pattern, and for random perturbations of the ring pattern, which helps give a much more life-like appearance to the wood.

The "grain" parameter determines the intensity of the random grain effect. 0.0 means no grain at all, with higher values making the grains more distinct and visible (values in the order of 0.5, 1.0 or 2.0 create reasonable effects). The colour of these grains is specified by the argument "grain colour".

The amplitude of the high-frequency perturbations of the ring edges is controlled by the argument ring fuzz grain". (the value represents the fraction of the ring width over which the largest pertubations extend---values of less than 0.5 are recommended).

Finally, "grain scale" determines the size of the grain in relation to ring size (both the random grain flecks and the ring fuzz grain). Values between 0.1 and 2.0 are resonable---1.0 means that the grain size is comparable to the distance between two adjacent rings.

Previous page alphabetically (view_dependent_ic_initialisation)
Next page alphabetically (wooddisplacement)
Index


Copyright © 1990-2005, 2006 LightWork Design Limited. All rights reserved