次の include文で、ここで示しているすべてのものを使用することができる。

#include "colors.inc" #include "textures.inc" #include "Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc" #include "skies.inc" #include "stars.inc" #include "chars.inc" #include "shapes.inc" #include "shapes2.inc" #include "shapes3.inc"


14.5 ガラス

ガラスのテクスチャは、textures.incglass.inc に定義されている。ガラスのテクスチャ一覧を以下に示す。

図14.5 ガラス
//-------------------- Fig. 14-5 glass // screen size : // command line Input // +w400 +H160 +A #version 3.7 #include "colors.inc" #include "textures.inc" #include "Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc" #include "skies.inc" #include "stars.inc" #include "chars.inc" global_settings { assumed_gamma 2.2 } //-----------------------------camera - light camera{ location <0,-14,8> sky <0, 0, 1> right <-image_width/image_height,0,0> look_at <0, 0, 0> angle 25 } light_source{ <100, -400, 500> color rgb 1.5} //==================================== <<<<< inc glass #declare T1= material{M_Orange_Glass} #declare T2= material { texture { pigment { color Clear } finish { F_Glass3 } } interior { I_Glass1 fade_color Col_Emerald_03 } } #declare T3= material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Fluorite_06 } } //------------------------------------object sphere{ 0,1 material{T1} rotate -25*z translate -2*x} cylinder{-z,z,1 material{T2} rotate -25*z scale 0.75} box{-1,1 material{T3} rotate -25*z scale .75 translate 2*x} //---------------------------------floor #declare CA1=rgb<0.85,0.85,0.8>; #declare CA2=rgb<0.85,0.85,0.8>*1.2; plane{ z, -1.01 pigment{ checker color CA1, color CA2 scale 0.3 } } //---------------------------------sky sky_sphere{ pigment{ wrinkles color_map{ [ 0.3 SkyBlue] [ 0.9 White ] } scale <1, 0.2, 0.2> } }

POV-Rayでは、バージョン3.5になり、フォトンマッピングがサポートされたこともあり、ガラスのテクスチャが大幅に拡充された。ここでは次にの3つにわけてそれらを示す。

textures.inc に含まれているテクスチャ
 ▷ ガラス1(簡単に使用できるガラス)
glass.inc に含まれているテクスチャ
 ▷ ガラス2(3つのテクスチャの組み合わせによるガラス)
  (a)ガラス表面の性質(10種類)
  (b)ガラス内部の性質(8種類)
  (c)ガラスの色(94種類)
 ▷ ガラス3(透明色によるガラス)
 
 ▷ ガラス4(旧バージョン互換のためのガラス)


14.5-1 ガラス1(簡単に使用できるガラス)

次のガラスのテクスチャを使うために必要なインクルード文

#include "textures.inc"


material{M_Glass}

material{M_Glass2}

material{M_Glass3}

material{M_Green_Glass}

material{M_Ruby_Glass}

material{M_Dark_Green_Glass}

material{M_Yellow_Glass}

material{M_Orange_Glass}

material{M_Vicks_Bottle_Glass}


14.5-2 ガラス2(3つのテクスチャの組み合わせによるガラス)

次のガラスのテクスチャを使うために必要なインクルード文

#include "glass.inc"

ガラスは次の3つに分けてテクスチャが用意されており、それら3つを各々組み合わせて使用する。用意されたテクスチャの組み合わせ可能数は全部で7520種類となる。

 ▷(a)ガラス表面の性質(10種類)
 ▷(b)ガラス内部の性質(8種類)
 ▷(c)ガラスの色(94種類)

(a) ガラス表面の性質

次に(a)ガラス表面の性質のテクスチャを変化させた例を示す。これらは、(b)ガラス内部の性質を I_Glass1 、(c)ガラスの色を Col_Emerald_03 とした場合のものである。

   ・ガラス表面の性質 ⇒ F_Glass1~F_Glass10 の10種類
   ・ガラス内部の性質 ⇒ I_Glass1 に固定
   ・ガラスの色    ⇒ Col_Emerald_03 に固定


material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Emerald_03 } }

material { texture { pigment { color Clear } finish { F_Glass2 } } interior { I_Glass1 fade_color Col_Emerald_03 } }

material { texture { pigment { color Clear } finish { F_Glass3 } } interior { I_Glass1 fade_color Col_Emerald_03 } }

material { texture { pigment { color Clear } finish { F_Glass4 } } interior { I_Glass1 fade_color Col_Emerald_03 } }

material { texture { pigment { color Clear } finish { F_Glass5 } } interior { I_Glass1 fade_color Col_Emerald_03 } }

material { texture { pigment { color Clear } finish { F_Glass6 } } interior { I_Glass1 fade_color Col_Emerald_03 } }

material { texture { pigment { color Clear } finish { F_Glass7 } } interior { I_Glass1 fade_color Col_Emerald_03 } }

material { texture { pigment { color Clear } finish { F_Glass8 } } interior { I_Glass1 fade_color Col_Emerald_03 } }

material { texture { pigment { color Clear } finish { F_Glass9 } } interior { I_Glass1 fade_color Col_Emerald_03 } }

material { texture { pigment { color Clear } finish { F_Glass10 } } interior { I_Glass1 fade_color Col_Emerald_03 } }

(b) ガラス内部の性質

次に(b)ガラス内部の性質のテクスチャを変化させた例を示す。これらは、(a)ガラス表面の性質を F_Glass1 、(c)ガラスの色を Col_Emerald_03 とした場合のものである。

   ・ガラス表面の性質 ⇒ F_Glass1 に固定
   ・ガラス内部の性質 ⇒ I_Glass1~I_Glass_Caustics2 の8種類
   ・ガラスの色    ⇒ Col_Emerald_03 に固定


material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Emerald_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass2 fade_color Col_Emerald_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass3 fade_color Col_Emerald_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass4 fade_color Col_Emerald_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass_Dispersion1 fade_color Col_Emerald_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass_Dispersion2 fade_color Col_Emerald_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass_Caustics1 fade_color Col_Emerald_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass_Caustics2 fade_color Col_Emerald_03 } }

(c) ガラスの色

次に(c)ガラスの色を変化させた例を示す。これらは、(a)ガラス表面の性質を F_Glass1 、(b)ガラス内部の性質を I_Glass1 とした場合のものである。ガラスの色は、glass.incでは不透明色として定義されている。

   ・ガラス表面の性質 ⇒ F_Glass1 に固定
   ・ガラス内部の性質 ⇒ I_Glass1 に固定
   ・ガラスの色    ⇒ Col_Winebottle~Col_Amber_09 の94種類


material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Winebottle } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Beerbottle } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Ruby } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Green } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Dark_Green } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Yellow } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Orange } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Vicksbottle } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Red_01 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Red_02 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Red_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Red_04 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Green_01 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Green_02 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Green_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Green_04 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Blue_01 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Blue_02 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Blue_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Blue_04 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Yellow_01 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Yellow_02 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Yellow_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Yellow_04 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Amethyst_01 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Amethyst_02 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Amethyst_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Amethyst_04 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Amethyst_05 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Amethyst_06 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Apatite_01 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Apatite_02 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Apatite_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Apatite_04 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Apatite_05 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Citrine_01 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Aquamarine_01 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Aquamarine_02 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Aquamarine_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Aquamarine_04 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Aquamarine_05 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Aquamarine_06 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Azurite_01 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Azurite_02 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Azurite_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Azurite_04 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Emerald_01 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Emerald_02 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Emerald_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Emerald_04 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Emerald_05 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Emerald_06 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Emerald_07 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Fluorite_01 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Fluorite_02 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Fluorite_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Fluorite_04 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Fluorite_05 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Fluorite_06 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Fluorite_07 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Fluorite_08 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Fluorite_09 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Gypsum_01 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Gypsum_02 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Gypsum_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Gypsum_04 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Gypsum_05 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Gypsum_06 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Ruby_01 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Ruby_02 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Ruby_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Ruby_04 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Ruby_05 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Sapphire_01 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Sapphire_02 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Sapphire_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Topaz_01 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Topaz_02 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Topaz_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Tourmaline_01 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Tourmaline_02 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Tourmaline_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Tourmaline_04 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Tourmaline_05 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Tourmaline_06 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Amber_01 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Amber_02 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Amber_03 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Amber_04 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Amber_05 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Amber_06 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Amber_07 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Amber_08 } }

material { texture { pigment { color Clear } finish { F_Glass1 } } interior { I_Glass1 fade_color Col_Amber_09 } }


14.5-3 ガラス3(透明色によるガラス)

これらのガラスの色はglass.incで透明色として定義されている。ガラスの表面特性は F_Glass1F_Glass10 まで10種類使用できる。ここでは、ガラスの表面特性を F_Glass1、ガラスの屈折率を 1.5 とした例を示す。


material { texture { pigment { Col_Glass_Old } finish{ F_Glass1 } } interior { ior 1.5 } }

material { texture { pigment { Col_Glass_Winebottle } finish{ F_Glass1 } } interior { ior 1.5 } }

material { texture { pigment { Col_Glass_Beerbottle } finish{ F_Glass1 } } interior { ior 1.5 } }

material { texture { pigment { Col_Glass_Ruby } finish{ F_Glass1 } } interior { ior 1.5 } }

material { texture { pigment { Col_Glass_Green } finish{ F_Glass1 } } interior { ior 1.5 } }

material { texture { pigment { Col_Glass_Dark_Green } finish{ F_Glass1 } } interior { ior 1.5 } }

material { texture { pigment { Col_Glass_Yellow } finish{ F_Glass1 } } interior { ior 1.5 } }

material { texture { pigment { Col_Glass_Orange } finish{ F_Glass1 } } interior { ior 1.5 } }

material { texture { pigment { Col_Glass_Vicksbottle } finish{ F_Glass1 } } interior { ior 1.5 } }


14.5-4 ガラス4 (旧バージョン互換のためのガラス)

これらのガラスは旧バージョンとの互換性を保つために用意されているものなので使用しないほうがよい。フォトンマッピングに使用すると正しい結果が得られない。


texture {T_Glass1}

texture {T_Glass2}

texture {T_Glass3}

texture {T_Glass4}

texture {T_Old_Glass}

texture {T_Winebottle_Glass}

texture {T_Beerbottle_Glass}

texture {T_Ruby_Glass}

texture {T_Green_Glass}

texture {T_Dark_Green_Glass}

texture {T_Yellow_Glass}

texture {T_Orange_Glass}

texture {T_Vicksbottle_Glass}

 


(End) 14.5 ガラス