Switch

Reference
Index

    When the parent link is from a regional parameter, SWITCH will randomly select one of five child textures for each region.

How Does It Work?

    Use SWITCH in conjunction with both a Pattern class component or some other component that has a regional parameter, and a group of components (or component subtrees) that supply background textures. Remember that a regional parameter is one that defines a value for a repeating element or region of a texture, such as the Brick parameter of the Bricks component. SWITCH can have a maximum of five background textures to randomly choose between. You can use any components that supply unique textures for the backgrounds.

    See the Regional parameter page for more on how to link up this component.

    Each SWITCH component has five weight parameters and five background parameters. A weight parameter defines the relative chance that its corresponding background will be chosen during each random selection. For example, if Weight 1 is given a value of 1.0 and Weight 2 is given 2.0, Background 2 will be twice as likely to be chosen as Background 1. To prevent a specific background parameter (that possibly is not linked to a texture) from ever being chosen, set its corresponding weight to 0.0.

Hints!

    Using SWITCH in conjunction with two or more Randomizer components is a good way to get a random mix of several different HSV ranges. For example, you could have two types if brick in a wall with variation in each type.  SWITCH is also useful when you want to randomly distribute several completely different textures within a pattern, rather than just some variations of the same texture that you get with the Randomizer component.

Common Parameters

 

 

 

 

Input_Seed

Integer seed for the random number generator. The generator, taking the weight parameters into account, randomly chooses a background texture for each region.

 

 

 

 

Weight 1 to 5

Each weight value gives the relative chance that its corresponding background texture will be selected.

Color Component Parameters

 

 

Background 1 to 5

The five color background textures to switch among.

Percent Component Parameters

 

 

Background 1 to 5

The five percent background textures to switch among.

Bump Component Parameters

 

 

Background 1 to 5

The five bump background textures to switch among.

Darkling Simulations
Copyright 1996-2003