< Zurück | Inhalt | Weiter >

7.1 Choosing a data model

When designing your 3D application the obvious place to start is to consider your user’s view of the application. Everything that is rendered (drawn) by the underlying Java 3D scenegraph renderer can be described as geometry. Discussions of geometry are generally independent of such issues as user interaction, view parameters and rotation, rendering attributes, and object lighting.

The geometry defined in your scene is rendered by the Java 3D renderer using the current view parameters and the geometry’s attributes, such as color, material, and lighting. The choice of geometry description will probably be the most influential factor in deciding eventual application performance. Deciding the geometry description will always entail making several compromises between contradictory factors such as rendering speed and quality, size of data models, asset managements and load time.

A simple 3D model viewer might simply load a 3D model file (perhaps in VRML format), use a Java 3D file loader to convert the model into Java 3D objects, then render it. For interactive applications however (such as games requiring complex character animation) or scientific visualization applications dealing with large data sets, such a simple approach will rarely suffice.

3D character animation may require that a data model support animation using inverse kinematics, that it implement skin−and−bones animation systems that can be scripted, or that it have data from motion capture devices played back through the characters. The Cosm team (http://www.cosm−game.com) is busy creating an online world built using Java and Java 3D that includes skin−and−bones character animation. You can also download some sample code for skin−and−bones animation from http://www.j3d.org

Motion capture is becoming an increasingly important technology for the level of realism required by the latest games. Dedicated motion capture labs, such as EdVEC in Scotland (http://www.edvec.ed.ac.uk), provide sophisticated camera equipment to capture 3D motion and data models.

Scientific visualization applications are generally required to visualize extremely complex data sets, which may not have an obvious representation as 3D objects. Key elements of these applications choose informative 3D data representations, process the raw data, and ensure that the processed data can be rendered efficiently. Visualization data sets may be N−dimensional (meteorology or MRI data for example) or may have to be created from thousands of 2D images as in the Visible Human Project (

Algorithms to construct surfaces from 3D data points, adaptive meshes, and dynamic levels of detail may all be required to generate compelling interactive worlds from the raw input data. It is hard to overstate the importance of understanding your feature and performance objectives as you design your data model. Java 3D provides little support for anything other than simple point, line, and triangle rendering, so you may need a convenient internal representation (model), which can then be converted into a representation for rendering (view). The rendering representation may need to make assumptions as to the current available hardware, or it may be adaptive and modify the representation based on a target frame−rate for the application.


7.1.1 Surface models
7.1.2 Volumetric and mathematical models
7.1.3 Implementing in Java 3D