#Generated with MakeHuman 0.9
#www.makehuman.org (c) 2001-2006


#FRAME 1: STEP 1 -RENDERING FIRST SHADOW MAP
#___________________________________
FrameBegin 1
Option "statistics" "endofframe" [1]
Format 200 200 1
PixelFilter "box" 1 1
Display "${TEXTURES_PATH}/shad2.shad" "zfile" "z"

ShadingRate 1
Hider "hidden" "depthfilter" "midpoint"

Projection "perspective" "fov" [91.67]
Rotate 120.96 0.00 1.00 0.00
Translate -10.00 0.00 -6.00



WorldBegin
	AttributeBegin		
		Opacity [1.0 1.0 1.0]
		Translate 0.0 0.0 0.0
		Rotate ${ROTATE_Z} 0 0 1
		Rotate 0.0 0 1 0
		Rotate ${ROTATE_X} 1 0 0
		Scale 1.0 1.0 1.0	
        #Surface "plastic" 		
		ReadArchive "${MESH_PATH}Base.rib"
	AttributeEnd
WorldEnd
FrameEnd

#FRAME 2: STEP 2 -RENDERING SECOND SHADOW MAP
#___________________________________
FrameBegin 2
Option "statistics" "endofframe" [1]
Format 300 300 1
PixelFilter "box" 1 1
Display "${TEXTURES_PATH}/shad3.shad" "zfile" "z"

ShadingRate 1
Hider "hidden" "depthfilter" "midpoint"



#Projection "perspective" "fov" [58.44]
#Rotate -0.02 0.00 0.00 1.00
#Rotate 56.31 1.00 0.00 0.00
#Rotate 180.00 0.00 1.00 0.00
#Translate 0.00 15.00 -10.00

Projection "perspective" "fov" [57.30]
Rotate -29.50 1.00 0.00 0.00
Rotate -135.00 0.00 1.00 0.00
Translate 10.00 -8.00 -10.00


WorldBegin
	AttributeBegin		
		Opacity [1.0 1.0 1.0]
		Translate 0.0 0.0 0.0
		Rotate ${ROTATE_Z} 0 0 1
		Rotate 0.0 0 1 0
		Rotate ${ROTATE_X} 1 0 0
		Scale 0.8 0.8 0.8	
        #Surface "plastic" 		
		ReadArchive "${MESH_PATH}Base.rib"
	AttributeEnd
WorldEnd
FrameEnd


#FRAME 3: STEP 3 -RENDERING THIRD SHADOW MAP
#___________________________________
FrameBegin 2
Option "statistics" "endofframe" [1]
Format 100 100 1
PixelFilter "box" 1 1
Display "${TEXTURES_PATH}/shad4.shad" "zfile" "z"

ShadingRate 1
Hider "hidden" "depthfilter" "midpoint"


Projection "perspective" "fov" [91.67]
Rotate -0.02 0.00 0.00 1.00
Rotate 38.66 1.00 0.00 0.00
Rotate 180.00 0.00 1.00 0.00
Translate 0.00 8.00 -10.00


WorldBegin
	AttributeBegin		
		Opacity [1.0 1.0 1.0]
		Translate 0.0 0.0 0.0
		Rotate ${ROTATE_Z} 0 0 1
		Rotate 0.0 0 1 0
		Rotate ${ROTATE_X} 1 0 0
		Scale 0.8 0.8 0.8	
        #Surface "plastic" 		
		ReadArchive "${MESH_PATH}Base.rib"
	AttributeEnd
WorldEnd
FrameEnd

#STEP 3 - MAKE SHADOW MAPS
#___________________________________

MakeShadow "${TEXTURES_PATH}/shad2.shad" "${TEXTURES_PATH}/shad2.shad"
MakeShadow "${TEXTURES_PATH}/shad3.shad" "${TEXTURES_PATH}/shad3.shad"
MakeShadow "${TEXTURES_PATH}/shad4.shad" "${TEXTURES_PATH}/shad4.shad"

#STEP 4 - RENDEING SCENE
#___________________________________
FrameBegin 4
Option "statistics" "endofframe" [1]
Option "searchpath" "shader" ["${SHADERS_PATH}:&"] 
Option "searchpath" "texture" ["${TEXTURES_PATH}:&"]
Attribute "displacementbound" "sphere" [0.3]
Projection "perspective" "fov" [28]
Format 800 600 1
Clipping 0.10000000149 100.0
PixelSamples 4 4
Sides 2
Declare "shadowname" "uniform string"   
Declare "blur" "float"  
Declare "samples" "float"  
Declare "lfact" "float"
Declare "bias" "float"
Declare "oil" "float"
Declare "colortexture" "uniform string"
Declare "ssstexture" "uniform string"  
Declare "spectexture" "uniform string"  
Declare "roughtexture" "uniform string"  
Declare "alphatexture" "uniform string" 
Declare "melanin" "float"   
Declare "sss" "float" 
Declare "Km" "float" 
Declare "furval" "float"  
Declare "furfreq" "float" 
Declare "lightcolor" "color" 

Display "${MESH_PATH}00001.tif" "framebuffer" "rgb"
Display "+${MESH_PATH}00001.tif" "file" "rgba"
		Rotate 90.0 1 0 0
		Rotate 180.0 0 1 0
		Rotate 0.0 0 0 1		
        Translate ${TRANSLATE_X} ${TRANSLATE_Y} ${TRANSLATE_Z}

WorldBegin

LightSource "MHshadowspot" 2 "shadowname" ["shad2.shad"] "intensity" 150 "coneangle" [0.8] "conedeltaangle" [0.0]  "from" [10 0 6] "to" [0 0 0] "blur" [0.2] "samples" [32] "bias" [-1.5]

LightSource "MHshadowspot" 3 "shadowname" ["shad3.shad"] "intensity" 150 "coneangle" [0.50944] "conedeltaangle" [0.0174533]  "from" [-10 8 10] "to" [0 0 0] "blur" [0.2] "samples" [32] "bias" [-1.5]

LightSource "MHshadowspot" 4 "shadowname" ["shad4.shad"] "intensity" 10 "coneangle" [0.8] "conedeltaangle" [0.0174533]  "from" [0 -8 10] "to" [0 0 0] "blur" [0.2] "samples" [32] "bias" [0.1]


LightSource "ambientlight" 106 "intensity" .05



	AttributeBegin
		Color [1.0 0.6 0.6]		
		#Translate ${TRANSLATE_X} ${TRANSLATE_Y} ${TRANSLATE_Z}
        Translate 0.0 0.0 0.0
		Rotate ${ROTATE_Z} 0 0 1
		Rotate 0.0 0 1 0
		Rotate ${ROTATE_X} 1 0 0
		Scale 1.0 1.0 1.0
		#Displacement "MHbump" "furfreq" [2500] "furval" [1.5] "texturename" ["skin_bump.tx"] "Km" [0.3]		
		Surface "MHskin" "colortexture" ["skin_color.tx"] "ssstexture" ["skin_sss_val.tx"] "spectexture" ["skin_reflect.tx"] "roughtexture" ["skin_roughness.tx"] "alphatexture" ["skin_opacity.tx"] "melanin" [0.15] "oil" [3.8] "sss" [0.35]
		#Surface "plastic"
		ReadArchive "${MESH_PATH}Base.rib"
	AttributeEnd
WorldEnd
FrameEnd