3D Graphics Tools for Java
N. Rao
University of New York Tirana, Albania
Contents
Abstract:
There are several packages for 3D graphics in Java that have come up in the past decade with varying degrees of success. This paper does a survey of not only the features of these tools, but also about their importance and the future prospects of Java based graphics tools. There are powerful graphics libraries such as OpenGL for 3D graphics applications on standalone systems, but there remains a prevalent need for a 3D graphics library aimed at Internet based graphics applications. This has led to a lot of Java based libraries being developed. Some of these tools have become quite popular and some of them have become obscure considering the demands of technology such as band width and complexity. This presents the need for a general comparative survey of some of these tools which are likely to play a major role in the future. It gives a brief description of why some tools have become quite popular. Also we will take a look at the compatibility of these tools with community developed Linux Operating Systems such as Ubuntu, in particular.
The development of JOGL started in the summer of 2002 by former MIT graduate students Ken Russell and Chris Kline. However, it was later taken over by the game technology group at Sun Microsystems, and is currently being handled by them. It is available under the Berkeley Software Distribution (BSD) license. It is also referred to as the JSR 231 Specification. The major advantage of JOGL is its industry support which it is receiving in terms of development. Initially JOGL was supported by Sun Microsystems, Apple and IBM, and later by SGI and 3D Labs. The first version of JOGL, named JOGL Version 1.0 was released in April 2004. The current build of JOGL is referred to as JSR-231 1.1.0.
JOGL has simplified the construction of robust 3D applications and games in the Java programming language. JOGL is designed to provide hardware-supported 3D graphics to applications written in Java. It is part of a suite of open-source technologies initiated by the Game Technology Group at Sun Microsystems [7]. Developers with prior knowledge of OpenGL will find quite comfortable adapting to JOGL because JOGL provides full access to OpenGL API.
The major Features of JOGL include proving low level bindings for OpenGL and granting full access to Open GL 2.0 Specification. Apart from this JOGL also provides hardware-supported 3D graphics for Java based applications, which gives it a significant edge over other tools. JOGL also has integrated AWT and Swing widget support integrated. The way JOGL functions is that it parses the C header files from OpenGL (which are in ‘C’ only) and then using the Java Native Interface (JNI) converts them to Java libraries. This enables JOGL to access OpenGL library using JNI calls. This functionality marrows down the performance gap between Java and other programming languages. However, there is one major drawback of JOGL, which is likely to be over come in the future versions. It lacks helper functions that are available in Java 3D [8].
JOGL also has the advantage of being smaller in size and also for its support to OpenGL shading technologies. JOGL is also supported by Linux (AMD64/x86) Distos, such as Ubuntu.
The Light Weight Java Game Library is a Java binding to OpenGL. The Light Weight Java Game Library also has additional game components including human interface which provides it a significant edge over other similar libraries. The only major requirement to use this tool is the presence of Java 2 Platform on the system. The major platforms supported include Windows (98 and above), Linux (AMD64/x86) and Mac OS X (10.2 or later).
Light Weight Java Game Library was first released in February 2007 as LWJGL 1.0. The next version LWJGL 1.1 was soon released after the first version in April 2007. Light Weight Java Game Library is available under the Berkeley Software Distribution (BSD) license.
The Features of LWJGL include it being simple, robust and secure. Apart from that LWJGL provides access to OpenGL and OpenAL. It also provides support for development of 3D games and 3D sound. It allows amateur and professional Java programmers to develop games. One of the significant advantages of LWJGL is its support for applets. However, there are two related drawbacks with this tool. As of now there is not support for Swing and AWT, which imposes certain limitations in its usage. In addition, it is not portable with DirectX, but this is not of major consequence as there are provisions within LWJGL which allow such an implementation.
Additionally LWJGL provides access to controllers such as game pads, steering wheel and joysticks and other such controllers. The latest versions of LWJGL are supported by Ubuntu.
Java3D is a client side Scene Graph API based on Java Language. The minimum requirement to have Java 3D is to have Java2 platform on the system. The first version of Java 3D, Java 3D 1.1 was released in December 1998. Although two more versions of Java3D 1.1.2 and 1.2 were released later, there was a short gap in development from mid 2003 until summer 2004, the development process again started during late 2004. Finally Java 3D1.4.0 was released in February 2006. The current development version of Java 3D is 1.5.0.
The major platforms supporting Java 3D are Windows, Linux (AMD64/x86), Mac OS X (With JOGL), Solaris (SPARC/x86). Java3D is based on the concept of an object-oriented scenegraph. Java 3D provides a purely an object oriented approach of designing 3D systems, and at the same time can render VRML animations. VRML animations have the advantage of being portable to different applications. Apart from that Java 3D also handles 3D rendering by the native code of OpenGL. One of the major advantages of Java 3D is its support for 3D sound.
Java3D offers support for collision detection and spatial sound. There are three rendering modes: immediate mode, retained mode, and compiled-retained mode, which can be even mixed. This in turn gives the developer a lot of agility while designing graphics [6]. These three rendering modes maximize the performance of the application and that in turn gives the developer a lot of flexibility in terms of performance. However, there are some drawbacks associated with Java 3D. These include compatibility issues associated with various browsers. However, it does offer plug-in support, which means that web based 3D graphics and visualizations can be run using applets [2].
There is also another shortcoming which developers are likely to encounter with Java3D. Java 3D does have some limitations that is likely to lead them to implementing Java Open GL. The short coming is that Java3D does not allow complete control over images as JOGL. Java 3D is primarily a 3D scene graph API. Java 3D provides a high level, object oriented framework for 3D graphics programming, with about 360 classes. It is an extremely well formulated object oriented scene graph for Java.
There were initial issues with porting Java 3D applications on Linux based systems, but now the Blackdown Java-Linux implementation of the Java3D 1.3 API is available for Linux/AMD64 and Linux/i386 now. It has to be downloaded and all Java3D applications can now be easily developed on Linux based systems. There is growing integration of Java3D with Linux based Operating systems and this trend is likely to continue with the rising importance of open source based software.
The Aviatrix3D Toolkit is an open source API. It is currently distributed under the Lesser General Public License (LGPL). The current Stable Release of Aviatrix3D was released on April 2006. The current development release of Aviatrix3D was released as on January 2007.
Aviatrix 3D is based on JOGL. Aviatrix 3D is based on an oriented towards large scale visualization. It has excellent performance enhancing strategies and a rendering engine for the Xj3D Toolkit's OpenGL implementation [9]. Apart from that Aviatrix 3D provides support for lightweight and heavyweight rendering, as well as spatialised audio using JOAL bindings. This makes Aviatrix 3d one of the major contenders and a top quality Java based 3D tool.
The drawbacks of Aviatrix3D include the lack of audio rendering in the beta version which was released this year. Apart from that multi-pass rendering on off-screen textures is not supported currently [9].
The Xith3D project was initiated by David Yazel in 2003. It is available under the Berkeley Software Distribution (BSD) license. The current stable version of Xith3D is v0.8.0 as on June 2006. The latest beta version Xith3D v0.9.0 – beta2 was released on February 2007.
Xith3D provides input abstraction by using Hybrid Input Abstraction Layer (HIAL) for Java. It consists of powerful middleware including a scenegraph and an extensible renderer. It also has excellent performance enhancing strategies [10]. Another key advantage which makes it so powerful is that it is portable with JOGL and LWJGL. Xith3D also provides good support for game development, and is quite suitable for Prototyping and visualizing 3D models. It uses similar central scene graph structure as Java 3D but can directly call OpenGL operations. [11]
However there are two drawbacks associated with Xith3D. The major drawback is that there is limited documentation support and apart from that screen graph thread safety not ensured. [11]. However, it is likely that in future versions these drawbacks would be resolved.
The features of jME include high performance scene graph based graphics API. It also includes support for AWT, Swing and Applets. They are currently implementing LWJGL 1.0 and future support for JOGL likely [12]. jME currently supports OpenGL and OpenAL. It is best suited for gaming. However, the drawbacks associated with jME include issues with threading, but this not a major issue as work is already under progress.
AgentFX is the dominant platform for the visualization of three-dimensional objects in real time [13]. One of the key advantages is its support for AWT and Applets. AgentFX is platform independent and object oriented design [13]. It offers real-time shadows, render-to-texture support provided which is not available in Java 3D. AgentFX also provides excellent support for gaming. It also offers high performance real time 3D Graphics. The drawbacks associated with AgentFX are the lack of support for applets which is currently not provided.
JView provides a rich visual environment for pre-processing tools [14]. The JView API also provides access to low-level OpenGL calls. The key advantage associated with JView is that it offers comparatively better performance. It uses scene graph architecture and is mostly used for visualizations. It also provides support for both 2D as well as 3D Graphics.
There are some drawbacks associated with JView. They include lack of complete and consistent documentation [14]. One of the major disadvantages associated with JView is that support for applet is currently not available.
Java 3D can be handled even by Java developers with minimum experience of Java. Java3D provides quite a useful API which can be used effectively by the programmers. However, there are many issues regarding its performance, due to which tools such as JOGL are slowly dominating.
The user can combine and correlate text with high quality 3D graphics in his HTML pages. This can be accomplished by the use of applets, and this would give the user better quality graphics to view in the web [6]. The user will also benefit from the CAD applications as well as gaming technology over internet, which in the future, is going to radically change with the use of Java3D.
It is suitable as a low level 3D API in the market. It is be easily understood and used by Java developers especially with a good understanding of C as it mainly deals with low level 3D API. However, even Java developers with not much expertise in C can also get accustomed to this quite quickly. JOGL is quite suitable for big projects and interactive applications as it has complete access to all OpenGL calls.
Users will find the 3D graphics and games based on JOGL a lot more attractive and interactive as JOGL provides full access to the API's in the OpenGL 1.4 specification as well as nearly all vendor extensions, and integrates with the AWT and Swing widget sets [7].
In our opinion, Aviatrix3D is best suited for needs of the data visualization market as well as modeling, visualization and simulation applications. This makes it a perfect tool for interactive applications. It is certainly not intended for the gaming market.
Xith3D mainly focuses on gaming market rather than visualization sector. It is well suited for both professional and amateur programmers. It offers a wide range of features which can ultimately lead to very high quality games. It is intended mainly for the gaming sector.
This is mainly aimed at professional as well as amateur programmers. The main target segment would be the gaming market, with small and medium level commercial games. LWJGL enables development of games with high quality 3D sound and art. There are limitations due to its lack of support for AWT and Swing.
jMonkeyEngine is best suited for game development. It is more suited for experienced programmers, who can develop highly interactive games. There is a huge potential in the gaming market. The current disadvantage with Windows based DirectX supported gaming is that they can be run only on Windows based systems. However, with the development of the Java based 3D graphics tools, it offers a larger gaming segment, with a large number of people preferring community developed Linux based operating systems such as Ubuntu.
There are a wide range of possibilities that the graphics developers have been offered and in our opinion there is a huge scope of development and growth; considering that all the tools discussed can make optimum use of the potential of both Java and OpenGL. In April 2007, the availability of a complete Java Stack in Ubuntu was announced, which is a step forward towards more support for Java based 3D graphics tools in the future on community developed Linux Operating Systems. Java fits perfectly in such cases for development of 3D graphics tools as it is independent of the operating system, and the tools can easily be ported.
The advantage of incorporating the Java based 3D tools and making them available on Linux based operating systems such as Ubuntu is that there is going to be a huge segment of market in the future, driven by developing countries, using such operating systems. This growth is not only limited to developing countries but also to large parts of Europe are now preferring open source software. Hence Java based 3D tools are going to play a major role not only in the areas of 3D graphics and game development but also in all the related fields of modeling and visualization.
The authors are thankful to Turlif Vilbrandt, Director of Development in the MIT-FabLab Norway, and to Professor Alexander Pasko from the Bournemouth University, UK, for their help with this manuscript preparation.