Material Database

View Source

<?xml version="1.0" encoding="utf-8"?>
<scenedata>
	<material>
		<name>v_fiber_material</name>
		<phong>
			<exponent>
					<constant>200</constant>
			</exponent>
			<bump>
				<shader>
						<shader><![CDATA[def scale() real:
	0.3

def c() vec2 :
   getTexCoords(0)*scale()

def cloth_x() real :
    doti( c() * 100.) + noise ( c() * 8.75) 

def cloth_y() real :
   dotj( c() * 100.) - noise ( c() * 6.35 )


def eval() real :
		( 
		sin( fract(cloth_x()) * 3.14159 ) * 0.2
		+ sqrt ( sin ( fract( (cloth_y() + floor(cloth_x()) ) * 0.5) * 3.14159 ) ) * 0.3
		 + fbm (  vec2 ( cloth_x() * 12.5 , cloth_y() * 0.5 ), 5 ) * 0.2
		 )
		* 0.0001 / scale()]]></shader>
				</shader>
			</bump>
			<fresnel_scale>
					<constant>1</constant>
			</fresnel_scale>
			<layer>0</layer>
			<ior>2.2</ior>
			<nk_data></nk_data>
		</phong>
	</material>
	<material>
		<name>h_fiber_material</name>
		<phong>
			<exponent>
					<constant>200</constant>
			</exponent>
			<bump>
				<shader>
						<shader><![CDATA[def scale() real:
	0.3

def c() vec2 :
   getTexCoords(0)*scale()

def cloth_x() real :
    doti( c() * 100.) + noise ( c() * 8.75) 

def cloth_y() real :
   dotj( c() * 100.) - noise ( c() * 6.35 )

def eval() real :
		( 
		sin( fract(cloth_y()) * 3.14159 ) * 0.2
		+ sqrt ( sin ( fract( (cloth_x() + floor(cloth_y()) ) * 0.5) * 3.14159 ) ) * 0.3
		 + fbm (  vec2 ( cloth_y() * 12.5 , cloth_x() * 0.5 ), 5 ) * 0.2
		 )
		* 0.0001 / scale()]]></shader>
				</shader>
			</bump>
			<fresnel_scale>
					<constant>1</constant>
			</fresnel_scale>
			<layer>0</layer>
			<ior>2.2</ior>
			<nk_data></nk_data>
		</phong>
	</material>
	<material>
		<name>textile_int</name>
		<blend>
			<a_name>v_fiber_material</a_name>
			<b_name>h_fiber_material</b_name>
			<blend>
				<shader>
						<shader><![CDATA[def scale() real:
	0.3

def c() vec2 :
   getTexCoords(0)*scale()

def cloth_x() real :
    doti( c() * 100.) + noise ( c() * 8.75) 

def cloth_y() real :
   dotj( c() * 100.) - noise ( c() * 6.35 )

def m() int :
	4

def n() int :
	2

def k() int :
	1

def eval() real :
	if(  lt( mod ( floorToInt(cloth_x()) + floorToInt(cloth_y() ) * k() ,m() ),n() ) , 0.0 , 1.0 )
]]></shader>
				</shader>
			</blend>
			<step_blend>true</step_blend>
		</blend>
	</material>
	<material>
		<name>New Material</name>
		<coating>
			<absorption>
				<constant>
					<uniform>
						<value>0</value>
					</uniform>
				</constant>
			</absorption>
			<thickness>
					<constant>0.001</constant>
			</thickness>
			<roughness>
					<constant>0.175</constant>
			</roughness>
			<layer>0</layer>
			<fresnel_scale>
					<constant>1</constant>
			</fresnel_scale>
			<ior>1.5</ior>
			<interference>false</interference>
			<substrate_material_name>textile_int</substrate_material_name>
		</coating>
	</material>
</scenedata>

-->