|
|
Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Page 2 of 6
Computer games and 3D graphical information systems typically allow the user to change what is displayed on the screen by either manipulating the location of objects in a scene or by moving through the scene, often refereed to as flying through the scene.
To support fly-through and other real-time screen update sequences, developers must implement the most efficient data structures and scene-rendering techniques. One scene-rendering technique used to display virtual worlds is called level-of-detail (LOD) optimizations. This technique draws objects close to the viewer in fine detail, and objects farther away in less detail. For example, when viewing a person's face up close, all the details of nose, eyes, mouth, teeth, and so on, would display on the screen. A simple oval may represent the same person viewed from afar. This can save much processor time, especially if you are depicting a stadium full of people!
Some graphics programmers have shunned Java for its perceived inefficiency and overhead in allocating objects. Java 3D gives
the programmer numerous ways to represent a scene's geometry. For example, a coordinate with x, y, z values can be stored
as 3 ints, 3 floats, 3 doubles, a Vector3f object, a Point3f object, or a Tuple3f object, to name just a few. A TriangleFanArray, TriangleArray, or TriangleStripArray can represent a triangle whose attributes are passed by value or by reference, indexed or nonindexed, and interleaved (where
coordinate, color, and texture data are stored in the same array) or noninterleaved (where coordinate, color, and texture
data are stored in separate arrays).
Knowing I would be programming many data points, I tested the Java 3D geometric primitives to see which were the most efficient.
I tested several different configurations comparing TriangleArrays versus TriangleStripArrays, interleaved versus noninterleaved attributes, and indexed versus nonindexed attributes. I found that the combination of
using TriangleStripArrays (explained more in the section below) with interleaved arrays of floating point data was by far the fastest configuration
for rendering the screen and consumed the least space. This means not using low-level objects such as Color3f, Point3f, and Vector3f to store data. Instead, I use arrays of floats. I describe these arrays' formats in more detail later. Since I scaled the scene such that 1 unit equals 1 meter, floats gives me more than enough precision; also, using doubles serves no point, as the documentation indicates that Java 3D converts everything to floats anyway.
To demonstrate the fly-through, terrain-modeling, and level-of-detail optimizations, I created an application capable of reading in a DEM file and allowing the user to navigate through the world. The examples shown in this article use the Grand Canyon East dataset. Figure 2 presents the application's structure. The shaded ovals represent objects I created.

Figure 2. Application architecture
This section briefly overviews the functions performed by each of the high-level objects that make up my demonstration application.
Archived Discussions (Read only)