Date: Mon, 16 Dec 1996 22:10:29 GMT Server: NCSA/1.5 Content-type: text/html Last-modified: Mon, 26 Feb 1996 14:39:35 GMT Content-length: 5247 CS418 Lab 7

CS 418: Laboratory 7

Image Techniques

Introduction.

In this exercise you will treat images as data to perform various useful graphics operations including texture-mapping, volume texture-mapping, and bump-mapping.


Procedure:

First you need to download several example files. To do this, click on each of the filenames shown below. When the text window opens, use the "save as" option to put the file in your own directory. Name each file with the same name as shown below.

Texture Mapping: The program imageRead.net will show you how to read an image, display it, and find its size. Note that an image in DX has a physical size corresponding to its initial resolution in world units, e.g. a 100x200 resolution image is 100 by 200 world units in size in the x-y plane with one corner at the origin. The reduce module lowers the resolution but does not change the size of the image, as you can see from the output of the Statistics modules which are configured to determine the max and min of the x,y coordinates of the image. Vary the interactor to change the image resolution. An image consists of a 2D field of 3-vectors representing the red, green, and blue values at each point. Marking the component "colors" of an image allows manipulation of the image.

The program Image2Texmap.net creats a flag image, then animates it as a texture-mapped, parametrically distorted plane.

Volume Texture Mapping: A volume texture map (see page 246 of Watt) produces a surface color on an object which is a function of the 3D coordinates of the surface. The program Volume.net gives an example of two volume textures; stripes and noise (see Images 3a+b).

Bump Mapping: Bump-mapping attempts to give a surface more interesting texture by varying the normals to the surface. The procedure causes the lighting model to assign different colors to patches of a surface, making it appear rougher. Two bump maps are shown below, a random perturbation of the normals and one that resembles tiles.


Assignment:

Construct a scene which includes:

The following image is one possibility. A flag is reflected in a mirror which is placed behind and below the flag. The sky is an image which has been parametrically warped into a cylinder. The image on the right shows a view of the scene zoomed out to show the "sky".


Design functions to produce volume textures simulating:
  1. a wood grain of concentric growth rings
  2. marble
  3. fiberglass
The new textures should be incorporated into the existing selector list on the control panel. In addition, modify the program to map the textures to a sphere and add an interactor to select between the sphere and the planes. The volume textures supplied in the program are shown below.


Starting with the program Bump.net, design bump maps which resemble:
Be prepared to demo:

You must document your code! Layout small groups of modules which fit on one screen and connect them to other groups with transmitters. You should use transmitters/receivers, macros, and comments in the "Notation" field of each module so that you and the grader can understand the program. Control panels, if any, should be well organized, labeled, and with the appropriate numeric ranges.

Back to Main Page
Go to Lab 8


Last modified, 1/18/96, B.Land.
Copyright Statement