Introduction to CAAD 4D
VRML Construction Session
Preparing the images:
- Take a picture of the building, scan it and save it as .tga or
- take a video and capture the image of the building.
- Open the image in photoshop.
- Select
the part of the image you need.
- Use the Image->Effects->Distort menu item.
- Correct the perspective so it looks straight ahead.
- Delete or cover annoying information such as tree branches, wires,
etc.
- Clip
the area of interest.
- Save the image as .tga (24pixels)
Preparing the model:
- Open formZ and create a simple model of the building
- Go to the surface's palette and click on the empty area at the bottom
- In the pop-out dialog select imagemap, then options, then load, then
the .tga file of your image
- Click OK
- Go back to the model and select the object you want to apply the texture
- Select the texture map tool
- In the dialog box make sure that the vertical or horizontal length
is equal to the height or width of your object and the the
- if you want to apply a texture only on one face, select the face and
then use the texture mapping tool. In this case you can use the flat mapping
type
-
- Do the same thing for all the objects in the scene including pavements,
streets, grass, etc.
- When done save the file as VRML.
- Set the options as shown below:
- The resulting .wrl file is in text format so you can open it in wordPad
or NotePad
- if you ned to set a background to the scene use and modify the following
code:
DEF NavInfo01 NavigationInfo {
avatarSize [0.25, 1.6, 0.75]
headlight TRUE
speed 100
visibilityLimit 0
}
Background {
skyColor [
0.0 0.2 0.7, 0.0 0.5 1.0, 1.0 1.0 1.0 ]
skyAngle [1.39, 1.571 ]
groundColor [
0.8 0.8 0.8, 0.6 0.6 0.6 , 0.3 0.3 0.3 ]
groundAngle [1.39, 1.571 ]
}
-
- Use should able to run the .wrl file in Cosmo under netscape (the latest
Cosmo and Netscape installers are in the class Public folder)