Appearance Objects

Appearance Objects

Chi Chung Ko, Chang Dong Cheng
Copyright: © 2009 |Pages: 22
DOI: 10.4018/978-1-59904-789-8.ch004
OnDemand:
(Individual Chapters)
Available
$37.50
No Current Special Offers
TOTAL SAVINGS: $37.50

Abstract

In the last chapter, the creation of the skeletons or shapes of 3D objects has been discussed through the use of geometry objects in Java 3D. In order for these objects to be as realistic as possible to the user, it is often necessary for these objects to be covered with appropriate “skins” under good lighting conditions. In Java 3D, details on the skins can be specified by using color, texture, and material, which can be specified through the associated appearance objects. In this chapter, all the important attributes, including the ways for rendering points, lines and polygons as well as color and material, for an appearance object will be discussed. The use of texturing will be covered in the next chapter. As mentioned earlier, the creation of a virtual 3D object in a virtual world can be carried out using a Shape3D object in the associated scene graph. This object can reference a geometry object in Java 3D to create the skeleton of the virtual object. In addition, it can also reference an appearance object for specifying the skin of the virtual object. On its own, an appearance object does not contain information on how the object will look like. However, it can reference other objects, such as “attribute objects,” “texture-related objects,” and “material objects,” for getting appearance information to complement the object geometry. Since the use of an appearance object to enhance the geometry in the creation of a virtual universe is a basic requirement in Java 3D, we will now discuss some important aspects of appearance object in this chapter.
Chapter Preview
Top

Introduction

In the last chapter, the creation of the skeletons or shapes of 3D objects has been discussed through the use of geometry objects in Java 3D. In order for these objects to be as realistic as possible to the user, it is often necessary for these objects to be covered with appropriate “skins” under good lighting conditions. In Java 3D, details on the skins can be specified by using color, texture, and material, which can be specified through the associated appearance objects.

In this chapter, all the important attributes, including the ways for rendering points, lines and polygons as well as color and material, for an appearance object will be discussed. The use of texturing will be covered in the next chapter.

As mentioned earlier, the creation of a virtual 3D object in a virtual world can be carried out using a Shape3D object in the associated scene graph. This object can reference a geometry object in Java 3D to create the skeleton of the virtual object. In addition, it can also reference an appearance object for specifying the skin of the virtual object.

On its own, an appearance object does not contain information on how the object will look like. However, it can reference other objects, such as “attribute objects,” “texture-related objects,” and “material objects,” for getting appearance information to complement the object geometry.

Since the use of an appearance object to enhance the geometry in the creation of a virtual universe is a basic requirement in Java 3D, we will now discuss some important aspects of appearance object in this chapter.

The following steps are involved in the creation of an appearance object:

  • 1.

    Create an appearance object.

  • 2.

    Create the necessary attributes, materials object, and texture related objects.

  • 3.

    Reference the objects in step 2 from the appearance object.

  • 4.

    Reference the appearance object from the Shape3D object.

Figure 1 shows the how an appearance object is related to other relevant objects. As shown in Figure 1, an appearance object can refer to several different appearance attribute objects, which belong to basically the NodeComponent classes (Walsh & Gehringer, 2002). The important classes are

Figure 1.

Relation of an appearance object with other objects and classes

978-1-59904-789-8.ch004.f01
  • • PointAttributes

  • • LineAttributes

  • • PolygonAttributes

  • • ColoringAttributes

  • • TransparencyAttributes

  • • RenderingAttributes

  • • Material

  • • TextureAttributes

  • • Texture

  • • TexCoordGeneration

The first seven node components will be discussed in this chapter, while the remaining three classes are texture related and will be discussed in Chapter X.

Figure 2 shows the appearance constructor for creating an appearance object with all component object references initialized to null. Some important default values corresponding to null references are also listed in this figure.

Figure 2.

Appearance constructor and default values

978-1-59904-789-8.ch004.f02

To enable code sharing, it is possible for different Shape3D objects to reference the same appearance and NodeComponent Objects. An example is illustrated in Figure 3.

Figure 3.

Sharing appearance and NodeComponent objects

978-1-59904-789-8.ch004.f03

Complete Chapter List

Search this Book:
Reset