Using Java3D [message #1020] |
Mon, 25 August 2008 02:58  |
Eclipse User |
|
|
|
Originally posted by: abheek.adarobotics.com
Greetings!
My name is Abheek and I have been working with GEF for quite some time
now. My company is into design and development of software for robotic
systems which also includes simulation and 3d modeling.
GEF3D is of significant interest to us and we would like to get involved.
However, it would be interesting for us to know if we can use Java3D as
the 3D component, since this also gives us an ability to add external
libraries like ODEJava and JRoboOp.
I see from the GEF3D website, that the Java3D version of GEF3D is no
longer in development. Are there any special reasons apart from SWING /
SWT issues?
Thanks a tonne!
Cheers!
Abheek
|
|
|
Re: Using Java3D [message #1055 is a reply to message #1020] |
Mon, 25 August 2008 09:28   |
Eclipse User |
|
|
|
> However, it would be interesting for us to know if we can use Java3D as
> the 3D component, since this also gives us an ability to add external
> libraries like ODEJava and JRoboOp.
>
> I see from the GEF3D website, that the Java3D version of GEF3D is no
> longer in development. Are there any special reasons apart from SWING /
> SWT issues?
The SWING/SWT issue is a very hard one: Swing components "produce"
Swing events, which made it impossible to use the original GEF code
since GEF's mouse classes have no public constructors and thus it was
not possible to "inject" these Swing events into GEF. Also, the
SWING-SWT-bridge isn't working on Mac OS X (which is my main
development platform).
Besides these issues I had severe memory problems with Java3D: I wasn't
able to create diagrams with more than 50 3D nodes. I analyzed the
system with a profiler, and more than 90% of the memory were used by
Java3D. I don't know why Java3D needed that much memory. I mapped 3D
figures on nodes in the scene graph, and this mapping was not too
simple. So probably my programming was the reason, but on the other I
(still) don't know how I could had made it better. IMHO the problem is
that Java3D is very good for visualization and restricted interactions,
but not for a full-featured editor. In the later case, the scene graph
cannot be optimized since all nodes must be editable.
It's planed to make GEF more independent from the actual rendering
engine used, but I doubt that Java3D will be a good replacement (for
LWJGL or some other OpenGL wrapper). Java3D comes with its own data
structure (the scene graph), and since GEF/GEF3D provides its own
structure (the figure tree), there always would be some redundancy.
Besides you will still face the SWT-Swing issue (and the event class
design flaw).
On the other hand it may be possible to port ODEJava or JRoboOp to
GEF3D ;-) But I'm not sure whether this makes sense or not (I'm not a
robotic expert). GEF3D is _not_ a CAD framework, and it probably isn't
a framework for 3D modelers (like Blender)! As GEF it is specialized
for visualizing (end editing) graph like structures! There's some
overhead for each tiny thing which should be edited, and in many cases
this may be too much overhead.
But GEF3D's figures (IFigure3D extending IFigure) uses OpenGL to
actually render the image. So if you can provide an importer for your
3D modeling tool, you may be able to map some of the 3D models to
figures. You can then work with larger components, i.e. the figures,
and then GEF3D may become interesting again.
Frankly, I have no experiences with this kind of 3D tools. GEF3D was
developed with other applications in mind, so there may be some design
problems if you try to use GEF3D for that kind of stuff (and bugs I
don't know about yet since I'm not using GEF3D that way). Although I
would be curious if it works, but I have to warn you that GEF3D may not
be the best choice.
Cheers,
Jens
|
|
|
|
|
Re: Using Java3D [message #560743 is a reply to message #1020] |
Mon, 25 August 2008 09:28   |
Eclipse User |
|
|
|
> However, it would be interesting for us to know if we can use Java3D as
> the 3D component, since this also gives us an ability to add external
> libraries like ODEJava and JRoboOp.
>
> I see from the GEF3D website, that the Java3D version of GEF3D is no
> longer in development. Are there any special reasons apart from SWING /
> SWT issues?
The SWING/SWT issue is a very hard one: Swing components "produce"
Swing events, which made it impossible to use the original GEF code
since GEF's mouse classes have no public constructors and thus it was
not possible to "inject" these Swing events into GEF. Also, the
SWING-SWT-bridge isn't working on Mac OS X (which is my main
development platform).
Besides these issues I had severe memory problems with Java3D: I wasn't
able to create diagrams with more than 50 3D nodes. I analyzed the
system with a profiler, and more than 90% of the memory were used by
Java3D. I don't know why Java3D needed that much memory. I mapped 3D
figures on nodes in the scene graph, and this mapping was not too
simple. So probably my programming was the reason, but on the other I
(still) don't know how I could had made it better. IMHO the problem is
that Java3D is very good for visualization and restricted interactions,
but not for a full-featured editor. In the later case, the scene graph
cannot be optimized since all nodes must be editable.
It's planed to make GEF more independent from the actual rendering
engine used, but I doubt that Java3D will be a good replacement (for
LWJGL or some other OpenGL wrapper). Java3D comes with its own data
structure (the scene graph), and since GEF/GEF3D provides its own
structure (the figure tree), there always would be some redundancy.
Besides you will still face the SWT-Swing issue (and the event class
design flaw).
On the other hand it may be possible to port ODEJava or JRoboOp to
GEF3D ;-) But I'm not sure whether this makes sense or not (I'm not a
robotic expert). GEF3D is _not_ a CAD framework, and it probably isn't
a framework for 3D modelers (like Blender)! As GEF it is specialized
for visualizing (end editing) graph like structures! There's some
overhead for each tiny thing which should be edited, and in many cases
this may be too much overhead.
But GEF3D's figures (IFigure3D extending IFigure) uses OpenGL to
actually render the image. So if you can provide an importer for your
3D modeling tool, you may be able to map some of the 3D models to
figures. You can then work with larger components, i.e. the figures,
and then GEF3D may become interesting again.
Frankly, I have no experiences with this kind of 3D tools. GEF3D was
developed with other applications in mind, so there may be some design
problems if you try to use GEF3D for that kind of stuff (and bugs I
don't know about yet since I'm not using GEF3D that way). Although I
would be curious if it works, but I have to warn you that GEF3D may not
be the best choice.
Cheers,
Jens
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03009 seconds