• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Transforming Textures

Although VRML's default mapping of textures to geometric surfaces may suit your needs, at times you'll find that you need more control over the way in which a texture is applied to a shape. Fortunately, VRML gives you two special-purpose nodes for such purposes. The easiest to use is the Texture-Transform node, as it lets you transform textures prior to mapping, using fields that are similar in nature to those of the Transform node that you learned about in Chapter 7, "Customizing Location, Size, and Orientation." Following is the VRML97 specification definition of the TextureTransform node:

  TextureTransform {
    exposedField SFVec2f center      0 0    # (-∞,∞)
    exposedField SFFloat rotation    0      # (-∞,∞)
    exposedField SFVec2f scale       1 1    # (-∞,∞)
    exposedField SFVec2f translation 0 0    # (-∞,∞)
  }


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint