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.5.30 - object (SceneScript element)

 <object Type "name"

The  <object language element is the one that actually places items into the rendering space. Generally speaking, you set up the elements you want to apply to the object first, and then define the object.

When placing triangles, an additional modifier may be placed after groups of such triangles: See the  <smooth language element for details.

There are five types of objects you can place. Most have their own specialized geometric preconditions that must be set up before the object is placed. Here they are:

ObjectUsageGeometric Precursors
Rectangles <object rect "name" <vtx0 X Y Z  <vtx1 X Y Z  <vtx2 X Y Z
Rects are set up just like triangles, the upper right corner is not specified.
Triangles <object tri "name" <vtx0 X Y Z  <vtx1 X Y Z  <vtx2 X Y Z
Spheres <object sphere "name" <position X Y Z  <radius Number
Lights <object light "name" <position X Y Z
Bounds <object boundNone

In simple terms, the objects you use to construct images are the triangle (tri), sphere, and rectangle (rect). You illuminate these with lights, and tell the raytracer where groups of objects (except lights — they don't need or use bounds) are with one (or more) bounds.

 Note:

Bounds are of special interest; you need at least one at the end of a scene file. You can use more than one. In many cases, you benefit from using more than one. A bound groups objects for the raytrace engine — in technical terms, it places them inside "bounding spheres."

If objects that are grouped in a small region — such as all of the triangles that make up one of the gem library composite objects — have their own bound statement, the ray tracer will run much faster. This is because it knows that unless a light ray hits that bounding sphere, it doesn't need to consider the triangles for the gem at all. This is because they are inside the sphere. The number of mathematical operations per ray are greatly reduced by this approach.

Some ray tracers don't handle bounding — some handle it automatically. This one puts you in the driver's seat. If it's all magic to you, just put one  <object bound at the end of each scene file you create and don't worry about it!

So, as a simple example, to create a scene with one plain red rectangle, you could do this...

 <apply "matte"  <vtx0 -.5 -.5 0  <vtx1 .5 -.5 0  <vtx2 -.5 .5 0  <color 1 0 0  <object rect "test rectangle"  <object bound

...and then follow it up with a light:

 <position 45 45 45  <color 1 1 1  <object light "light one"

Objects (except bounds) follow the  <axis and  </axis language elements. Because of this, you can translate, scale, and texture groups of items as one. You can also co-locate lights with one or more objects (and specify an object as a light source!) so that moving sources of illumination may be defined.

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 202