Skip to main content

Java 3D performance

1 reply [Last post]
Joined: 2004-06-07

I know, this is a Java 2D forum, but it's that closest I could find. The books on Java 3D all say that the performance of Java 3D over a C API into OpenGL is comparable due to internal optimizations, garbage collection notwithstanding.

However, they also say that if GC occurs during rapid animation, frames will be lost. Before I choose a path, the Java 3D path or the C API to OpenGL path, what can realistically be said about Java 3D performance when the goal is hyper-realistic drawing and gaming-caliber performance?

I figure I can save by learning a somewhat simpler API with Java 3D, but I don't want to commit to something that will hit a wall with performance and have to be abandoned.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-12

I can tell a lot about Java3D performance.

But first you need to compare apples with apples. Java3D is not a way OpenGL. For that, JOGL or LWJGL are the right APIs. Performance concerning that level of abstraction should be comparable with C/C++ solutions.

Java3D is a different thing. First, Java3D wasn't meant to used for games. It focuses more on versatility and scalability. Thus, the performance values are quite biased. Taking a more gaming related C/C++ counterpart like OGRE, Java3Ds performance may be quite poor.

For Java3D implements a scenegraph (like OGRE as well), the type of game should match that paradigma. Most FPS e.g. do not.

Here is an example what can be achieved with Java3D easily:

Hope that helps a bit,

- J