Java 3D

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Java 3D

Penny
Hello,

I have been developing my project in Java3D for the last few years.

I have recently found a few bugs in the packages yet I cant seem to get a response from anyone in the forums.

Is Java3D dead? If so I am very disappointed as it looks like the last 2 years has been a bit of a waste.

Never mind, I am considering migrating my code to JOGL.

I'm not yet sure if JOGL will replace JAVA3D with any meaning.

My questions are, is Java3D defunct? is JOGL the way to go?

Many Thanks
P
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D

hharrison
Hi Penny,

I've been maintaining Java3d (in some capacity) for the past year, I've removed the native backends and rely
only on the Jogl2 backend.  If you had any specific bug reports, I'd sure like to hear about them.  If you have patches,
even better!

You can find my fork here:

https://github.com/hharrison/java3d-core
https://github.com/hharrison/java3d-utils
https://github.com/hharrison/vecmath

Best way to get started would be to report a bug.

Looking forward to hearing from you.

Harvey
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D

Penny
Hi,

This is an interesting development.

I have dealt with a number of bugs where it would just lock up or throw an unrecoverable error meaning some background thread was halted. I have mostly solved these issues by ensuring the situations that cause these problems do not occur from within my own code.

The problem which has halted my progress is the picking feature.

Imagine a box primitive near flattened and used as a floor.
I create a HitCylinderRay over the box with the normal pointing directly down, perpendicular to the box.
I use the getLocale().pickClosest()
I create a PickIntersection from the locale and PickInfo.IntersectionInfo

Initially I was delighted with the results. However, after a lot of playing around with picking I notice the results are inaccurate.

The PickInfo getClosestIntersectionPoint, getClosestDistance are generally incorrect.

The PickInfo.IntersectionInfo does not always have the vertices for the closest triangle and hence the distance and intersectionpoint are wrong.

The problem can be witness most regularly when once of the vertices is within the hit cylinder radius and the center is close to the edge of an adjacent triangle. Instead of picking the triangle whose edge is closest to the center the pick info selects a triangle whose vertice is within the cylinder. as soon as the vertice moves outside the cylinder the pick info returns the correct closest triangle and the correct closest intersection point, which happens to be on an edge.

unfortunately this phenomenon has rendered my whole project useless.

I have examined the source code for PickTool, PickInfo and traced through GeometryStructure, GeometryAtom and then onto BranchGroup Locale and VirtualUniverse.

After several hours I realised it wasnt going to be a quick fix as I dont have the experience to modify existing packages or how to integrate new code within existing packages.

I have spent the last couple of days trying to install JOGL yet with no success. I can compile using the jars but I cant for the life of me get the runtime to see the jars.

Anyway, my Java3D project, I've designed and written a whole GUI for Java3D that runs as part of the Canvas3D.

I am in a bit of a quandary as to what to do because my concerns are...

#1 How difficult is it to fix the problems I have with Java3D?

#2 Considering that it looks like Java3D has now been dropped and is no longer supported and considering that new 3D technologies will be suported by other existing 3D engines that are supported and updated, what future would any project have that relies on Java3D?

#3 I havent looked deeply into the capabilities of JOGL but how does it compare to JAVA3D? can I do all the things in JOGL that I can do in Java3D?

As you can imagine I am a bit concerned as to what to do. Your insight would be greatly appreciated.
PS. I am going to have a look at your libraries to see if they can help with my predicument.

Regards
P

Reply | Threaded
Open this post in threaded view
|

Re: Java 3D

elotter
Hi Penny

We've had very similar qualms with Java3D, while as an API is useful, is not actively maintained any more, with serious concerns about its long term viability and our reliance on it. I can certainly tell you that Harvey, Julien, Sven and all the other JOGL guys have done a great job on making this much more viable.

Try out Harvey's Java3D fork/continuation - I've had the pleasant experience of years old Java3D code working like a charm using the new JOGL2 backend without making *any* code changes.

Cheers,
Ernest
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D

Penny
Hi Ernest,

Thanks for your message. I have spent the last 2 years developing my project with java3d and with hoping it will weather the next 10 years or so. The fact it relies on a now unsupported package is very worrying and I am thinking migration to a package that will be maintained and updated for the next 10 years is a much more sensible thing to do. If however, Java3D will be maintained and support in the next 10 years + then I will be happy to continue my current path of development.

I'm still in the process of figuring out the best course of action.

Harvey, You suggested I report a bug but I am not sure in what way you mean, please explain thanks.

Regards
P
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D

Penny
My project uses Java3D 1.5.2

If you are suggesting to drop Java3d 1.5.2 and use Harveys fork package then I will explore this as a viable option.

Regards
P
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D

gouessej
Administrator
Penny, Java3D (Harvey's fork, JogAmp Java3D i.e Java3D 1.6) is viable, it is actively maintained but don't expect huge evolutions. In other terms, we will do our best to keep it in a working and stable state but I'm not sure we will implement new features except (maybe) NEWT support.

If you need something more future proof, faster and more reliable, consider switching to Ardor3D. Bugs are daily fixed, it evolves quite quickly, it already has NEWT support. If there is a real demand for a tutorial about how to switch from Java3D to Ardor3D, I will write one. Renanse makes a great job, he added some nice manipulators, Ardor3D is great for scientific visualization (and for gaming too).

Java3D 1.5.2 is obsolete, it shouldn't be used in production, it is no more maintained for years and it partially relies on an obsolete version of JOGL.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D

Penny
Thanks :)

I had a look at the Ardor3D website and it looks like quite an accomplished package with many features. I have read several articles where people have migrated their projects from Java3D to Ardor3D. So I am confident that this is the way to go for my project.

I have looked all over the Ardor3D website and I cant seem to find a link to download the documentation anywhere.

I have even Googled many Ardor3D links in search of documentation.

I am a bit of a loss as to how to find the documentation.

Please Help :)
P
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D

Manu
In reply to this post by gouessej
gouessej wrote
Java3D 1.5.2 is obsolete, it shouldn't be used in production
Julien, you're too severe with Java 3D 1.5.2. It's used by millions of users of Sweet Home 3D (I'm not over exaggerating), and my main interest to Java 3D 1.6 is because Java3D 1.5.2 can't work with Java 7 under Mac OS X. Today, in Sweet Home 3D case, the only thing I can state is that Java3D 1.5.2 will start to become obsolete once Apple doesn't provide Java SE 6 under Mac OS X (probably in the coming months). On other systems, Sweet Home 3D users don't have problems (except outdated graphics card drivers issues from time to time, but I don't expect a much better experience with a newer version or another library).
Emmanuel Puybaret
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D

gouessej
Administrator
In reply to this post by Penny
Manu wrote
Julien, you're too severe with Java 3D 1.5.2. It's used by millions of users of Sweet Home 3D (I'm not over exaggerating), and my main interest to Java 3D 1.6 is because Java3D 1.5.2 can't work with Java 7 under Mac OS X. Today, in Sweet Home 3D case, the only thing I can state is that Java3D 1.5.2 will start to become obsolete once Apple doesn't provide Java SE 6 under Mac OS X (probably in the coming months). On other systems, Sweet Home 3D users don't have problems (except outdated graphics card drivers issues from time to time, but I don't expect a much better experience with a newer version or another library).
I'm not too severe. Java3D 1.5.2 partially relies on a very obsolete version of JOGL (1.1.1a?) which is not maintained any more for several years and used under Windows 32 bits and under Mac. If something wrong happens, nobody will fix this version of JOGL. Moreover, Java3D 1.5.2 itself was not evolving any more after Sun decided not to use it in what has become JavaFX. Bundling completely obsolete and unmaintained versions of libraries in professional applications is irresponsible but I understand that people may need some help to port them, that's why I'm here too. We can't spend all of our time in porting things, but the stop of JOGL 1 maintenance happened several years ago, I'm still surprised to see people realizing it only now. I work as an engineer in computer science and I can tell you that I don't sleep very well when a commercial application is shipped with a proprietary abandoned dependency.

Penny wrote
Thanks :)

I had a look at the Ardor3D website and it looks like quite an accomplished package with many features. I have read several articles where people have migrated their projects from Java3D to Ardor3D. So I am confident that this is the way to go for my project.

I have looked all over the Ardor3D website and I cant seem to find a link to download the documentation anywhere.

I have even Googled many Ardor3D links in search of documentation.

I am a bit of a loss as to how to find the documentation.

Please Help :)
P
There is no online Java documentation for Ardor3D but you can generate it from the source code. There are tons of examples on Github:
https://github.com/Renanse/Ardor3D/tree/master/ardor3d-examples/src/main/java/com/ardor3d/example
Have you looked at the wiki?
https://github.com/Renanse/Ardor3D/wiki

Don't hesitate to ask for help on the official forum of Ardor3D.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D

hharrison
That's not really accurate, Java3D 1.5.2 _has_ a Jogl 1.1.1 backend, but you have to force it to be used,
by default, it uses a native Direct3D backend (32-bit windows) or a native OpenGL backend (64-bit windows, and everywhere
else).

The fact I chose to go with a Jogl2-based backend and not the native backends was to make it a java-only problem,
the JOGL 1.1 backend of Java3d was probably the _least tested part of Java3d.

Harvey
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D

gouessej
Administrator
but Java3D 1.5.2 uses JOGL 1.1.1a under Mac, am I wrong?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D

hharrison
Oh yeah, Mac, you're correct, Mac only had the jogl 1.1 backend, my mistake.

Harvey