Hi Dave,

Did you have any plans for implementing helper methods for device selection
capture inside the overlay?

I'm thinking of an application where you might display a map of your
'universe' in the overlay, and move the user to the location they click on
in the overlay.

Just a thought. Your library sounds like a great idea.

Adrian.


"Yazel, David J." <[EMAIL PROTECTED]>@JAVA.SUN.COM> on 11/06/2001
11:58:01 PM

Please respond to Discussion list for Java 3D API
      <[EMAIL PROTECTED]>

Sent by:  Discussion list for Java 3D API <[EMAIL PROTECTED]>


To:   [EMAIL PROTECTED]
cc:
Subject:  [JAVA3D] Overlay Library


We have started working on an overlay library for java3d. I know this is
something that might be of interest to all of you.  Initial tests are
proving very favorable.  We are seeing speeds which rival video textures,
which means limited by texture transfer time.  We will be releasing the
code
when we are done (within 2 weeks).  Please feel free to comment on the
following features and to make suggestions or comments for enhanced
functionality.  As a note: advanced overlay control like mouse control,
listeners, data input, etc, will be done as a separate project using the
overlay system, so only include enhancement requests for the overlay
package
itself.

1. Creation of overlay objects specified in screen space.
2. Overlay is implemented using textured quads.
3. Overlays can be of arbitrary size
4. Sub-overlays are automatically calculated to reduce the amount of
texture
memory used.  So an overlay of 130 x 70 will be implemented using one
128x64
texture, one 128x8 texture, one 4x64 and one 4x8 texture.  You can specify
the min and max texture sizes to use.
5. Each sub-texture is double-buffered with two ImageComponents
6. The buffers are by reference and the code automatically swaps the scan
lines.
7. To use it all you do is extend Overlay and implement a paint(Graphics g)
method.
8. repaint() triggers a repaint of the main buffer which is then broken
into
pieces, scan-line swapped and placed into the back-buffer images.
9. A behavior handles the texture swap if the back buffer is dirty and we
are not in the middle of a re-draw.
10. Alpha and non-alpha Overlays are supported.  Alpha-clipping is also
supported as a special mode to create non-rectangular overlay.
11. You can change the position of the overlay at any time, including
moving
it off the screen and out of view.  The position is specified in
screenspace.
12. You can set the overlay's visibility.
13. You can set the maximum number of updates per second you will process.
14. The overlay will automatically correct itself if the canvas is re-sized
so that calculations mapping pixels to world remain consistant.
15. Overlays are perfectly aligned with screenspace, text is crisp and
readable.
17. No plans to implement resize because of the issus involved in
rebuilding
the sub-textures.  Would be easier to just make a new one.  We might
support
use of model-clips to clip in from a maximum size.

Notes:

System memory overhead for each overlay is 3 * (height * width * (3 or 4).
Texture memory used is (height * width * (3 or 4)).  Updating a 500x200
chatbox 3 times a second (max) has no noticible effect to framerates with a
busy scene including a particle fountain.  That was on a GeforceII GTS.
Small overlays are extremely fast with no noticible impact to framerates.

Please let us know if you see a need for some other features.

Dave Yazel
Cosm Development Team
www.cosm-game.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to