advantages of Jogl

Hello everyone,

i know that this may sound strange to the community of jogl-users, but what are the advantages of jogl compared to java3D?

I don’t ask this reason for defending java3D or jogl either.

I myself use jogl and i love it.

The thing is that i am developing a character-animation-tool based on Java and the OpenGl-Bindings for Java, JOGL.

But for some good reason i am searching for arguments to defend the use of jogl against java3D.

It would just be great if some of you could make some statements for the possible advantages of jogl.

My personal opinion is that jogl is closer to the OpenGl Spec and supported on more platforms.

But if any of you have arguments for jogl in such cases where Java3D won’t help, that would be great.

I must admit that i don’t want to say: Java3D is s… and jogl is great. I know there are also arguments for Java3D but i hope that some of you who are experienced users could give some statements about this.

Thank you very much,
Chris

Kinda rambling:

Java3D is to 3D what Swing is to 2D.

It aims too high, and does too much. As a result, it’s extremely inefficient to make games in either (but it’s possible).
It’s usually “better”(*) to use the raw rendering components. For Java3D it’s opengl (or directx on windows), and for Swing it’s AWT.

Since Java3D doesn’t expose it’s opengl bindings, you can’t patch java3d up with your own opengl commands to implement things like pbuffers or per pixel lighting.

Xith3D, however, is a remake of Java3D using JOGL as the opengl binding, so that might very well be a viable option. Haven’t looked at it much myself, but it seems very impressive

(* with “better”, I mean easier to get acceptable performance)

Hi,

Comparing Java3d vs. JOGL is not really correct, but for some points we can make some statements.

  1. JOGL is raw OpenGL binding, and Java3D is a scenegraph engine with built in OpenGL binding. As Markus_Persson wrote, there is Xith3D, a scenegraph engine with pluggable renderer interface (with existing JOGL renderer implementation).

  2. JOGL is far less restrictive than Java3D - using direct OpenGL API calls you can create some effects that were not possible with Java3D.

  3. IMPORTANT: JOGL exposes many more OpenGL extensions than Java3D uses, so you can utilize modern hardware (programmable shaders, Cg, etc.) in your Java program.

  4. With JOGL, you can implement HW-accelerated off-screen rendering.

Of course there are lot more points…

Yuri

Thank you very much for your replies!

From what you mentioned, i recon that there should actually no comparing Java3D to JOGL, cause they both suit different needs on different levels.
So far, i hope you don’t mind if i ask some questions:

  1. Are there definetly no possibilities to use modern extensions in Java3D? (I guess there is not, cause Java3D development is not driven further)

  2. What opengl standard is supported by the Java3D-API
    (is it only 1.1?)

  3. If Java3D is built on opengl and has its own binding, why do they differ in performance needs? Does anyone know of examples that proof differences in certain scenarios?

  4. If there are more differences to point out between Java3D and JOGL, what are they? (I know that sounds like tell me tell me, but i just try to collect enough arguments to work with. Anyway i am very thankful for the points you mentioned)

  5. So far, Java3D is (and i guess it will, cause it is not supported any longerr by sun, or is it again?) only supported on Windows and Solaris. But JOGL is supported on much more platforms. That seems to me like a very big advantage.

Thank you all,
Chris

[quote]Thank you very much for your replies!

From what you mentioned, i recon that there should actually no comparing Java3D to JOGL, cause they both suit different needs on different levels.
So far, i hope you don’t mind if i ask some questions:

.
.
.

  1. So far, Java3D is (and i guess it will, cause it is not supported any longerr by sun, or is it again?) only supported on Windows and Solaris. But JOGL is supported on much more platforms. That seems to me like a very big advantage.
    [/quote]
    Java3D is supported on Mac OS X - see http://www.apple.com/downloads/macosx/apple/java3dandjavaadvancedimagingupdate.html

cheers

Exactly. There is no point in doing so. You are comparing apples to oranges.

If you want to compare JOGL to something, at least be sensible and compare it to LWJGL.

If you want to find out more about Java3D (which is currently a dead technology, so I’m not sure why it’s even worth talking about it? Yes, it’s about to come back to life, but not for games development, and it isn’t here yet) then compare it to other scenegraphs (and it sounds like yuo ought to go and learn what an SG is) like jME, Xith, Aviatrix, etc etc.

Its not that i don’t know what SGs are and how they work.
Its not the point that i have to learn about java3D or Jogl.
I just tried to find some competent argues for the one or the other from other users.
The thing is that there are still a lot of people who don’t see why there is any reason to drop a well-build api like Java3D, cause in some cases surely there are advantages. I know as well that its actually not worth to talk about Java3D anymore if you want to go deeper into graphicsprogramming under Java. But in a theoretical work you can’t argue with: “its dead , fuck it, get to something else”.
And i can’t compare in general, i was specifically asked to relate to Java3D. Otherwise i would switch to some other apis that implement SG.
Thats why i asked for some hints i could argue with, not present myself as someone who does not know anything and asking for the basics. Maybe i did not made my statement clear enough to some of you.

Thanx anyway,
Chris

Java3D gives you textured objects. With some simple lighting if you want, and maybe some transparent objects if you ask nicely enough. And maybe it’ll do some nice drawing optimisations for you, maybe it won’t. Who knows. And thats about it.

If you want fancy (ie, anything other than the basic, provided) lighting, forget it. Likewise for shadow volumes. Or shadow mapping. Or complex surface materials. Or post rendering filters. In fact anything more complex than textured geometry just isn’t avalible.

If Java3D does what you want, then fine. You can use it and probably save yourself some time. If it doesn’t do what you want then you’re stuck 'cos theres no way you can add it in later. The OpenGL route will probably take you longer to get started, but in the end you’ll have something that does exactly what you want it to do.

I originally started with java3d, and after realizing it was far to slow for even a simple game I decided to try out jogl… I got at least twice the frame rate for a simple app (and had I gotten very far with java3d I’d probably have seen a larger framerate difference). Speed was the reason I switched, but after making that switch I also found out to my surprise, that OpenGL is so much more simple to work with than the Java3D scenegraph, sure, there’s almost nothing pre-built for you, but it’s very easy to understand. I assume that if someone is familiar with java3d they can a lot more work done in a short amount of time, assuming that execution speed isn’t a big concern.

[quote]I originally started with java3d, and after realizing it was far to slow for even a simple game I decided to try out jogl
[/quote]
Obviously I’m the fool here, because I simply can’t understand the rationale here. Why did you switch from an SG straight to a rendering layer simply because your SG was slow? Surely the first thing to do is try other SG’s? I’m really confused ??? :(.

Not just @ DanK, but I don’t understand why you (anyone) would want to compare the two things - I don’t understand what purpose there is, or what benefit. An extreme example is that I wouldn’t compare a PC and an internet washing machine as “gaming platforms” - one is a gaming platform, the other is a tiny embedded computer that happens to have a TCP/IP stack. OK, so they both do networking, and both can run code. But I don’t understand why you’d try to compare them, as if they were direct alternatives (unless your PC just blew up, you were a games addict, and you were wondering if the washing machine might be a cheaper way to get a fix than a new PC ;D)

If we were comparing SG’s with renderers as the basis for a new engine, that would make sense to me. But (excuse me if I’m completely misunderstanding you here…) my understanding is that you just want to compare Java3D to JOGL. Dan’s statement that he switched from one to the other because of speed seems to highlight for me the pointlessness of this; if he’d switched from J3D to Xith for speed reasons, that would make sense. If he’d switched from J3D to JOGL because he realised he doesn’t like using other people’s SG’s, that would make sense - but instead it seems he just did something that to me appears random ???

The need to compare them is simple, they are both ways of achieving 3d graphics in Java.

This isn’t like comparing the java3d API to some file IO API, both API’s serve a similar purpose, even if their functionality and features are vastly different. I find it odd that anyone would have such a hard time grasping that.

Also for the record, I feel apples and oranges are pretty similar, they are both sweet fruits that you eat, apples and potatoes on the other hand, I feel is a bigger leap to compare (but again, far from impossible, but at least one step closer to being an internet ready dishwashing machine and a gaming computer).