MisterXen wrote:

I´m sorry that I have to insist on my opinion and I can't agree with you. I don't see the point, why using scene graphs makes your life easier!?!

erm, cause it does everything I need without having to re-write it myself, if I load an object from say an AC3D file I have one of two choices, embed GL calls into internal representations of the model components, or load them, and bung it in a scene tree. Embedding gl calls means that special cases can easily be coded round, but I now have to work out how I'm going to get all my transparencies sorted properly to render in reverse depth order as the camera in my scene sees them. A scene tree I can traverse and find all these transparent bits, and work it out from my 'View' object combined with each geometry, turns out that now it's a piece of cake to do, or even better, in the case of java3d, it's done for my behind the scenes with no worries, 'It just works'.

First, I thought that scene graphs are fine. But now, where I can compare
the Java3D code with the (ported) OpenGL code, I see that OpenGL code is
shorter and very clear.

shorter?, clearer?, I think your java3d code is wrong, to place an object with transparency, textures, texture coordinates, normals, and of course vertecies is just a few lines of code, GL on the other hand, isn't, it's still not rocket science, but it's not short and sweet either. Then you have to worry about depth sorting the transparent bits, turning on and off the depth buffer and depth buffer writes, loading the texture and binding it each time you draw the object. Granted that setting up an initial scene in java3d takes some effort, but the rewards are worth it.

To solve a certain issue in Java3D I need twice as
much code in Java3D than in OpenGL.

are you making the calls direct each time in GL, or are you creating objects that know how to render themselves and placing them in a world, if your doing that latter, you are using a basic (very basic) scene tree anyway

Concerning transparency: As far as I know, Java3D can't do depth-sorted
drawing.

i'll correct you then, it does, as standard, and depth sorted transparency with a one liner, View.setTransparencySortingPolicy(View.TRANSPARENCY_SORT_GEOMETRY)

But even if it can, there should be no problem adapting known
algorithms to Java with OpenGL bindings.

true, but why re-invent the wheel every time?


Apart from that one can influece
the depth buffer in OpenGL (but not from within Java3D because the access
of OpenGL functions is not allowed).

View.setTransparencySortingPolicy View.setDepthBufferFreezeTransparent RenderingAttributes.setDepthBufferEnable RenderingAttributes.setDepthBufferWriteEnable


Okay, I think you are right. There are loaders for different formats for Java3D! .... on the other hand, source is available for many Loaders for OpenGL (okay, most are in C or whatever)

true, but the loaders only parses the data into something else. In openGL you either have to parse it into objects that know how to render themselves (transparency won't work properly as it needs to be sorted from the view), or they must load it into some kind of scene tree, which means you have to find a loader that works for the scene tree you are using, this is true even with java3d, the difference is anyone using java3d can use the java3d loader, where as in openGL you will probably have to write one that gets the data into something you can use.

Eventually ..... thats the point. I don´t know what Sun will do in the
future and thus I don't know, when the feature I need is available! ... I´m
dependent on Sun :(((

you are dependant on the OpenGL group with GL for new features, you don't know when they will be put into GL4Java (which is currently only on gl 1.3), it's true that jogl can be recompiled against new GL libraries for new releases. If you need bleeding edge technology you wouldn't have looked at java3d for long in the first place though :)

Yaa, you are right. A scenegraph on top of a binding would be nice. But
that scenegraph has to be complete and extendable. (not that indication of
a scene graph Java3D uses!)

so you agree that scene graphs are good now?


Maybe, maybe not ..... but why should I risk to sink :)))


if you jump you may drown before someone rescues you :), on the other hand, with less weight the ship might float longer :P

Cheers

Jeremy

--

Homepage: http://www.computerbooth.com/
Code page: http://www.newdawnsoftware.com/

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to