Shader: "granite"

"granite"

ClassColour
Synopsis A solid texture giving a granite like pattern (grains of different coloured minerals).
Arguments

"scale" Type: LtFloat
Default:1.0
Range:[ 1e-006, inf ]
Hint:[ 0.01, 1000 ]
"type" Type: LtEnum
Default:LI_GRANITE_TYPE_SIERRA
Range: 0, 1, 2, 3, 4
Hint:-
"mineral 1 colour" Type: LtColour
Default:(0.78, 0.76, 0.71)
Range: [ 0, inf ], [ 0, inf ], [ 0, inf ]
Hint: [ 0, 1 ], [ 0, 1 ], [ 0, 1 ]
"mineral 2 colour" Type: LtColour
Default:(0.38, 0.31, 0.29)
Range: [ 0, inf ], [ 0, inf ], [ 0, inf ]
Hint: [ 0, 1 ], [ 0, 1 ], [ 0, 1 ]
"mineral 3 colour" Type: LtColour
Default:(0.06, 0.07, 0.07)
Range: [ 0, inf ], [ 0, inf ], [ 0, inf ]
Hint: [ 0, 1 ], [ 0, 1 ], [ 0, 1 ]
"mineral 4 colour" Type: LtColour
Default:(0.67, 0.62, 0.54)
Range: [ 0, inf ], [ 0, inf ], [ 0, inf ]
Hint: [ 0, 1 ], [ 0, 1 ], [ 0, 1 ]
"fragment softness" Type: LtFloat
Default:0.5
Range:[ 0, 2 ]
Hint:[ 0, 1 ]
"fragment detail" Type: LtFloat
Default:1.0
Range:[ 0, inf ]
Hint:[ 0, 4 ]
"fragment size" Type: LtFloat
Default:0.8
Range:[ 0.001, 1 ]
Hint:[ 0.25, 1 ]
"colour variation" Type: LtFloat
Default:0.2
Range:[ 0, 1 ]
Hint:[ 0, 0.3 ]
"cracks" Type: LtFloat
Default:0.08
Range:[ 0, 1 ]
Hint:[ 0, 0.2 ]
"colour noise" Type: LtFloat
Default:0.15
Range:[ 0, 1 ]
Hint:[ 0, 0.3 ]
"colour noise scale" Type: LtFloat
Default:1.0
Range:[ 1e-006, inf ]
Hint:[ 1, 4 ]
"random seed" Type: LtInt32
Default:29
Range:[ 0, inf ]
Hint:-
Locationlishclas
Description A colour shader that imitates the appearance of granite. Granite looks the way it does because it is composed of several different sorts of minerals which form grains of various sizes.

Different types of granite differ in the relative number and sizes of the different grains of mineral. The argument "type" is used to specify the following common types of granite:

"type" argument

Description

LI_GRANITE_TYPE_SIERRA

Small variations in grain size, minerals distributed uniformly.
LI_GRANITE_TYPE_BIANCO Bigger variations in grain size, minerals distributed uniformly.
LI_GRANITE_TYPE_DIAMOND Domination of coarse grains, with small addition of fine-grained minerals.
LI_GRANITE_TYPE_AZALEA Fine-grained with small addition of large-grained mineral.
LI_GRANITE_TYPE_AUBURN Very large grains of the dominating mineral, the remaining minerals being distributed uniformly in small grains.

In addition to these standard pre-defined types of granite, it is possible to create you own unique types of granite using the other shader arguments described below.

The granite pattern is made up of four seperate minerals, the average grain size of each mineral being different. The minerals are numbered in order of decreasing grain size, and the colour of each can be specified, so argument "mineral 1 colour" specifies the colour of the mineral which causes the largest grains, and "mineral 4 colour" specifies the colour of the mineral which causes the smallest type of grains.

The overall granite texture can be scaled using the "scale" argument (the smaller this value is, the smaller all of the granite grains will appear).

The curvature of the borders or edges of the grains can be controlled using the arguments "fragment softness" (which affects strength of random deformation of grains) and "fragment detail" (which determines scale of this deformations). A value of 1.0 for "fragment detail" defines smooth deformations, larger values increase frequency and deformations become denser and more rough

Every mineral grain can be subdivided into smaller fragments, within which colours vary slightly from the colour determined for the mineral to which a grain belongs. The argument "fragment size" describes the average size of such fragments, relative to the size of the largest grains. Grains whose size is smaller or equal to this argument value are not divided into smaller fragments. Note that "fragment size" must be lower or equal to 1.0, and greater than 0.0. A value of 1.0 for this argument means there will be no subdivision.

The colour of the fragments constituting each mineral grain, can also vary from the base mineral colour. This is controlled by the "colour variation"argument, which can vary from 0.0 (no differences) to 1.0(maximum differences).

The effect of `cracks' on the borders between fragments can be introduced by setting the argument "cracks" to a value greater than 0.0---a value of 1.0 produces brightest cracks.

The argument "colour noise" defines the intensity of the randomly distributed noise that will be applied to texture. The noise is superimposed uniformly on all mineral grains appearing in the pattern. The density of the noise is controlled by the argument "colour noise scale", which should be defined relative to "scale". This means that setting this argument to 1.0 causes the average size of the random spots added to the pattern to be comparable to the size of the largest grains.

Finally, the argument "random seed" allows you to change the random distribution of grains. Different values will produce various patterns.

Previous page alphabetically (graduatedthreecolour)
Next page alphabetically (granitedisplacement)
Index


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