Slashdot Mirror


Java3D Source Code Released

mrp101 writes "Over the past few months (aka year) the future of Java3D has been in question. Not too long ago Apple announced a port to Mac OS X, but still no official update from Sun. A few weeks ago Sun announced that they were going to release the source code and begin collecting comments for version 1.4/2.0. And today they delivered, right before the JavaOne conference. The announcement can be found here(1) and the CVS here(2). The code includes the core scenegraph, the vector math library, and Sun's own add-on utility libraries."

26 of 220 comments (clear)

  1. Testing the waters? by Anonymous Coward · · Score: 5, Interesting

    I believe Sun is testing the waters for possibly fully releasing Java into the open source world.

    3D people out there .. utlize this stuff so they'll be encouraged to release Java.

    On a side (offtopic?) note. According to a member of the solaris dev team at http://blogs.sun.com/roller/page/tucker/20040618#o n_opening_up_solaris Solaris will probably be released as open source soon ..but people will foolishly ignore it, rather than implement it's plus points into Linux.

    -Johan

    1. Re:Testing the waters? by Tarantolato · · Score: 4, Interesting

      However, they chose a BSD license apparently.

      I'm aware that every single anti-GPL troll in existence has suggested the BSD license for Sun in every single forum discussion to even touch on the topic simply because they don't like the GPL, but is there anything official or semi-official to back that assertion up?

    2. Re:Testing the waters? by Anonymous Coward · · Score: 1, Interesting

      I heard Sun's going to take advantage of IBM having opened up Power - and announce a port on to IBM's pSeries systems. Add this, plus open source, plus java - hmmmm.

      You gotta give credit to these guys - they are nothing if not persistent.

    3. Re:Testing the waters? by k98sven · · Score: 1, Interesting

      Open source won't use Java until Java is open source. Most OSS developers are wary of traps like that.
      (Which caused reluctance to using Qt, which sparked the Gnome project. Now Qt is free, of course.)

      Java is certainly going open source. Not Sun's java, but there are plenty of open-source VM:s, and compilers, and a full implementation of the class library in the works.

      I predict that, when these projects reach sufficient maturity (AWT/Swing support being the achilles heel in all the above), we will see widespread adoption of Java in the OSS community.

      What Sun does will have little impact on the OSS community unless they get serious about open source and put Java under a tolerable license.

      (If someone's curious about what is bad about the Sun license, see Dalibor Topic's post here, containing a point-by-point comparison to the Open-source definition.)

  2. Speed of 3D in Java? by Anonymous Coward · · Score: 5, Interesting

    I've done my share of 3d programming, and I don't see how writing any part of your display routines in Java is a good idea when you're working on a 3d app. I know Java has gotten quite a bit faster than the initial releases, but it's still interpretted byte code, and that seems like a waste of cpu cycles when you're trying to perform complex graphics effects. Does anyone have any positive experiences with Java3D with high performance 3d applications? Games would be a good start since they are probably the hardest on the system. What about 3d CAD software as well.

    Maybe some of you out there can prove my initial performance guesses wrong.

    1. Re:Speed of 3D in Java? by thedigitalbean · · Score: 5, Interesting

      I have been writing 3D software in C++ for years and every so often (every release of Java) I get excited and want to port to Java. However, every time I try running simple performance tests of Java's floating point, the results are tragically dissapointing. The last time I tried (with JDK 1.4.1), Java was 2 decimal orders of magnitude (ie. 100x) slower than the identical code in C++ (interestingly, C# was 50x slower). My test was really simple involving vector math and matrix multiplication.

      I did some reading and found (from a long time ago) that floating point representation in Java was really slow because of the floating point standard in the VM set forth by Sun.

      My challenge is for Java advocates to publish with source a head to head comparison of floating point performance of Java vs. C++. Most of the challenges tend to focus on integer performance or memory performance, but very few people talk about floating point performance which is essential for 3D graphics.

    2. Re:Speed of 3D in Java? by Aardpig · · Score: 4, Interesting

      Does anyone have any positive experiences with Java3D with high performance 3d applications?

      I believe that it is possible for Java3D implementations to be (partial) wrappers around hardware-based OpenGL/DirectX functionality. With this in mind, I really don't see much performance overhead associated with coding 3D applications Java, as opposed to something like C++.

      Of course, there are certainly other reasons why one might want to avoid using Java. For instance, if the 3D visualization is reliant on a computationally-intensive backend, it may be better to use a language specifically oriented toward number crunching -- for instance, Fortran 90/95, which has glut-featured OpenGL bindings through the f90gl project.

      --
      Tubal-Cain smokes the white owl.
    3. Re:Speed of 3D in Java? by PenguinOpus · · Score: 1, Interesting

      The speed of the high-level language is getting less and less important. Java3D is an API that is implmented as native code (JNI?) on the target system. The application can construct the data using Java prior to runtime, but display lists and scene graphs take the high-level language out of the critical path.

      It's true that SciVis, CFD and the like aren't going to be happy running in Java, but I believe you can do a good flight sim or game using Java3D.

      (Disclaimer: I haven't used Java3D... OpenGL and Performer are/were my preference, but Java3D was designed with the help of the SGI Performer team)

    4. Re:Speed of 3D in Java? by mmusson · · Score: 2, Interesting

      Java Advanced Imaging (JAI) was supposed to be a showcase for Java. And it is implemented with Java, but they also ship platform specific implementations written in C if performance is remotely important.

      Although I think 3D performance would be easier for Java to achieve as long as a suitable graphics card is present to do the heavy lifting.

      --
      SYS 49152
    5. Re:Speed of 3D in Java? by Mithrandir · · Score: 4, Interesting

      Speed is exceedingly good. In the area that we develop an open source toolkit (Xj3D) and commerical applications in (X3D/VRML) our Java3D renderer is the same speed as the natively coded OpenGL and D3D applications. We have another renderer that is built directly on top of the JOGL OpenGL bindings that is at least twice as fast in every instance as that of the J3D renderer.

      So, put simply, in our application space, the Java-based application is at least twice as fast as every native code competitor. We also have a high-level scene graph optimised for visualisation that has these speed advantages as a replacement for Java3D called Aviatrix3D. You may also want to check out Xith3D, another highlevel scenegraph API written in Java that is optimised for gaming purposes and gets even better performance than AV3D.

      --
      Life is complete only for brief intervals in between toys or projects -- John Dalton
    6. Re:Speed of 3D in Java? by Mithrandir · · Score: 4, Interesting

      LookingGlass is coded in Java and uses Java3D for the 3D part of the rendering. It uses JMF and JAI for the other media handling as well as pushing out a number of other experimental Java APIs from Sun, including one that does the low-level desktop integration like Icons, system trays etc. Can't remember the name of that offhand, but it's something like JDNC.

      --
      Life is complete only for brief intervals in between toys or projects -- John Dalton
    7. Re:Speed of 3D in Java? by upsidedown_duck · · Score: 3, Interesting

      ...do you know anybody who owns a Sparc machine?

      Yes.

      One thing that is nice about having the "real deal" is some of the perks that come along with it. For example, a Sun or SGI workstation makes a nice reference platform for OpenGL apps, because they ship native optimized GL libraries for their graphics cards. You also get a different take on UNIX standardization, which helps with writing portable software.

      --
      -- "Makes Little Debbie look like a pile of puke!" - Moe Szyslak
    8. Re:Speed of 3D in Java? by psetzer · · Score: 2, Interesting

      The inline keyword is there for a reason in C++, and it's a godsend for field accessor methods, where it turns into almost the exact same code as a direct access.

      --
      "Anyone who attempts to generate random numbers by deterministic means is living in a state of sin." -- John von Neumann
  3. Will 3D ever boom? by eipipuz · · Score: 4, Interesting

    Maybe OT, but while I was at school, people talked about VRML... There's Java 3D... Do anyone think that a 3D interface will ever be popular? I love CLI and it doesn't seem we are ever going to forget about it. With 2D we really don't use all the posibilities (maybe Squeak)... I can see medicine and CAD using it, but a employee, aunt or kid?

  4. BFM by TexasDex · · Score: 4, Interesting

    The BFM is written in Java. I think it actually uses this library, and it's nice to have it available and open.

    --
    The Cheese Stands Alone.
  5. Lookglass ? by Anonymous Coward · · Score: 3, Interesting

    I wonder if this release is partially due to Looking Glass. If sun follows through with Looking Glass this move may garner support for the 3d rich desktop enviroment.

  6. Whaa?!? by quantaman · · Score: 3, Interesting

    LICENSE
    -------
    We are releasing the source code for the j3d-core-utils and
    j3d-examples projects under a BSD license.



    Sun... "Open Source" Code... Non tainting license...

    Someone find me the strings, I must be dreaming!

    --
    I stole this Sig
  7. Java 3D is slow by JavaPunk · · Score: 4, Interesting

    The javagaming.org community has written a open source implementation of Java3D in the opengl wrapper JOGL (hosted on a Sun website). It is called Xith 3D. From what I here they are getting much higher frame rates then Java 3D. The problem with Java3D is it trys to do everything, so it is good for nothing. As far as I know there is very little usage of Java3D especially in the game programing community.

    1. Re:Java 3D is slow by Anonymous Coward · · Score: 5, Interesting

      My understanding is that Xith 3D is a mess. It's also quite incomplete.

      The primary problem with Java3D is not that it tries to be "everything". There are four problems with Java3D. First, it is synchronized everywhere, with heavy locking mechanisms. Second, it has both float *and* double environments. Third and most important, it puts an efficiency emphasis on static scenes where few things get added or deleted. Fourth, it attempts to run on both OpenGL and Direct3D, and so its underlying subsystem has an unnecessary layer of abstraction.

      Open-sourcing Java3D should do a world of good. It'd give Java3D a chance to fix this stuff. First, dump Direct3D and the private OpenGL bindings it uses, and sit it directly on top of JOGL. That's no small job, but it'd make a big difference. Second, strip out the synchronization and use of doubles. That'd be enough to get it more than a match for Xith3D. What to do about its emphasis on static scenes, I dunno.

  8. Re:fav java 3d demos by IrresponsibleUseOfFr · · Score: 4, Interesting

    The demos are really cool. But the biggest issue, which I think is apparent in the demos also, is that you get these frame rate drops. The best I can tell from playing around with Java3D, this happens because the API is allocating a bunch of objects during rendering. The garbage collector has to come by and get rid of them and it takes long enough to release the unused objects that it interferes with the rendering thread. This turns out to be down right distracting in animation.

    Whether or not Java3D can be fixed so that doesn't happen will have to be look into.

    The other issue is Java3D tries to hide the underlying graphics API too much. There is already a consistent 3D graphics interface that is available on almost every platform: OpenGL. I would really like to be able to get at it. Then, I could do things like add glslang shaders to an already existing Java3D app.

    All in all, I think open sourcing Java3D is a good thing. Sun and SGI announced at last year's SIGGRAPH that they were planning native OpenGL 1.5 bindings. I don't know what has come of that project. However, there are many Java to OpenGL binding projects. I still think that Java + OpenGL leaves much to be desired compared to C# + DirectX. Although, having a large higher-level 3D open-source library ready to use in Java might swing momentum in Java's favor.

    --
    Facts are meaningless. You could use facts to prove anything that's even remotely true! -Homer Simpson
  9. Re:That's too easy by furball · · Score: 3, Interesting

    You're thinking inside the box.

    3D is not strictly limited to desktop applications or games. It's very useful in biological research for example. Some of the people working on that sort of thing do full 3D rendering of very complex molecules and interaction of molecules.

    Massive rendering of said molecules from huge chunks of data can be done on very big iron boxes.

    Heck, movies could be rendered. You don't think desktop boxes render the frames for Pixar do you?

    Server side java applications using 3D libraries. That's where the good stuff will eventually end up like all the other Java stuff.

  10. Universal games are now by furball · · Score: 4, Interesting

    Future? How about present?

    Puzzle Pirates is a Java game title. It's available now. Apparently it's fun. I tried it. It wasn't my cup of tea but I suck with puzzle games.

  11. Re: J3D is more a competitor of VRML by Cochonou · · Score: 5, Interesting

    Java 3D uses scenegraph and branchgroup concepts, exactly like VRML. It is a "higher level" 3D language than OpenGL, and therefore C+OpenGL and Java 3D are not (maybe just for now) in the same playing fields.
    Where Java3D should thrive now is rapid developpement of possibly complex 3D scenes. We're not talking of a game with pixel shaders, but for example of a simulator of a robot with a manipulating arm. The scenegraph would make it very easy to set up the arm articulations quickly.
    Given the current sorry state of VRML browsers, and the immaturity of X3D, the release of Java3D could give birth to very interestings developements.
    For complex game development in Java, look for Java OpenGL bindings instead.

    A few references:
    Scenegraph basics
    X3D

  12. VRMoo is a Java 3D App by Sir+Toby · · Score: 2, Interesting
    Hey, at last a topic where I can talk about an open source project I'm working on and be quite on topic. VRMoo is a Java 3D application for a 3D object-oriented MUD client/server.

    I haven't found the performance of Java 3D to be that great when running the VRMoo client, but then that could be just because I'm not a great Java 3D (or even 3D) coder.

    Anyways... That's all I guess. Just wanted to say, hey looky, open source Java 3D app over here!

  13. Not true any more by lokedhs · · Score: 2, Interesting
    Sice JDK 1.2 there is the strictfp declaration that can be applied on methods which needs the precicise IEEE floating point.

    If this is indeed the grandparent posters problem, he's using strictfp on all his methods. I doubt he does, since few people even know of its existance.

    However, I also do not believe the numbers he was posting. It did have that trollish odour to it. I would very much like to see his test code. There must be something wrong with it.

    Here's a tutorial on the use of strictfp.

  14. Re:Java3D is a superset to DirectX, OpenGL by TheRaven64 · · Score: 2, Interesting
    No it isn't. Java3D is a retained mode API. You create objects in a scene, and then manipulate them. OpenGL and DirectX allow the developer to exercise a fine level of control over the graphics hardware by drawing graphics primitives directly (Direct3D used to have a retained mode API, but I think it stopped being worked on after version 6).

    An API like OpenGL or Direct3D is much more flexible. It is possible to implement Java3D in something like OpenGL or Direct3D. It is not possible to implement OpenGL or DirectX in Java3D. This lack of flexibility may not be important to a lot of developers (or at least less important than the fact that it frees them from having to think about the low level details. If you want a cross platform alternative to OpenGL, try OpenGL.

    --
    I am TheRaven on Soylent News