Jump to content
  • Advertisement
Sign in to follow this  
hplus0603

[java] Current state of 3D in Java?

This topic is 3966 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

If I want to write reasonably well performing 3D in Java, with a minimal necessary installable, what is the current story? Is Java3D part of the JRE these days, or does it require a separate download? I'm assuming this is the javax.media.j3d package? Which of jogl or lwjgl are better maintained? More ported? Does any of them run on cell phones at all? I've googled around a bit, but it seems that this "state of the world" information isn't captured anywhere except in programmers' heads. Be kind and share, so I don't have to find a head to open and take a look myself ;-)

Share this post


Link to post
Share on other sites
Advertisement
Last time I looked at java they had given up on J3d(that was their own 3d api) and gone with including opengl bindings. JOGL is the Sun developed bindings so I would think they are a little more blessed than lwjgl. JOGL seems to have better documentation as well. They both only support the big 3(JOGL also supports solaris) as far as oses go. They are both a separate download

Share this post


Link to post
Share on other sites
Java3D seems to be in the process of deprecation, in favour of JOGL, and as far as I can tell, if you want OpenGL on anything other than Mac, Windows, and fairly vanilla Linux, neither LWJGL nor JOGL are going to help you.

Both LWJGL and JOGL are a pain to install, at least as far as the Mac is concerned - I haven't tried on Windows. Neither is well documented, but are pretty much straightforward wrappers (apart from using byte buffers instead of pointers) of the C API.

Share this post


Link to post
Share on other sites
I think JOGL would be the best choice for 3D in JAVA, but I don't see why it would be a pain to install on a Mac. I've been using it on my Mac for about a year now and as I remember correct it just needed some extra JAR (besides the usual files native to the OS) to support it. Before using it on a Mac I have been using it for two years now on Windows and Linux systems, which was also very straight forward and it performs great!

As far as using JOGL for a project on a cell phone is concerned: I don't think it is possible yet. I haven't actually looked into it yet, but I do not assume they have a port for it using OpenGL SE at this moment. I am planning to do a 3D project on cell phones somewhere next year, so I will be looking more into that in the near future.

Share this post


Link to post
Share on other sites
Quote:
Last time I looked at java they had given up on J3d


Well, that seems to depend on who you're asking. Java3D seems to still be developed; it's now a part of the Java community site, but it's not default part of the J2SE install (and neither is JOGL AFAICT).

The problem is, if I go with JOGL, I'll need to write model loaders and texture loaders and shader handling all by myself -- and I'll have the same OGL compatibility problems that a C++ OGL program would have, especially on Vista. Isn't there something better?

(And please don't say Multiverse :-)

Share this post


Link to post
Share on other sites
JOGL's a mature, efficient, and useful library... moreso than the alternatives. But you're right; it's too low-level. The lesson to be learned from things like Java3D, OpenInventor and the like is that it's nearly impossible to develop a graphics engine which is high-level, general, and efficient. I've heard murmurs about Xith3D; might be worth a look.

Share this post


Link to post
Share on other sites
I think it's totally possible to develop a high-level engine that is efficient. Look, for example, at CryEngine, Unreal Engine or Id Tech :-) And, for those with less money, something like C4 Engine. The key is to not believe that the world looks like OpenInventor (or even Performer, or Vega).

I'm looking at Xith3D and jMonkeyEngine right now. Does anyone have experience with those engines, and can compare/contrast?

Share this post


Link to post
Share on other sites
If you're wanting to do a game (ie. single window, possibly fullscreen, requires precise timing) then LWJGL is probably you better bet. It tends to be more stable than Jogl (particularly at fullscreen) and bug reports get taken seriously and handled quickly. If you're doing a more traditional app which requires a proper GUI toolkit the choice is more difficult, but I'd still side with LWJGL, as you can still embed it in a Swing, AWT or SWT window.

If you're after something higher level, then you've got Slick (high level 2d api over the top of LWJGL), Xith3d (high level 3d api based on the Java3D api) or JME (high level 3d api).

Xith started as an open source reimplementation of Java3d when Java3d looked like it was going down the tubes, but has diverged a bit now. IIRC the two main authors have left and it's not very actively developed. JME is actively developed and seems to have a lot of users. It's api seems to be more geared towards games (ie. with things like terrain nodes) rather than a overly generalised 3d api. IIRC JME is written on top of LWJGL and Xith has both Jogl and LWJGL back ends.

Or if you want to go old school, theres jpct, which is a software renderer which works on 1.1 (ie. good for applets) but also has a LWJGL back end.

IMHO you'd be best with LWJGL, or JME if you want something higher level.

Share this post


Link to post
Share on other sites
I touched on this briefly in my journal and here if it helps at all. Basically, Java3D is okay if you never plan on mixing any Swing components with it and is easy to use. I've been using JOGL with moderate success but I've been warned of potential problems with fullscreen mode.

Share this post


Link to post
Share on other sites
jMonkeyEngine seems to be closest to what I'm looking for. Hey, it even supports COLLADA!

I'm trying to find out how big the required install is. Also, I wonder if it can be totally installed from a browser object tag, or whether an actual executable/msi has to be installed and run.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!