***Java 3D
by John Latta
On May 27th Sun released its draft version of the Java 3D API. Sun claims
that it has borrowed from many low level APIs including Direct3D, OpenGL,
QuickDraw3D and XGL. The API is focused on a high-level scene graph
programming paradigm. It also includes support for 3D spatial sound, a
viewing model that supports many forms of displays including stereo and
cave type systems, and sensors for motion tracking.
There are three rendering modes: Immediate mode, Retained Mode and
Complied-Retained Mode. In the immediate mode Java 3D works on an object
basis but does little global optimization at the scene graph level. In
the Retained Mode the application designates which elements of the scene
graph may change during rendering. The complied retained mode the
application is allowed to compile parts of the scene graph into
subgraphs. This allows Java 3D more flexibility in how it implements the
scene graph internally.
Java 3D will run on top of Direct3D, OpenGL and QuickDraw3D to allow Java
to run on most computers.
A behavior implementation works with two concepts: a scheduling region
which defines the spatial volume to enable scheduling of behavior nodes
and an initialization method that allows a behavior object to initialize
its internal state and specify the wake up conditions. Interpolators are
also supported that allow for the smoothing of responses between two
extreme values of actions. This is time based. LOD behaviors are also
supported.
Also include is a library called Math Objects which is a set of vector
and matrix math classes. Further, included in the specification is a
binary geometry compression format. This, for example, allows triangle in
a generalized mesh form to be specified in, on average, .8 vertices.
Sun highlights a number of API specification issues not defined in the
specification. These include scene antialiasing; audio output; fog,
lighting and sound spatialization equations and 3D text. In the future
the following is to be considered: off-screen rendering, rendering into
overlay planes, motion blur, depth of field, programmable shading
languages, procedural texture mapping and multiple texture maps.
Points to Ponder
As an API Java 3D has a close linkage to SGI and VRML 2.0. Yet, what is
missing are the practical details which determine how the language will
be effective in the market. Left open we were left pondering about the
following:
What is the performance of Java3D when working on top of other APIs?
How can developers get the most performance out of an implementation?
Where is the ability to pass through data from the hardware
acceleration such as the CAP bits in D3D?
This is a first cut in a robust language. However, much remains in making
this a target language when developers are trying to cope with the
options already available.
java.sun.com/products/java-media/3d
Comments, no later than 27 June, are invited at:
java3d-communications@sun.com
Wave Issue 9713 6/6/97 Article 3-01