Everyone is fascinated by that aproach and saying that binding open gl is the way to go for java games. Then they make some benchmarks showing some balls bouncing arround and pulling out great frame rates.

But this is just an illusion, Java3D does a lot more things than visualizing geometry. It does scene graph traversal and optimization, behavior and lod everything itegrated in the model. A game is much more than some balls bouncing on the screen, and thats why java bindings will never replace java 3d.

Read my avatar message: Java3D rules.

Of course that many people report performance problems but Java3D is a high level graphics API. Most of the problems come from bad use of memory not leaving time for the gc to work, not calling the gc immedeatly after setup, not stoping the renderer during setup, excess use of memory allocation during rendering times (which should be used only during setup phases), dangling sub-graph trees, you name it. In java3d there are one million ways to screw up your code if you don't read the specification right.

With all this said of course that java3d cannot compete with a C++ engine, neither an open gl binding running any real game. But we can use your imagination and make games that don't render so much polygons and don't use so much heavy textures. With this in mind java3d has anything we need to build great games. Remenber that a game quality is not measured by the number of polygons it is capable of drawing per frame.

Well, the original poster's experience of Java3D certainly differs from mine.

The real problems that I have had with Java3D, the ones that can not be worked around and would be labeled 'showstoppers' in commercial applications, are none of the issues mentioned above. They also do not have to do with reading the specification wrong, rather they have had to do with core design decisions of the API and its proprietary nature. Those problems are also solved by an open API like JOGL.

Specificly, Java3D's multi-threaded and opaque architecture as well as political issues surrounding the API is keeping Java3D from being a serious alternative for typical consumer-grade multimedia. The political issues have to do with the API being closed source so developers can not fix the architecture problems and the inter-company issues that is stopping Java3D from being available on Mac.

Just try playing sound with JavaSound or JMF (even worse with video) while rendering a slightly complex scene and watch the thread-chaos either turn the rendering into a slideshow or make the sound stutter. The opaque architecture offers very little opportunity for the programmer to affect any of this and the closed source policy prevents programmers from fixing or working around the bugs in Java3D's own sound API, bugs that have plagued the API from day one and are still not solved in the most recent release.

Sure, you can write some limited games, such as Law and Order, in Java3D, but I bet Shockwave3D would have been a much better alternative for the job. Especially with its tight integration with popular 3D-modeling apps and its Mac portability. The developers apparently had to port the game to GL4Java to get Mac portability, but that wasn not too hard because the game did not use much 3D at all (which is why they could even use Java3D).

Another reason for using an OpenGL binding is of course because such bindings tend to support extensions, such as programmable shaders, much quicker than Java3D, but that's not such a big problem YET since most consumers still seem to have cards without programmable shaders.

I hope I have cleared up some of the motivations behind using a 3rd party OpenGL binding. I am just curious, if Zingbat and MisterX really thinks that Java can't compete with C++ for real games, are you guys just here to learn how to use Java for scripting in your C++ engines? or are you maybe working strictly on the server side? Anyway, I don't think that belief is shared by most developers here.

I have been programming Java3D for 5 years now. It did a great job for many different applications as well as games.Unfortunately even low-end game graphics have raced passed J3D 1.3.1 renderer.

Yes, scene graphs are nice. Unfortunately, due to the way graphics hardware evolves, close access is probably going to be needed by most game developers to stay visually competitive.Of course, graphics aren't everything.But then again, movies stars aren't ugly. ;-)

I've looked into Java3D a bit. But the lack of Mac support (and if memory serves its Linux support isn't so hot either), I stopped. It doesn't make sense to go with Java but then deny yourself one of Java's greatest strengths, relative ease of going cross platform.