Download Simulations with VRML and Dynast
Transcript
Chapter 2. VRML Editor - User’s Guide Figure 2-5. Shape settings dialog (2) Most computer applications describe colours using the RGB model, i.e. by specifying the amount of red, green and blue colour which should be mixed. In our case we use numbers from [0, 1] interval for the individual R, G, B components. A VRML object’s appearance is described by three parameters (i.e. nine numbers): • emissive color - it is nonzero in case of objects emitting light. The object colour is constant at all surface points. • diffuse color - it is nonzero in case of opaque objects. The front side (the one we are looking at) is the brightest, the light intensity decreases as the angle between surface normal and the direction of our view increases. • specular color - it is nonzero in case of glossy objects. The shape faces perpendicular to the direction of our view reflect the light from our flash-light, but the reflection coefficient decreases rapidly with increasing angle. Let’s test the influence of individual parameters to a shape’s appearance: Create a sphere and set all three colours to zero. Then have a look at what happens if you increase the red component of emissive color, diffuse color or specular color. Figure 2-6. Emissive, diffuse and specular colour The three types of colour might be freely combined. The right appearance can be most easily found by trial. In case you need a more detailed description of the three parameters consult the The Virtual Reality Modeling Language (http://www.web3d.org/technicalinfo/specifications/eai/index.html) specification. It also explains that the VRML scene nodes can be influenced by other light sources (not only by our flash-light). These sources are not directly available in our editor, but you can insert them using the import procedure (see Importing VRML nodes). The ambient intensity 8