JOGL in JavaFX?

I’ve just discovered JavaFX. I think it’s a really good step for Java in inovating technologies.
It will be very usefull in the future : the Java standard for rich clients apps !

I’m fond of Jogl and of course my first question is
Is JavaFX will contains JOGL lib for rapid ans simple 3D content display!

I think we have to start to include jogl 3D content in client app as soon as possible to be competitive.

What do you think about that ?

Actually, I’ve read on several web sites (don’t remember which ones) that JavaFX will eventually give support for 3D rendering via wrappers on top of Java3D. I think this info is mentionned on the JavaFX site or Open JFX (http://www.sun.com/software/javafx/).

Anyway, I think JOGL might be really powerful in JavaFX to provide more low level or more specific rendering features since Java3D is a scene graph and it doesn’t always provide the latests 3D features present in DX and OGL. But as long as the requirements of JavaFX for 3D are not clearly defined and which type of users/developpers will use it, its hard to tell what it should provide.

JavaFX can call any Java APIs, so you can call JOGL directly from it if you want.

To make it easier to more quickly develop 3D programs, though, you need an abstraction layer. I have been talking with the tech lead of JavaFX, Chris Oliver, for several months about incorporating 3D. My first attempt at a higher-level abstraction layer is called the Minimal Scene Graph (“MSG”) and is checked in to the joglutils project on java.net under net.java.joglutils.msg. As the Javadoc describes, this is a small, lightweight scene graph which is designed for extensibility. The key thing many of the scene graphs out there today are missing is support for extensibility: the ability to add new types of nodes, new rendering effects, and new actions that can apply to the scene graph. MSG borrows many of the core ideas from SGI’s Open Inventor library from the mid-90s and I believe solves these problems. It should be portable on to other rendering libraries than OpenGL, and divides up the rendering state in such a way that the current functionality it supports isn’t hardwired into the scene graph. As one data point, Chris Campbell from the Java 2D team was able to add new nodes to MSG for the Iris demo we did at JavaOne (depth test control and shader support) very quickly.

Wow! This seem really great!

Thanks for the info.

For the lazy (like me): https://joglutils.dev.java.net/source/browse/joglutils/trunk/src/net/java/joglutils/msg/

Yes, but what you really want is to browse the javadoc. Here’s a copy available at least temporarily:

Browsable javadoc
Downloadable javadoc

Please post if you have any comments, positive or negative.

For right now you’ll need to build the joglutils project yourself to play with it.

MSG is exactly what jogl need (minimal and scalable !). Great !
My first comment is about the general design of joglutils :
I develop actually a game with my own 3D library but I use the MVC paradigm :
I don’t see separation between GL View code and 3D Model code in joglutils :
for example the Material class contains a method apply(GL gl) and deal with rendering code itself.
In my code I use Renderer classes that have to render Models classes, for exemple :
Appearance with AppearanceRenderer
Model with ModelRenderer
like j2d.TextRenderer in jogl library.

I’ve thought for a long time if or not 3D data could be seperate from GL rendering and I think so.
What do you think about?

I can show you my code and I will be very interested to integrate some parts (like bones animated model with MS3D model loading) because I think is not usefull
to develop my own library now msg exists.

In any case I’m very interested to work in the joglutils project…

I’m sorry, why do we need yet another scenegraph?
we have xith and jme, doing fairly well - both supporting jogl.
Why do another one, that is incompatible with everything else?

surely using jogl implies a download of some sort - whats to gain with a minimal SG? as opposed to just letting xith and jme handle this (or any of the other SGs)?

Xith3D and JMonkeyEngine are both fine scene graphs. (Although to the best of my knowledge jME doesn’t have a JOGL binding.) MSG is currently intended mostly for experimental purposes, although I believe it has some architectural advantages over most of the existing scene graphs such as composing well with other libraries and supporting extensibility.

[quote]Yes, but what you really want is to browse the javadoc.
[/quote]
Ehm, no, what I really want is documentation. But failing that I prefer to see the sourcecode, the javadocs are in there as well :wink:

Just to explain: normally I want some docs or tutorial to explain the basic structure and functionality of the project. Knowing that the javadocs are enough for the details about how to call which methods using what arguments. But IMHO looking at the javadocs to figure out how everything works just plain sucks, looking directly at the source will teach me much more.

But I’d still like to see some kind of paper describing the ideas behind MCG and some hints how to use it :slight_smile:

Point taken. The overview javadoc gives some motivation for the design, and you can consult SGI’s original Open Inventor documentation to get an idea of how to use it, since it largely follows that design. In the absence of more documentation, there is an example using it in net.joglutils.msg.test.DisplayShelf. We will be releasing the source code for a more up-to-date version of this example as well as a 3D slide show within a few weeks.