Material Database

View Source

<?xml version="1.0"?>
<scenedata>
	<material>
		<name>postion-based bump shader</name>
		<diffuse>
			<albedo>
				<constant>
					<rgb>
						<rgb>0.5 0.5 0.5</rgb>
						<gamma>2.2</gamma>
					</rgb>
				</constant>
			</albedo>
			<bump>
				<shader>
					<param>
						<int>
							<name>BasisType</name>
							<description>Noise Basis Type. 0 == Perlin, 1 = Ridged, 2 = Voronoi</description>
							<min>0</min>
							<max>2</max>
							<value>0</value>
						</int>
					</param>
					<param>
						<real>
							<name>H</name>
							<description>Determines fractal dimension</description>
							<min>0</min>
							<max>10</max>
							<value>1</value>
						</real>
					</param>
					<param>
						<real>
							<name>Lacunarity</name>
							<description>Gap between successive frequencies</description>
							<min>0</min>
							<max>20</max>
							<value>2</value>
						</real>
					</param>
					<param>
						<real>
							<name>NumOctaves</name>
							<description>Max number of octaves of noise to mix in.</description>
							<min>0</min>
							<max>20</max>
							<value>8</value>
						</real>
					</param>
					<param>
						<real>
							<name>Freq</name>
							<description>Base Frequency</description>
							<min>0</min>
							<max>1000</max>
							<value>100</value>
						</real>
					</param>
					<param>
						<real>
							<name>Height</name>
							<description>Max height of the surface</description>
							<min>0</min>
							<max>0.1</max>
							<value>0.001</value>
						</real>
					</param>
					<shader><![CDATA[
  # See http://www.indigorenderer.com/indigo-technical-reference/indigo-shader-language-reference/built-functions-%E2%80%93-procedural-noise-fun-0 for details on fbm()
  
  def eval() real :
    fbm(
      paramBasisType(),
      posOS() * paramFreq(), 
      paramH(),
      paramLacunarity(),
      paramNumOctaves() # Num octaves
    ) * paramHeight()
						]]></shader>
				</shader>
			</bump>
			<random_triangle_colours>false</random_triangle_colours>
			<layer>0</layer>
		</diffuse>
	</material>
</scenedata>

-->