Extensible 3D (X3D)
Part 1: Architecture and base components

42  Texture projector component

--- X3D separator bar ---

cube 42.1 Introduction

42.1.1 Name

The name of this component is "TextureProjector". This name shall be used when referring to this component in the COMPONENT statement (see 7.2.5.4 Component statement).

42.1.2 Overview

This clause describes the texture projection component of this part of ISO/IEC 19775. This includes how texture projections are specified and how they are positioned on the 3D scene. Table 42.1 provides links to the major topics in this clause.

Table 42.1 — Topics

cube 42.2 Concepts

42.2.1 Overview

This component provides additional texturing extensions to the basic capabilities defined in X3D. Generally, 2D and 3D texture projection has been used to enhance the quality of an image generated with a camera or to speed up the generation of an image with respect to a given scene including several geometric models. However, there are some constraints for projecting the region and shape of textures over objects. As an extension of texture projection, the texture image can be projected onto a 3D scene within the projection volume which is constructed from projection parameters such as a projection point, a projection direction and a projection aspect ratio. Figure 42.1 shows an example screen shot by applying texture projection to a 3D virtual scene.

Description of Projective texture map

Figure 42.1 — Concept of texture projection

This texture projection is essential for enhanced rendering effects in a 3D scene such as rendering of projected images, visualization of a terrain surface in GIS applications, and medical visualization.

42.2.2 Texture projector concepts

The texture projection allows a texture image to be projected onto a 3D virtual scene inside the projection volume visible from a specific position called a projection point. The projection volume is determined by projection parameters depending on two types: parallel and perspective projections. In a parallel projection, the parallel volume is a parallelepiped. In a perspective projection, the projection volume is a rectangular frustum.

The parallel projection can be distinguished into orthographic and oblique according to the defined projection direction. If all the projection lines are orthogonal to the projection plane, the projection is called an orthographic projection. All the projection lines in oblique projection intersect the projection plane at an oblique angle. In order to describe the types of parallel projection, the projection point and projection direction are given as a point and a vector, respectively. The projection volume in parallel projection can be defined as a parallelepiped.

The perspective projection can be defined as a field of view angle from a projection point, an aspect ratio based on width and height, plus near and far planes. In texture projection generally, a single texture as well as several texture images can be projected onto a scene in a 3D virtual world. Furthermore, multiple texture projections can be performed over a common scene with specific objectives such as photogrammetry or reconstruction of endoscope images. As shown in Figure 42.2, assume that several images are provided, each of which is taken with a different camera. Construction of a terrain surface from those images can be performed by displaying overlapping images obtained after applying several projected textures to the surface model.

Description of 3D texture

Figure 42.2 — Application of perspective texture projection for reconstructing a 3D terrain

Figure 42.3 describes an example for reconstructing endoscope images over a cylinder by applying texture projection. In a similar manner, each image is captured from an endoscope with perspective view information inside a human body.

Description of 3D texture

Figure 42.3 — Application of perspective texture projection for reconstructing an endoscope 3D model.

42.2.3 Image formats for texture projection

Node types specifying images for texture projection may supply data with a number of color components between one and four. The valid types and interpretations of 3D textures are identical to that for 2D textures. The definition of texture formats is defined in 18.2.1 Texture map formats.

cube 42.3 Abstract types

42.3.1 X3DTextureProjectorNode

X3DTextureProjectorNode : X3DLightNode {
  SFFloat  [in,out] ambientIntensity 0      [0,1]
  SFColor  [in,out] color            1 1 1  [0,1]
  SFString [in,out] description      ""
  SFVec3f  [in,out] direction        0 0 1  (-∞,∞)
  SFFloat  [in,out] farDistance      -1     -1 or (0,∞)
  SFBool   [in,out] global           TRUE
  SFFloat  [in,out] intensity        1      [0,∞)
  SFVec3f  [in,out] location         0 0 0  (-∞,∞)
  SFNode   [in,out] metadata         NULL   [X3DMetadataObject]
  SFFloat  [in,out] nearDistance     -1     -1 or (0,∞)
  SFBool   [in,out] on               TRUE
  SFBool   [in,out] shadows          FALSE
  SFFloat  [in,out] shadowIntensity  1      [0,1]
  SFNode   [in,out] texture          NULL   [X3DTexture2DNode]
  SFFloat  [out]    aspectRatio             (0,∞)
}

EDITORS NOTES.

  1. Is this node a white light modified by the texture? Does it need an ambientIntensity field in the abstract node? If so, then X3DTextureProjectorNode must implement X3DLightNode, rather than X3DChildNode.
  2. Is this node simply a texture that is applied to geometry instead? If so, then how is that texture merged with any other texture that may already be present?
  3. If added in X3DTextureProjectorNode, textureTransform affects the texture prior to being projected. Seems like a good idea.
  4. If these nodes are light sources, are the similarly part of shadow definition? If not, then might need to state that this effect is not occluded by intervening geometry.

This abstract node type is the base type for all node types that specify texture projection.

The aspectRatio field is the ratio of image width and height that is projected.

The description field of this node tells the name of the projector, and makes the division of different projectors possible.

The direction is the way the projector is heading, and this implies projection direction.

Each texture projection type defines a global field that determines whether the texture projection is global or scoped. Global texture projection performs the texture projections for all objects that fall within their volume of texture projection influence. Scoped texture projection only performs the texture projections for objects that are in the same transformation hierarchy as the texture projection; i.e., only the children and descendants of its enclosing parent group are illuminated.

The location shows the position of the projector, and this implies projection point.

The nearDistance and farDistance are the minimum and maximum distance traveled, respectively, for a projected texture that is shown on the screen. A default value of -1 for nearDistance or farDistance means that the field has no effect on currently active projection boundaries.

The on field specifies whether the texture projection is performed or not. If on is TRUE, the texture projection is performed for geometry objects in the scene. If on is FALSE, the texture projection is not performed for any geometry in the scene.

The ambientIntensity, color, global, global, intensity, on, shadows, shadowIntensity, and texture fields are defined in X3DLightingNode. (TODO superfluous?)

See 18 Texturing component for a general description of the X3DTexture2DNode abstract type and interpretation of rendering for 2D images.

cube 42.4 Node reference

42.4.1 TextureProjector

 TextureProjector : X3DTextureProjectorNode {
  SFFloat  [in,out] ambientIntensity 0      [0,1]
  SFColor  [in,out] color            1 1 1  [0,1]
  SFString [in,out] description      ""
  SFVec3f  [in,out] direction        0 0 1  (-∞,∞)
  SFFloat  [in,out] farDistance      -1     -1 or (0,∞)
  SFFloat  [in,out] fieldOfView      π/4    (0,π)
  SFBool   [in,out] global           TRUE
  SFFloat  [in,out] intensity        1      [0,∞)
  SFVec3f  [in,out] location         0 0 0  (-∞,∞)
  SFNode   [in,out] metadata         NULL   [X3DMetadataObject]
  SFFloat  [in,out] nearDistance     -1     -1 or (0,∞)
  SFBool   [in,out] on               TRUE
  SFBool   [in,out] shadows          FALSE
  SFFloat  [in,out] shadowIntensityshadowsIntensity 1      [0,1]
  SFNode   [in,out] texture          NULL   [X3DTexture2DNode]
  SFVec3f  [in,out] upVector         0 0 1
  SFFloat  [out]    aspectRatio             (0,∞)
}

TextureProjectorParallel is a light that projects a texture into the scene, applying the projected texture to any geometry that intersects the perspective projection volume.

Perspective texture projection is shown in Figure 42.5.

Description of perspective texture projection

Figure 42.5 — Description of 3D perspective texture projection

global, on and texture fields are the same as illustrated in the Abstract node.

The aspectRatio is the aspect ratio of the width and length which refers to perspective projection spect ratio.

The description field of this node tells the name of the persepective projector, and makes the division of different perspective projectors possible.

The direction is the way the perspective projector is heading, and this implies to perspective projection direction.

The fieldOfView is the extent of the observable texture that is seen on the perspective display at any given moment. This value may change depending on the aspect ratio of the rendering resolution. The default value of this field is π/4.

The location shows the position of the perspective projector, and this implies perspective projection point.

The nearDistance and farDistance is the minimum and maximum distance that is shown on the screen, respectively.

The upVector describes the roll of the camera by saying which point is "up" in the camera's orientation. The default value of this field is (0 0 1).

TODO: convert to ClassicVRML syntax

EXAMPLE:  TextureProjector

TextureProjector {
  description "Project a red delicious texture"
  direction -1 0 -1
  farDistance 10
  fieldOfView 0.26
  global TRUE
  location 3 3 3
  nearDistance 1
  on TRUE
  upVector 0 1 0
  texture ImageTexture {
    url [ "image/Red_Delicious.jpg" ]
  }
}

<X3D profile="Interactive" version="4.0">
 <Scene>

  < TextureProjector
	description='pt1' location='3 3 3' direction='-1 0 -1'
	fieldOfView=‘0.26' nearDistance='1' farDistance='10'
	upVector='0 1 0' global='true' on='true'>

	<ImageTexture url='"image/apple.jpg"'/>
  </ TextureProjector>

  <Shape>
    <Appearance>
	<Material diffuseColor='0.5 0.5 0.5'/>
    </Appearance>

    <IndexedFaceSet solid='false' coordIndex="3 2 1 0 -1, 4 5 2 3-1, 5 6 1 2 -1">
    <Coordinate point="1 0 1, -1 0 1, -1 0 -1, 1 0 -1, 1 1 -1, -1 1 -1, -1 1 1 "/>
    </IndexedFaceSet>
  </Shape>
 </Scene>
</X3D>

42.4.2 TextureProjectorParallel

TextureProjectorParallel : X3DTextureProjectorNode {
  SFFloat  [in,out] ambientIntensity 0         [0,1]
  SFColor  [in,out] color            1 1 1     [0,1]
  SFString [in,out] description      ""
  SFVec3f  [in,out] direction        0 0 1     (-∞,∞)
  SFFloat  [in,out] farDistance      -1        -1 or (0,∞)
  SFVec4f  [in,out] fieldOfView      -1 -1 1 1 (-∞,∞)
  SFBool   [in,out] global           TRUE
  SFFloat  [in,out] intensity        1         [0,∞)
  SFVec3f  [in,out] location         0 0 0     (-∞,∞)
  SFNode   [in,out] metadata         NULL      [X3DMetadataObject]
  SFFloat  [in,out] nearDistance     -1        -1 or (0,∞)
  SFBool   [in,out] on               TRUE
  SFBool   [in,out] shadows          FALSE
  SFFloat  [in,out] shadowsIntensityshadowsIntensity 1         [0,1]
  SFNode   [in,out] texture          NULL      [X3DTexture2DNode]
  SFFloat  [out]    aspectRatio                (0,∞)
}

TextureProjectorParallel is a light that projects a texture into the scene, applying the projected texture to any geometry that intersects the parallel projection volume.

Parallel texture projection is shown in Figure 42.4.

Description of parallel texture projection

Figure 42.4 — Description of 3D parallel texture projection

The description field of this node tells the name of the perspective projector, and makes the division of different perspective projectors possible.

The location shows the position of the perspective projector, and this implies perspective projection point.

The direction is the way the perspective projector is heading, and this implies to perspective projection direction.

The fieldOfView is the extent of the observable texture that is seen on the parallel display at any given moment. This value may change depending on the aspect ratio of the rendering resolution. The default value of this field is (-1 -1 1 1).

The aspectRatio is the aspect ratio of the width and length which refers to perspective projection spect ratio.

The nearDistance and farDistance is the minimum and maximum distance that is shown on the screen, respectively.

global, on and texture fields are the same as illustrated in the Abstract node.

cube 42.5 Support levels

The texture projection component defines levels of support as specified in Table 42.2.

Table 42.2 — texture projection component support levels

LevelPrerequisitesNodes/FeaturesSupport
1 Core 1
Grouping 1
Shape 1
Rendering 1
Texturing 1
X3DTextureProjectorNode n/a
TextureProjector All fields fully supported.
2 Core 1
Grouping 1
Shape 1
Rendering 1
Texturing 1
TextureProjectorParallel All fields fully supported.
--- X3D separator bar ---