The Java3D API
We will need these links:
Although Java 3D has been available for several years, today it is truly poised to make a tremendous impact in the world of interactive 3D development. In much the same way that java itself grew significantly in the years that have passed since it was first unveiled, the latest version of Java 3D is clearly ready for prime time.
We will review a number of examples. Screenshots are provided below. Code will be available at the time of the workshop on line, in the web page.
This is probably the simplest meaningful example one can come up with. It displays a spinning color cube which we see below frozen in time.
2. Transformation, Viewing, and Picking
This application illustrates tools that most Java 3D programs use: transformations, viewing, and picking. Transformations change the position, orientation and size of objects in your virtual world. Viewing renders your 3D world into 2D images from the point of view of a virtual observer. Picking finds the shapes in your world that are being pointed to by the mouse. We will experiment with these concepts (and especially with compound transformations) on a simple model of a human body, seen below.
3. Translation, Scaling and Rotation
We review the basic transformation operations using a special browser in a simple scene.
4. Aerial View of Boston
One of the examples presented creates a virtual model of the city of Boston. The example loads a predefined spline curve from a file and takes the viewer on a virtual flight around the city. Three helicopters each flying a spline curve loaded from a file have attached point sound sources. The 3D engine generates spatial sound from the three sources.
5. Avatars and Platform Geometry
This simple example simulates driving a car in a crowded street.
6. Multiuser Environments
Two users sharing the same space, three views:
a) on the left a view from the ceiling. Jim and Dan are represented as oriented cones.
b) Jimís view in the middle shows Dan (a red cone facing elsewhere).
c) Danís view is that of the green wall. Heís not aware of Jim watching him.
The cones can rotate and move. The program is not networked.
Note: Dana and Leslie would be better choices for the names of the two users.
7. Java 3D and VRML.
This example loads a VRML format data file and allows the user to rotate, translate, and scale the loaded model. Java3D is an extension API provided by Sun that provides 3D graphics capabilities to Java applications. It is not the only 3D API for Java. There are several commercial APIs that are available that provide bindings to more established APIs like OpenGL and Direct3D. On the other end of the scales are modelling languages like VRML that are very high level and conceptual in nature. All of these can be used to create the building blocks of a 3D application.† Java3D, as a relatively new 3D API, tries to learn a lot from the existing camps that have provided 3D graphics interfaces for programmers. It sits somewhere in the middle of the low level APIs like OpenGL and high level like VRML. However, in the end it is still a programming API. You won't find an artist 3D worlds with Java3D.
8. Java Fly Through.
Scenes from an application resembling the spline interpolation shown earlier.
9. Loading Geometry
Model of a galleon and a Beethoven bust are loaded into Java 3D.
Last updated on Nov 4, 2004, by Adrian German for JETT IU 2004