透明なオブジェクトに鏡面反射をつけるときの注意


透明なオブジェクトに鏡面反射をつけるときは,「conserve_energy」というオプションをつけます。鏡面反射を付け加えるだけだと,オブジェクトが明るくなっていまいます。ソースは次のような感じになります。

object {
	sphere { <0, 0, 0>, 0.5 }
	texture {
		pigment {
			color rgbf <0.9, 0.9, 1, 0.9>
		}
	}
	finish {
		specular 0.4
		reflection 0.2
		conserve_energy
	}
	translate <0, 0.5, 0>
}

conserve_energyを付け加えた場合とそうでない場合を比較してみました。

鏡面反射なし 鏡面反射だけ conserve_energy付加

上の画像のソースの全体は次のようになっています。

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

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 rgbf <0.9, 0.9, 1, 0.9>
		}
	}
	finish {
		specular 0.4
		reflection 0.2
		conserve_energy
	}
	translate <0, 0.5, 0>
}

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

sky_sphere {
	S_Cloud5
}

戻る