[java] Choosing a 3D Java API

Started by
5 comments, last by mikesobczak 16 years, 6 months ago
i am currently starting to do 3D programming and java is the language im most comfortable with. before i put a lot of time and effort into learning one of the 3D api, i want to make sure im picking a good one. I was planning on learning the Java 3D api from sun's website, but looking around also noticed there are some other options like jogl, gl4j, and a few others. Am i missing out by just learning sun's 3D api?
Advertisement
well it kinda depends on what you want to do

i'd recommend reading up on the Java3D API, Jogl, LWJGL, and jME (Java Monkey Engine)

which one pretty much as a different target. even if you "just want to learn" - each one will teach you something different.



what, exactly, is your goal?
Feel free to check out my Journal to see the issues I've faced going through this exact scenario. The cliff notes version is that I started with Java3D and was okay until I wanted to integrate Swing into my application. I basically had to scrap the whole thing and start over with JOGL (which really gives you more control anyway and is pretty much a big wrapper for the C headers in OpenGL).

If you don't need Swing, are okay with high level manipulation, and/or want to get something up and running quickly then Java3D is good for what it is. If not, I would try JOGL (which seems to have a larger user base to get info from) or start coding now and hope that the next version releases early next year (Java3D). The biggest downside is that most of the OpenGL calls are as-is and don't have the familiary OOP structure of other Java APIs that you are familiar with.

[edit - added the following: ]

Or you can read up on those other two and let me know if you see something better in them that I missed since I'm just re-baselining now [grin]
Check out my current project on Kickstarter: Genegrafter
Because you dont have any 3D programming experiance you may find Java3D ok. I however didnt enjoy programming with it one bit. Its very different to API's like Direct3D and OpenGL and is also a lot more limiting than those API's.

That being said though, it wouldnt take you long to do the first couple of sun's Java3D tutorials so you could see for yourself how you feel about using it.

My personal choice however would be to use jogl. That way if you did ever want to make the transision to openGL though another language such as c/c++ you would be familiar with it.

The main point to remeber though is that its the concepts of 3D programming that are important when learning, and these are all very similar in any API you use.

Darren
Quote:The main point to remeber though is that its the concepts of 3D programming that are important when learning, and these are all very similar in any API you use.


Good point. Be prepared to learn A LOT of math if you've never done matrix manipulation or anything with vectors, etc. But once you learn it at the OpenGL level it can be used in many other languages if you decide to switch.
Check out my current project on Kickstarter: Genegrafter
Stay away from Java 3D.

There are 2 major choices you have to make. Do you want to use a scenegraph or do you want direct access to the hardware. Using a scenegraph can be simpler from a beginners standpoint, because you can get a lot on the screen early on. You can lose some flexibility and your speed is affected by how well the scenegraph API is constructed.

Some scenegraph APIs:
Xith3D
jMonekey Engine
Java3D

Low level APIs:
JOGL
LWJGL
jPCT

There may be more, but these are the ones I see talked about most often for games.
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][LWJGL Tutorials for NeHe][LWJGL Wiki][jMonkey Engine]
thanks for all the input guys, im probably going to do the tutorials for Java 3D, then check out JOGL and see which one i prefer. In reference to the first reply, i want to make 3D games but i have no experience with the languages so wasn't sure if i wanted Scene graphs or not for example. thanks again for the help.

This topic is closed to new replies.

Advertisement