色・材質の定義

4. emissiveColor(放射)


emissiveColor は、放射を表す単語です。
放射は、照明のように光を放つことです。
emissiveColor の後に { } をつけて、
その中に色(RGB)と書いて、放射の色を表します。


以下、赤い放射のある大きな球と、
青い放射のある小さな球の記述例です。
emissiveColor の値の違いに着目してください。

#VRML V2.0 utf8

Transform {
  translation 3.0 0.0 0.0 
  children [
    Shape {
      appearance Appearance {
        material Material {
          emissiveColor 1.0 0.0 0.0
        }
      }
      geometry Sphere {
        radius 2.0
      }
    }
  ]
}

Transform {
  translation -3.0 0.0 0.0 
  children [
    Shape {
     appearance Appearance {
      material Material {
       emissiveColor 0.0 0.0 1.0
      }
     }
     geometry Sphere {
      radius 1.0
     }
    }
  ]
}

上の VRML を実際に表示してみましょう。

次は透過を表示してみましょう。


目次に戻る