• Advertisement
Sign in to follow this  

[java] new to java3D needing advice

This topic is 4787 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

I want to begin programming 3D in java. What all do I need? I went to Sun's site and I went to the download page. I have to choose between opengl or directx??? I'm not sure what one to pick or what one will be easier. Also does anybody have any links to another page where java3D is avaiable. I couldn't get it to download under going through Sun and the download manager. If anybody has a link I would appreciate it. Any info would help.

Share this post


Link to post
Share on other sites
Advertisement
Well if you doing OpenGL you might as well use JOGL. I dont know much about Java3D, but I know the Sun API isnt that great. DirectX is fairly easy I think, and I have seen plent of books for it, but people have told me the OpenGL of Java 3D is faster than DirectX.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Neither. They're both crap for games - officially (sort of)! Sun specifically does not recommend Java3d for games dev, it's recommended for Molecular Chemistry and things like that.

Instead, you want to try Xith, jME, or just use OpenGL (use LWJGL or JOGL).

Look here for details of all the different java 3d libs:

http://javagamesfactory.com/tech.html

redmilamber

Share this post


Link to post
Share on other sites
If you'd like to learn OpenGL, you have two choices
JOGL https://games-core.dev.java.net/
and LWJGL http://www.lwjgl.org/download.php
And if you'd be really crazy you'd ask me to send you an around year old version of JOGL that was modified to alow MUCH easier programming, at least less typing.

JOGL is easier for starting and debugging, LWJGL is more compact easy computer hanging library simillar to C++ version of OpenGL.

BTW a little advice when creating OpenGL window, set OpenGL so it would have distinctly colored background. This means GL.clearColor(xxxxx) different than zero or one.

Share this post


Link to post
Share on other sites
Just remember that JOGL only give you access to the hardware through OpenGL. If you want a scenegraph, then use Xith. If you need sound, input, etc. then go for LWJGL.

Share this post


Link to post
Share on other sites
Java3D can either be downloaded as the openGL or the directX version, you won't notice the difference. With some graphic cards the directX implemented version runs faster, on others, it's the openGL one, that's specific to the hardware.
I've experienced that the OpenGL version had (very) slightly more features, but these are really tiny details, nothing important (like point tranparency for example). Choose one or the other, they are both ok anyway.
And as long as you don't wanna make a Quake 46, you shouldn't have problems with performances.
And for tutorials, i advice to look at sun's tutorials, they're complete and well explained.

To come back to the above discussion, i always wonder why they compare JOGL and J3D concerning their "performances". They are different things, JOGL is a low level api whereas J3D is high level. Look out if you wanna more information, it's not the first time this kind of topic arises. And before seeking more "performances", you should ask you the question "isn't it enough?" or "where is my bottleneck?"...

I don't wanna say J3D is cool, is perfect or something like this, far from that. i just think both have their use, it's a question of what you need and what you prefer so it's idiotic to put one down or up. (but i find J3D cool :P)

Lastly,
Quote:

Sun specifically does not recommend Java3d for games dev

Where on earth did you found this? ...the link please

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by misterX
And as long as you don't wanna make a Quake 46, you shouldn't have problems with performances.


Rubbish. Java3D imposes huge overheads that are 100% entirely pointless to games development. This is one of the reasons Xith3D was started in the first place: the realization that even if Sun started supporting j3d properly, instead of throwing it in the garbage heap and leaving it to rot, it would still suck for games development.

Look at the comparisons in performance: to render the same stuff, *using the same API*, xith3d does the same scenes as much as 20%-30% faster.

Quote:

To come back to the above discussion, i always wonder why they compare JOGL and J3D concerning their "performances".


Because scenegraphs should NOT reduced performance of the tri-renderer, but java3d massively reduces performance.

There are good reasons for this, but they are nothing to do with games development.

Quote:

Lastly,
Quote:

Sun specifically does not recommend Java3d for games dev

Where on earth did you found this? ...the link please

[/quote]

A response from David on people complaining that j3d was no good for games dev, or just in general response to such complaints, pointing out that j3d had a primary purpose that was not games and that it was not being resurrected for games development, even though it was being adopted under the auspices of the games group at sun, IIRC. IIRC the recommendation was (and still is) to use JOGL for games development, and j3d for the same things it was designed for: high-end visualization for chemical, construction, physics, etc industries. Basically for anyone working in laboratories who needs to visualize scientific data. I think the generic term is "sci-vis" ?

Maybe I misunderstood the comment, and I certainly don't remember the exact words, but I'm sure that was the gist of it. David was keen to work with xith3D rather than compete with it, and felt there might be much that could be shared now, assuming compatible licenses, but was makign clear that j3d ultimately was going in a different direction, i.e. decisions are not made about j3d for games dev reasons.

Share this post


Link to post
Share on other sites

...if you wanted so much "performances", you should stick to c++ and access to open GL directly. However, i suppose you won't. And why? Because java feels more comfortable and it is worth sacrifying a notch of "performance".
For the same reason i stick to J3D, i feel comfortable with it and its performances are ok to me. And in the case i would want more, or would do some pro game, then i would directly go to c# with DX or something like this.
Performances are not the holy grail. If it was, we would still be programming in assembler.

I suppose you know "Flying Guns", doesn't it run well? So it's ok for games like this, no need to go away.

Anyway, use the api you want, JOGL is certainly a great api, but J3D is totally ok either. The first is raw performances, the other is higher leveled stucture along with its small overhead.

Share this post


Link to post
Share on other sites
As soon as somebody is asking a question about Java3D here, it usually won't be answered. People are shouting "xith" and "jme" instead. IF these APIs are so great for making games, then where are the games written with them? I don't know of any complete (or almost) game which has been written using xith or jme. However, i do know some games written in Java3D. When looking at them, you know what to expect. xith and jme still have to prove themselfs as suitable solutions.

Share this post


Link to post
Share on other sites
My personal suggestion: Only use Java 3D if you don't mind the fact that there are a lot of things that it doesn't support that it should, e.g., set operations. Honestly, Java 3D isn't bad, per se, it's just that it's not really the best API to use for games. Honestly, I'd only really ever use it for visualization applications, as opposed to interactive 3D environments.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by misterX

...if you wanted so much "performances", you should stick to c++ and access to open GL directly. However, i suppose you won't. And why? Because java feels more comfortable and it is worth sacrifying a notch of "performance".


Dude! *why would you want* to sacrifice performance, when none of the OTHER Java API's have that sacrifice ?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Java
As soon as somebody is asking a question about Java3D here, it usually won't be answered. People are shouting "xith" and "jme" instead. IF these APIs are so great for making games, then where are the games written with them?


Java3D is very buggy and slooooow, whereas all the other API's for doing 3D in java, whether with a scenegraph or just in raw OpenGL are fast.

No contest, really - we're trying to spare people from making the tragic mistake that many of us have made in the past (using j3d for games).

Quote:

I don't know of any complete (or almost) game which has been written using xith or jme. However, i do know some games written in Java3D. When looking at them, you know what to expect. xith and jme still have to prove themselfs as suitable solutions.


All you had to do was follow the links that have been posted and reposted on this board many times. It's even made *exceptionally easy* for you by the fact that the JGF site *actually puts each game that uses a given tech ON THE SAME PAGE as the tech itself*.

http://javagamesfactory.com/tech.html

Really, there's no excuse for making silly claims like "I've don't know of any non-Java3D games".

PS: I, personally, have spent weeks searching the net for J3D games to add to JGF. None of the authors I contacted could both be bothered to submit their games AND had a working version of their games any more. Most of them had "given up" on j3d because it was too much hassle to maintain - especially the bugfixing and workarounds.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Really, there's no excuse for making silly claims like "I've don't know of any non-Java3D games".
I've never claimed this. I said that i don't know of any finished (or almost) games using xith or jme. And having a look at javagamesfactory.com, i can find 2 unfinished games, both from kevglass for xith and none for jme. Or am i looking in the wrong section? If not, this is still no foundation to recommend these APIs for games IMO.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Quote:
Original post by misterX

...if you wanted so much "performances", you should stick to c++ and access to open GL directly. However, i suppose you won't. And why? Because java feels more comfortable and it is worth sacrifying a notch of "performance".


Dude! *why would you want* to sacrifice performance, when none of the OTHER Java API's have that sacrifice ?


Because i have a better productivity with it!

It's like i would ask: why are you programming with a high level language like java when you could do it all in assembler without sacrifying performances?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by misterX
Quote:
Original post by Anonymous Poster

Dude! *why would you want* to sacrifice performance, when none of the OTHER Java API's have that sacrifice ?


Because i have a better productivity with it!

It's like i would ask: why are you programming with a high level language like java when you could do it all in assembler without sacrifying performances?


You have a choice of the same API in a fast version or a slow version aimed at games development.

You're excusing using the slow version because performance isn't so important as productivity. Until/unless you actually make some statement about it, we can assume that productivity is, by definition, the same in the other implemetnation of the same API. So you're actually saying "I would prefer to use the crap version because [no reason]".

Seems a no-brainer to me.

Share this post


Link to post
Share on other sites
Quote:
Original post by Java
I've never claimed this. I said that i don't know of any finished (or almost) games using xith or jme. And having a look at javagamesfactory.com, i can find 2 unfinished games, both from kevglass for xith and none for jme. Or am i looking in the wrong section? If not, this is still no foundation to recommend these APIs for games IMO.


Well since both are relatively young and since Java does not tend to get used by profesionnal dev houses yet, then you are leaving it to the hobbyist developer to make the games. Since most of these people do it as a hobby, it will take some time. So rather than saying that it can't be good becase there are no games yet, why don't you try it out instead. You could also head over to their respective sites to see what is going on with them. I know jME doesn't have any games yet, but it is still in its infancy like LWJGL. Neither has yet to release a full production version (ie v1.0). Both are still in beta. Although I expect LWJGL to go full production this year.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
You're excusing using the slow version because performance isn't so important as productivity. Until/unless you actually make some statement about it, we can assume that productivity is, by definition, the same in the other implemetnation of the same API. So you're actually saying "I would prefer to use the crap version because [no reason]".

Seems a no-brainer to me.


Listen, idiot.

First, these APIs are totally different. Second, i'm sure you never played around with J3D enough. Third, i'm productive whith j3d, for example if i want the ball jump when it falls on the ground, i just use a 'OnCollision' wakeup that handles the code for changing the ball speed. I don't want to spend hours making my own collision detection thing. So i like j3d because it makes me able to do stuff without losing time for lower level stuff like this, and in an elegant way. Lastly, I don't need more speed, my framerates are more than enough! So i have no reason to change yet. End of the discussion.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by misterX
Listen, idiot.


Whatever.

Quote:

First, these APIs are totally different.


Um...BS! From the official pages:

"The class node definitions of the scenegraph is virtually identical to the Java3D,"

And, being more careful / hedging:

"It is designed to be leaner, more game orientated alternative to the Java3D scenegraph, yet using the same basic scenegraph structure as Java3D (ie. similar functioning TransformGroups?, Nodes, Views, etc)."

In my experience, I took my J3D code, put it into Eclipse, hit ctrl-o to automatically correct the import statements, and had to change hardly anything before it recompiled against the X3d lib. I was only using J3D rendering.

From what I hear, many others have had similar experiences.

Xith3D docs used to start with the statement: (paraphrase) "There are few x3d docs at the moment because you can just use the Java3D tutorials because the class and method names are mostly identical".

?

Quote:

Second, i'm sure you never played around with J3D enough.


That's not a point, that's a "I can't think of a point"...

Quote:

Third, i'm productive whith j3d,


Fair enough. But you were advising people to use it despite being slower, buggier, and very similar to other API's which are cheaper. In general, people will be no less productive (and usually much more productive) in the other API's. This is why those of us who used to use Java3D try to discourage others from using it - it's wasting their time.

Quote:

I don't want to spend hours making my own collision detection thing.


If you wanted to rewrite all your previous BS to talk about "feature X is, I believe, missing from the other API's" then fair enough; in fact you never mentioned it.

AIUI jME has a decent CD system and X3D has a less decent one. I wouldn't use either because I have better 3rd party stuff already available. I'm happy to discuss the merits of J3D's CD handling and behaviors, but will not stand by and watch you defend it's bugginess and slowness as if they don't matter.

Share this post


Link to post
Share on other sites

This is exhausting and i don't care, so i'll again go straith to the point.
I've never critisized other apis, nor will i do. Use whatever you want, i don't care about it anyway (why would i worry about?!). Nor did i suggest people should use it instead of the others. Read again, i never stated that it's the best choice, or that people should use it or that the other ones are bad, they aren't. I just said i was using it, had no problems whatsoever and that i'm happy with it. That's all.

PS: (Whereas for the first point, i had in mind we were discussing about JOGL & LWJGL, of course it doesn't apply to Xith which in fact copies J3D's structure.)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
"This is exhausting and i don't care"

You obviously care... way too much.

Share this post


Link to post
Share on other sites
Quote:
Original post by SKATIN_HARD
I want to begin programming 3D in java. What all do I need? I went to Sun's site and I went to the download page. I have to choose between opengl or directx??? I'm not sure what one to pick or what one will be easier. Also does anybody have any links to another page where java3D is avaiable. I couldn't get it to download under going through Sun and the download manager. If anybody has a link I would appreciate it. Any info would help.


This page looks like a good resource to look at. It might answer a few questions you have about what to use, where to get it, and how to use it. The best advice I can give you is to read the articles on that site and make your own informed decision.

Share this post


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

  • Advertisement