Dan Oberlin (dan++at++mak.com)
Thu, 18 Dec 1997 15:19:25 -0500 (EST)
------------------------
| |
| |
| Picture Icon |
| |
| |
------------------------
|Red|Green |Blue|Yellow|
------------------------
We would like the icon and attached meter to always face the viewer as if
they were a single billboard. Periodically, as the state of the vehicle
changes during the simulation, we would like the graph to change to
reflect more or less of various colors.
Here are some approaches that we are considering:
1. Dynamically loading new textures for the meter.
In this approach, the icon and meter are both pfGeosets which are part of a
single pfBillboard. When the state of the meter changes, a new texture
is generated and replaces the texture of the meter. I have heard that
moving new textures into texture memory causes performance hits.
However, I would argue that the texture could be quite small (perhaps 50
pixels wide and one pixel deep). When scaled up to the size of the
meter, I would expect the texture to look like a series of colored
rectangles.
2. The meter is a dynamically changing pfGeoset.
In this approach, the meter data is not represented by a texture, but
by a series of colored rectangles in a pfGeoset. When the meter changes,
a new pfGeoset is built and it replaces the old one in the billboard. I
have heard that dynamically changing vertices can cause glitches due to the
multiprocessing nature of Perfomer, and that you have to take special
measures (involving the use of separate buffers) to work around these
glitches.
3. The meter is a series of switched billboards.
This method divides the graph into a number of (say 20) rectangles which
can change colors using a pfSwitch. Kind of like an LED meter where each
element can be one of several colors. Here is what the scene graph might
look like:
DCS
-------------------------
/ \
Icon Billboard Group of switched elements
-------------- --------------------------
/ | \
/ ... (maybe 20) ... \
/ | \
/ | \
Switch Switch Switch
------ ------ ------
Red Grn Blu Yel ... ...
Each of the colored rectangular units below the switch would be a
pfBillboard with a rectangle drawn in one of 20 horizontal slots below the
icon. The third switch would determine the color of the third element
in the meter. Each of the meter billboard units would have its origin
located at the same place as the origin of the icon so that the icon and
the meter units would rotate together and appear as a single billboard.
This is a more complicated solution and there would probably have to be
some math done for each of the billboards which could slow performance.
These are the three implementations that we have thought of. I am
interested in hearing comments on these ideas as well as any other ideas
that you may have regarding how to implement this meter.
I am currently waiting to be added to the Performer mailing list, so I
would appreciate it if responses could be sent to my email as well as to
the Performer list.
Thanks very much,
Dan Oberlin
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:56:27 PDT