textures.incのガラスのサンプル


M_Glass M_Glass2 M_Glass3 M_Green_Glass
M_NB_Glass M_NB_Old_Glass M_NB_Winebottle_Glass M_NB_Beerbottle_Glass
M_Ruby_Glass M_Dark_Green_Glass M_Yellow_Glass M_Orange_Glass
M_Vicks_Bottle_Glass

上のサンプルを作ったときのソースは下のようになっています。

#include "colors.inc"
#include "skies.inc"
#include "textures.inc"

camera {
	location <4, 6, -10>
	look_at <-0.2, 1, 0>
	angle 23
	right x*image_width/image_height
}

light_source {
 	<100, 100, -100>
	color rgb 1.2
}

light_source {
 	<-0, 10, -100>
	color rgb 0.3
}

object {
	plane { y, 0 }
	texture {
		pigment {
			checker
				color rgb 1,
				color rgb 0
		}
		finish {
			ambient 0.3
		}
	scale 0.5
	}
}

sky_sphere { S_Cloud5 }


#declare myMaterial = material {
	M_Vicks_Bottle_Glass
}

object {
	sphere { <0, 1, 0>, 1 }
	material { myMaterial }
	translate <1, 0, 0>
}

object {
	box { <-1, -1, -1>, <1, 1, 1> }
	material { myMaterial }
	translate <-1, 1, 0>
}

戻る