Title: VRML II Part 2
1VRML II - Part 2
2Overview
- Customizing the color of shapes using the
Appearance and Material nodes - Mixing red , green, blue light
- Creating dull, shiny, glowing, and transparent
surfaces - Wrapping images around shapes using the Texture
node (Andi) - Texture mapping with images, movies, and raw
pixel data (Andi) - Using the texture node to control texture mapping
- (Andi)
3Appearance of a shape
You can change the appearance of a shape by using
three nodes. Appearance exposedField SFNode
material NULL exposedField SFNode
texture NULL exposedField
SFNode textureTransform NULL
4Material Node
Material exposedField SFColor diffuseColor
0.8 0.8 0.8 0,1 exposedField SFFloat
ambientIntensity 0.2 0,1 exposedField
SFColor emissiveColor 0 0 0
0,1 exposedField SFFloat shininess 0.2
0,1 exposedField SFColor specularColor
0 0 0 0,1 exposedField SFFloat
transparency 0 0,1
5 Material Node Diffuse Color
- Material
- exposedField SFColor diffuseColor 0.8 0.8 0.8
0,1 R G B -
- The diffuse color field sets the basic color for
an object - It accepts 3 floating point values which are
based on the RGB color model
6Red - Green - Blue Color
7Example Diffuse Color VRML V2.0 utf8 Shape
appearance Appearance material Material
diffuseColor 0 1 0 geometry Cone
8Material Node Ambient Intensity
- Material
- exposedField SFFloat ambientIntensity 0.2
0,1 -
- It is used to control how much or how little
light is reflected by the surface of a shape
9 Shiny Surface
- Material
- exposedField SFColor specularColor 0 0
0 0, 1 - exposedField SFFloat shininess 0.2
0, 1 -
- The specularColor Field is to alter the surface
properties of a shape based on specular
reflection, meaning that light will be reflected
in a specific direction - The shininess Field defines the size of specular
reflection. Low values --gt shiny appearance - High values --gt dull appearance
10Metal, Plastic, and Glass Surface
- By combining the Material nodes diffuse color,
specular color and Shininess fields in various
ways you can create metallic, plastic, and glass
surfaces.
11(No Transcript)
12VRML V2.0 utf8 Shape appearance Appearance
material Material diffuseColor 0.37 0.37
0.37 specularColor 0.89 0.89 0.13 shininess
0.13 geometry Cone
13Material Node Glowing Colors
Material exposedField SFColor emissiveColor
0.8 0.8 0.8 0, 1
- It accepts three floating point numbers to
describe the RGB color model. - 0 is used to specify no glowing light for a given
color while 1 specifies the highest possible
amount.
14Example 1.Diffuse Color VRML V2.0 utf8 Shape
appearance Appearance material Material
diffuseColor 1 1 0 geometry Sphere
Presentation
2.emissiveColor VRML V2.0 utf8 Shape
appearance Appearance material Material
emissiveColor 1 1 0 geometry Sphere
Presentation
15Material Field Transparency
- Material
- exposedField SFFloat transparency 0
0, 1 -
- Values closer to 1 introduce more transparency to
a shape by allowing more light through it, while
a value of 1 creates shapes that are completly
transparent.
16Example VRML V2.0 utf8 Transform translation
0 0 4 children Shape appearance Appearance
material Material diffuseColor 0 1
0 transparency 0.75 geometry Cone
Shape appearance Appearance material Material
diffuseColor 1 1 1 geometry Cylinder
Example