Shader: "granite"

"granite"

ClassDisplacement
Synopsis A solid texture giving a granite like pattern.
Arguments

"displacement amplitude" Type: LtFloat
Default:0.03
Range:[ 0.0, inf ]
Hint:-
"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 height" Type: LtFloat
Default:0.45
Range:[ 0.0, 1.0 ]
Hint:-
"mineral 2 height" Type: LtFloat
Default:0.196
Range:[ 0.0, 1.0 ]
Hint:-
"mineral 3 height" Type: LtFloat
Default:0.04
Range:[ 0.0, 1.0 ]
Hint:-
"mineral 4 height" Type: LtFloat
Default:0.366
Range:[ 0.0, 1.0 ]
Hint:-
"fragment softness" Type: LtFloat
Default:0.5
Range:[ 0.0, 2.0 ]
Hint:[ 0.0, 1.0 ]
"fragment detail" Type: LtFloat
Default:1.0
Range:[ 0.0, inf ]
Hint:[ 0.0, 4.0 ]
"fragment size" Type: LtFloat
Default:0.8
Range:[ 0.001, 1.0 ]
Hint:[ 0.25, 1.0 ]
"height variation" Type: LtFloat
Default:0.2
Range:[ 0.0, 1.0 ]
Hint:[ 0.0, 0.3 ]
"cracks" Type: LtFloat
Default:0.08
Range:[ 0.0, 1.0 ]
Hint:[ 0.0, 0.2 ]
"height noise" Type: LtFloat
Default:0.15
Range:[ 0.0, 1.0 ]
Hint:[ 0.0, 0.3 ]
"height noise scale" Type: LtFloat
Default:1.0
Range:[ 1e-006, inf ]
Hint:[ 1.0, 4.0 ]
"random seed" Type: LtInt32
Default:29
Range:[ 0, inf ]
Hint:-
Locationlishclas
Description

A displacement 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 height of each can be specified, so argument "mineral 1 height" specifies the height of the mineral which causes the largest grains, and "mineral 4 height" specifies the height of the mineral which causes the smallest type of grains. All heights are relative to the surface height which equals 0.

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). Similarly, "displacement amplitude" controls the overall scale of displacement.

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 heights vary slightly from the height 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 height of the fragments constituting each mineral grain, can also vary from the base mineral height. This is controlled by the "height 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 "height 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 "height 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 (granite)
Next page alphabetically (ground fog)
Index


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