Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Java3D vs OpenGL

0 views
Skip to first unread message

a98m...@ida.his.se

unread,
Jan 16, 2002, 8:08:14 AM1/16/02
to
Hi!
Could someone direct me to any performance comparison between Java3D and
OpenGL. I know that Java3D uses OpenGL for rendering but has anyone done
any benchmark to see if there is any performance loses when using Java3D
instead of OpenGL?

Thanks in advance!
/Michael Andersson

Artur Biesiadowski

unread,
Jan 16, 2002, 9:51:46 AM1/16/02
to
a98m...@ida.his.se wrote:

> Hi!
> Could someone direct me to any performance comparison between Java3D and
> OpenGL. I know that Java3D uses OpenGL for rendering but has anyone done
> any benchmark to see if there is any performance loses when using Java3D
> instead of OpenGL?

This is very hard to do. What kind of application would you compare ?

You can try to compare raw triangle throughput. When using display lists
it is not a problem for java3d to get same speed as opengl. When doing
everything dynamically, java3d will be slower.

For example with particle system using points, I got same number of
points-per-second as in opengl. This is with everything being dynamic...

For some apps java3d can be actually a lot faster, because it does some
occluding for you. So if compared to trivial opengl app, which displays
everything in universe each time, java3d will be faster.

Generally, it is always possible to write opengl app which will look the
same and be as fast or faster than java3d (which is obvious, because
java3d runs on top of opengl). Question is about amount of work it
requires - and if skills of given person are good enough to get every
bit of speed from opengl.

What is currently quite slow in java3d - dynamic textures. They take a
lot of memory, need few levels of indirection etc, etc. Second problem
is functionality - there is no access to stencil buffer in java3d, so
some tricks using it are impossible or would have to be emulated in very
slow fasion.

If you can live without dynamic textures, stencil buffer, pixel and
vertex shaders, try out java3d and don't worry about speed. If not, try
out jausoft gl4java.


Artur

fungus

unread,
Jan 16, 2002, 9:16:27 PM1/16/02
to
a98m...@ida.his.se wrote:

> Hi!
> Could someone direct me to any performance comparison between Java3D and
> OpenGL. I know that Java3D uses OpenGL for rendering but has anyone done
> any benchmark to see if there is any performance loses when using Java3D
> instead of OpenGL?
>


Apples and oranges. OpenGL and Java3D aren't the same
thing at all so you can't compare them directly. It's
going to depend A LOT on what you're trying to render.

If you can use display lists then OpenGL is going to
give the same performance no matter what the programming
language - interpreted Intercal will go just as fast
as hand-tuned assembly language.

One the one hand Java3D is a higher level API than OpenGL
and can apply culling to a scene. If your scene is cullable
then this will make it a lot faster than an OpenGL program
which blindly sends all polygons every frame.


On the other hand, Java has a big bottleneck when sending
data across the Java<->OpenGL interface. If you're modifying
the vertices of an object every frame then Java3D could be
a lot slower.

etc. etc. There's no answer apart from "suck it and see".


--
<\___/>
/ O O \
\_____/ FTB.

0 new messages