Ringlord Technologies News

JavaFX 8.0 3D


Back to Ringlord Technologies News

July 4, 2013

The venerable Java3D technology that ships as an add-on to the Java Platform has never really caught on, perhaps because it was a pain to setup, and make part of a shipping product, but Java 8.0 is about to change all that!

Recent (~February 2013) Java 8.0 pre-releases began to ship with JavaFX 3D capability enabled1, and I began to play with these new capabilities and must say that I am suitably impressed.

Performance seems very good: Using a 1920×1200 display on an nVidia 660 GTX, I can spin that simple 3D view around without any lag whatsoever. Yes, anti-aliasing is not yet supported, but things look most promising.

My wish-list for JavaFX 8.0 3D includes the following:

  1. Embed the 3D view in a regular GUI. At the moment it appears that a Stage (window) can contain either a Scene with a camera that does 3D perspective projection, or various “normal” GUI elements, but not both. If I wanted to create something like a 3D editor, how do I combine a regular GUI with a 3D view? Maybe I’m just missing something…
  2. I’d like to be able to define a series of line segments in 3D space that are simply rendered above or below the scene, to serve as a coordinate grid of sorts. I would be fine with drawing them myself if there were a hook to invoke my drawing method before the scene is rendered on top of it. In fact a pre-Render (but post-fill) and post-Render hook could open up a lot of interesting possibilities!
  3. I’d love to see “billboards”, essentially flat objects that rotate to face the viewer/camera at all times. Even better if these could be regular GUI objects, which I could use for labels, controls, etc. It would be nice if I had the choice to project them into the scene (far, far away) or on something like a glass pane to ensure that they have a predictable and usable size.
  4. And last, but not least, I’d like to be able to embed a full 3D scene within a regular GUI.

I hope these aren’t too much to ask, because I’d be ecstatic to see them implemented. In any case, my hat’s off to everyone involved in the JavaFX 8.0 3D effort!

And for those who have been reading all of this patiently, here is a small JavaFX 8.0 3D demo (a .jar file to run with your Java 8 installation) that I wrote. It presents a 3D scene with a few colorful geometric objects, and allows zooming (wheel) and full rotation (drag with middle button) through the scene. The license is GNU GPL v3+, and the source code for it is embedded in the .jar file (treat the .jar as a zip to extract what you want from it).

1  Support for the GNU/Linux platform, and Mac OS/X were a few weeks behind those for Microsoft Windows.

Back to Ringlord Technologies News

All content is copyright © Ringlord Technologies unless otherwise stated. We do encourage deep linking to our site's pages but forbid direct reference to images, software or other non-page resources stored here; likewise, do not embed our content in frames or other constructs that may mislead the reader about the content ownership. Play nice, yes?

Find something useful here? Maybe donate some Bitcoin!