Java 3D API Customer Success Stories
Java 3D API Case Study Nearlife Virtual FishTank
The Opportunity Providing next generation 3D graphics technology to aid in the creation of a Virtual FishTank for the Boston Computer Museum.
"Emergent behavior" may sound like a mysterious psychological concept, but it simply refers to the complex behavior that can arise from interactions among individuals following basic rules.
Nearlife Inc., a design startup that develops entertaining, interactive content using cutting-edge technology, recently undertook a project to teach people about emergent behavior through an interactive medium. The phenomenon of emergent behavior is perhaps best understood by studying a school of fish, in which each fish maintains a specific set of rules: swimming at a specific distance from the surrounding fish, following the direction of the school and avoiding obstacles or aggressors. The result is a beautiful and complex pattern of interactions between the individual fish.
Nearlife's mission was to design a virtual fishtank environment that would give visitors the ability to "control" the behavioral characteristics of the fish by selecting rules that guide them. Nearlife used its proprietary software, called Directable Characters, to establish the behavior patterns of the fish, which are in turn governed by the interactions with other fish in the Virtual FishTank.
Nearlife needed to identify a 3D graphics language which was sophisticated enough to handle the complexity of multiple tasks yet user-friendly so that the engineers could quickly and easily complete the project. They wanted to take advantage of the many benefits of programming in a language using Java technology, including programmer productivity, network-centric environment and platform portability. They also wanted to avoid the frustrating and time-consuming process of writing middleware on top of C and C++ code, a necessity in most 3D programming languages today.
"We are interested in the sociological impact of emergent behavior, not the technical details associated with piecing together design features from several different programming languages," said Tinsley Galyean, director of Nearlife, Inc. "We were looking for a programming tool that would minimize tedious coding tasks, allowing us to focus on the design work that we do best."
The Solution
The Java 3D Application Programming Interface (API) brings the benefits of the Java programming language to the 3D design world.
When embarking on this project, Nearlife researched a number of next-generation 3D programming tools but found that those currently on the market could not meet their need for quality, availability and performance. Finally, Nearlife engineers discovered the Java 3D API. They were impressed with the flexible and robust features it offered and recognized that they had found the answer to their design challenge. Nearlife engineers agreed to use an early version of the programming tool, providing ongoing feedback to Sun engineers about their experiences.
Nearlife engineer Brian Knep said, "Java is a great language for full scale applications, not just Web applets. We didn't have to reinvent the wheel by writing our own scene graph API. Java 3D API is real and here today and allowed us to get the job done."
The Benefits of Java 3D API
Why did Nearlife choose the Java 3D API over the alternatives? The Java 3D API saves time and protects future projects because it is network-centric and platform independent. It makes programming fun again because it alleviates tedious grunt work for developers.
Java 3D API is a Time Saver
Because the Java programming language is so easy to learn and use, it saves a tremendous amount of development time. This ease-of-use has already made Java technology very popular in the general developer community, but there was no mechanism for taking advantage of the benefits of Java technology in the 3D design world until Sun undertook the development of the Java 3D API.
Galyean says, "Sun was very ambitious in the features and capabilities it incorporated into the Java 3D API, but even with its robustness, we found it to be quick to learn and easy to use."
In addition to saving time through ease-of-use, the robust design of the Java 3D API allows it to handle complex modeling information with ease, speeding the development process. The Java 3D API, for example, incorporates geometry compression as part of its specification, which allows very large 3D models to be rapidly downloaded over the network for remote viewing and manipulation, reducing the impact of potential bottlenecks in network bandwidth.
Platform Independence
The Java 3D API gives developers the ability to do high-end 3D visualization over the network, regardless of the target platform. This protects investments in hardware and development time, enabling their applications to run on any system.
In addition, because the Java 3D API layers on top of existing hardware accelerators such as the low-level APIs OpenGL and Direct3D, programmers are able to take advantage of the underlying hardware without having to worry about it during development.
"The API gives us access to a lot of our favorite OpenGL features, and adds a scene graph architecture making it simpler and easier to use," Knep explained from the developer's perspective. "We liked the idea of using Java technology so that we could protect future platform independence."
Applications written with the Java 3D API can, in addition, render images to a broad range of display devices including flat screen displays, stereo displays, head-mounted displays and even virtual reality portals and caves, all without modification to the code. Java 3D-based applications can also accept input from continuous action devices such as trackers to increase end-user interactivity.
Relieves the Burden of Mundane Tasks
One of the great assets of Sun's API is that it performs much of the "grunt work" for the developer. Mundane tasks such as scene graph traversal or attribute state management are all taken care of by the API, saving time and allowing developers to concentrate on design work.
"We used to spend a lot of time dealing with memory leaks and memory corruption," Knep said, "but Java technology has it's own garbage collection feature that manages memory very nicely."
The Results
Java 3D API eased and speeded the development of the self-contained, dynamic educational tool.
The Virtual FishTank was installed at the Boston Computer Museum, and the June 12, 1998 opening was a resounding success. Visitors to the museum are learning about emergent behavior characteristics in the 2200 square foot simulated underwater environment by creating and programming their own fish, and then observing the fishes' reactions to other creatures as well as the presence of food.
With the help of the Java 3D API, Nearlife engineers enjoyed the break from the arcane process of creating a "glue" to marry C or C++ code to Java programming language code. In addition to the significant amount of time this drudgery would have required, delaying a project for weeks or even months, it would have also detracted from the developer's goal - content creation. Using the Java 3D API allowed them to create content with Java technology throughout the process.
The performance requirements of this huge undertaking were not lost on the Java 3D API either - even at its early alpha phase. According to Knep, "Our goal was to achieve 12-15 frames per second. With the Java 3D API, we now exceed 10-30 frames per second and we have every confidence that Sun will be able to increase the speed even more in the near future."
The Nearlife Virtual FishTank is just one of many real-world applications of the Java 3D API in existence today. Historically, a new graphics API appears on the scene each decade and revolutionizes the design market. The Java 3D API has all of the fundamental elements to make it the API of choice in the next generation of graphics development.
More information on the Virtual FishTank can be found on the Nearlife Inc. web site.
|