3.7. Textures

A texture modifies in some extent the characteristics of a surface. It is possible to apply transformations to textures and even keep them independent from object transformations.

texture none - discards all previous texture transformations.

texture scale factor [factor factor].

texture translate point.

texture rotate x angle.

texture rotate y angle.

texture rotate z angle.

texture rotate vector angle.

texture general point point point [point].

texture local - generate all the necessary texture transformations to access objects without considering their previously defined object transformations. The keyword invariant is also accepted.

Example:

	sphere
	  transform scale 0.2 1 2
	  transform rotate y ANGLE ; ANGLE is defined elsewhere
	  texture local
	  blotch 0.5 surface matte yellow
	  surface matte red
	  data 0 0 0 1

When generating animations, for example, it is important that textures stick to objects independently of their position, scale, etc or else it will produce a undesirable effect. If ANGLE varies from 5 to 30 degrees, the texture still applies correctly to the object and does not float strangely.

The available textures are:

	Name     Parameters
	------------------------------------------------------
	checkers surface [transform]
	blotch   scale surface [filename] [transform]
	bump     scale [transform]
	marble   [filename] [transform]
	fbm      offset scale omega lambda threshold octaves [transform]
	fbmbump  offset scale lambda octaves [transform]
	wood     color [transform]
	round    scale [transform]
	bozo     turbulence [filename] [transform]
	ripples  frequency phase scale [transform]
	waves    frequency phase scale [transform]
	spotted  [filename] [transform]
	dents    scale [transform]
	agate    [filename] [transform]
	wrinkles scale [transform]
	granite  [filename] [transform]
	gradient turbulence direction [filename] [transform]
	imagemap turbulence mode axis filename [transform]
	gloss    scale [transform]
	bump3    scale size [transform]
	------------------------------------------------------

Examples:

	sphere round 0.5 data 0 0 0 0.5
	sphere bump 0.7 scale 20 data 0 1 0 0.5 ; scale of bump is smaller
	sphere bump3 0.5 0.5 scale 1 4 1 data 0 -1 0 0.5 ; strange!


To Table of Contents
To 3. Syntax
Back To 3.6. Transformations
Forward To 4. Appendix A