magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1997 > 08 > Virtual Worlds  

Techniques for Controlling Texture Mapping

By Andrea L. Ames

Last month I discussed basic texture mapping in VRML. I also gave you a preview of a few techniques for maximizing the use of textures and creating 3D worlds that perform better on viewers' platforms.

The basic texture-mapping process I specified last month was:

  1. Build a VRML shape.
  2. Specify a texture as part of the shape's appearance.
  3. Specify the geometry onto which you want the texture mapped.

This month, I will explore in detail both step 2 and the texture-controlling techniques, or "texture transformations," at which I hinted last month. Step 2 can in turn be broken down into four parts, somewhat analogous to cutting cookies from a sheet of dough:

  1. Specify a texture image using the appropriate VRML node (ImageTexture, PixelTexture, or MovieTexture).
  2. Specify 2D texture coordinates to describe the shape of a "cookie cutter."
  3. "Cut" a piece of the texture image using the cookie cutter.
  4. Apply the texture to fit one face of a shape by mapping each corner of the texture with a corresponding face coordinate,transforming the texture as necessary to create the desired effect.

You can transform the texture just as you would geometry, by scaling, rotating, or translating it. You can also wrap, clamp, or repeat the texture, which you cannot do with geometry. You apply, or bind, the texture to one face by mapping texture coordinates to shape coordinates, similar to other forms of VRML binding (like binding colors to point sets, line sets, and face sets).




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2