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."

14 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. 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 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
    4. 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
  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. 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.

  6. 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
  7. 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.

  8. 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