> >
> > ambient(環境光)を変える

ambient(環境光)を変える


0 0.2 0.4 0.6
0.8 1

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

camera {
	location <0, 2, -3>
	look_at <0, 0.5, 0>
	angle 20
	right x*image_width/image_height	
}

light_source {
	<100, 30, -100>
	color rgb 1
}

object {
	sphere { <0, 0, 0>, 0.5 }
	texture {
		pigment {
			color rgb <0, 0, 1>
		}
	}
	finish {
		ambient 1
	}
	translate <0, 0.5, 0>
}

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

戻る