This is a child page. You can use Parent in the quick nav bar at the top or the bottom of the page to navigate directly back to the parent of this page. Some child pages are more than one level deep, and in that case will require more than one Parent click to reach the outermost document level.

§ 16.90.6.7 - Multiple Objects and Changing View

What good is a pool ball if you don't have a cueball?

Adding the second object is a small matter. The reflectivity of the objects has to change to seem more realistic. The target viewpoint was also changed so that both objects were within the viewing frustrum.

Library:  <libpath "c:\w3\"  <lib "textures.w3d" Pool ball:  <normalize  <position 0 0 0  <radius 3  <apply "glossy" We need to change the reflectivity of the balls because the resulting image was unrealistic. While pool balls are glossy, they are not very reflective. The trait "glossy" sets reflectivity to full. The resulting objects look more like colored mirrors than pool balls. The following element overrides the reflectivity set by the trait.  <reflectivity 0.1  <color 1 0 0  <imagemap "c:\imagemaps\raytrace_imagemap_1.jpg"  <object sphere "My Sphere"  <normalize Cue Ball:  <position -7 0 0  <radius 3 Place cueball to right of the four ball.  <apply "glossy"  <reflectivity 0.1 See the identical command (above).  <color 1 1 1 White  <object sphere "My Sphere" Optimize speed:  <object bound Light:  <normalize  <position 50 50 -75  <color 1 1 1  <object light "light_1" Camera:  <viewlocation 0 0 14  <viewtarget -3 0 0 Look a little right of center

This is the end product of the script.
 Note:

A  <object bound is a sphere that encompasses all the objects in the scene since the beginning of the scene, or since the last bound if there are previous bounds in use.

Bounds add to the efficiency of the ray tracer by acting as a general test case. If the light ray does not intersect the bounding sphere, there is no necessity to follow up by testing for intersection with any object inside the bounding sphere.

The more complex the scene, the more resources you save by bounding groups of objects that are near each other.

Let's add to the complexity of this scene. Go on.

Keyboard Navigation
, Previous Page . Next Page t TOC i Index o Operators g Glossary
WinImages F/x, Morph and all associated documentation
Copyright © 1992-2007 Black Belt Systems ALL RIGHTS RESERVED Under the Pan-American Conventions
WinImages F/x Manual Version 7, Revision 6, Level A

Valid HTML 4.01 Loose
 

This manual was generated with wtfm
wtfm uses aa_macro and SqLite
aa_macro uses python 2.7
Page 242
box