Java3D now works with JOGL 2.0

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

Java3D now works with JOGL 2.0

gouessej
Administrator
Hi

I have succeeded in porting Java3D to JOGL 2.0. A few parts of the source code are still a bit hacky but it works.

Now, it uses only JOGL on all platforms whereas previous versions of Java3D was using it only on Mac OS X and sometimes on Microsoft Windows 32 bits.



Long live JOGL and free open source softwares

The source code will probably be put onto Github. Best regards.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

Sven Gothel
Administrator
On 02/10/2012 12:23 PM, gouessej [via jogamp] wrote:

>
>
> Hi
>
> I have succeeded in porting Java3D to JOGL 2.0. A few parts of the source
> code are still a bit hacky but it works.
>
> Now, it uses only JOGL on all platforms whereas previous versions of Java3D
> was using it only on Mac OS X and sometimes on Microsoft Windows 32 bits.
>
> http://forum.jogamp.org/file/n3732206/Java3D_with_JOGL2_0_RC5_first_success.png 
>
> Long live JOGL and free open source softwares
>
> The source code will probably be put onto Github. Best regards.
Kudos, that was fast!

Looking forward to Harvey's git migration and testing it.

As mentioned before, I guess it would be important to have
a backend for GL2ES2 without any AWT dependencies to allow
widespread usage - like you did for Ardor3D (which I still have to test).

~Sven


signature.asc (910 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

gouessej
Administrator
At first, I have to use a less "hacky" code with AWT.

Then, I will do what you suggest but it will require some days.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

Sven Gothel
Administrator
On 02/10/2012 12:38 PM, gouessej [via jogamp] wrote:
>
>
> At first, I have to use a less "hacky" code with AWT.
>
> Then, I will do what you suggest but it will require some days.

Awesome ... of course, we can work on this part together,
once Harvey is set (git .. etc). For sure .. this stage is the fineprint
but would love you to show it on Desktop *and* mobile next to your
Ardor3D port @ SIGGRAPH 2012
  <https://jogamp.org/bugzilla/show_bug.cgi?id=530>.

BTW: Anybody else wanting something to be shown @ our SIGGRAPH2012 BOF,
     please simply add yourself to bug530 and let's discuss it.

~Sven


signature.asc (910 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

gouessej
Administrator
I can try to do the first step as soon as possible. The second step should be harder because Java3D is very close to AWT. Maybe you will be able to implement the ES2 isolation. Keep in mind that I still use OpenGL 1.3 on some machines.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

Martin
Congratulations!

I would be interested to read some docs about this work.

I have heard many times that java3d is a pain for opengl developpers because they can't do real opengl (accessing feedback buffer and stuffs like that). It is a very old discussion. Is it still true? Aren't JMonkeyEngine, Ardor3d or other scene graph a better alternative for java based 3d?

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

Re: Java3D now works with JOGL 2.0

gouessej
Administrator
In my humble opinion, JMonkeyEngine 2 & 3 have a bigger community supporting them, JMonkeyEngine 3 has the best shader-based pipeline and an excellent Game Development Environment, Ardor3D has the best support of JOGL 2.0.

Java3D was used a lot in the past. It was a pain when it uses several ways to access hardware acceleration which is no more the case, I removed the support of Direct3D and the alternative access to OpenGL not from JOGL. Now, mixing JOGL and Java3D is possible, not only on Mac (which was the case in the past).

Ardor3D has a lack of documentation whereas there are thousands of examples using Java3D on the Web.

Java3D will only be another (very popular) option. I will go on advising the use of Ardor3D as it's faster and it has a lower memory footprint.

Sweethome still uses Java3D and its author is not yet ready to switch to another scenegraph. I prefer allowing him to go on using JOGL through Java3D.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

Marcos Ackel
Hello,

I'm studying Java3D for a new project, after considering Xith3d and jMonkey. I need to use anaglyphs for stereo viewing and I intend to extend the idea to 3d passive monitors after the anaglyph version. The project is about molecular modelling.

It's great new to see some movement about Java3D  - and congratulations for the initiative and for the great job done.

I'm confuse about the versions mentioned here. Is the Harvey Harrison's version at

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

the same version you mention, that works with JOGL2.0? If not, where can we find this version? (The version at github doesn't mention which JOGL version to use).

Thank you,

Marcos Ackel
Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

gouessej
Administrator
Hi

Your link points to the right version, I contributed and now Harvey goes on maintaining Java3D. Best regards.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

Martin
Hi Marcos,

I see you are talking about anaglyphs. I have made a proof of concept in Jzy3d showing how to customize its View object to allow Open GL stereo rendering.

It does not properly configure the angle & distance between left and right view points but shows how to use left and right Open GL buffers.
Some people have been working on an implementation that makes a clean rendering and I have seen this great work on a 3d passive monitor. They told me they want to release this as open source, but I don't know when.

If you think Jzy3d is sufficient to do your work, I can send you my POC.

Cheers,
Martin

2012/7/17 gouessej [via jogamp] <[hidden email]>
Hi

Your link points to the right version, I contributed and now Harvey goes on maintaining Java3D. Best regards.


If you reply to this email, your message will be added to the discussion below:
http://forum.jogamp.org/Java3D-now-works-with-JOGL-2-0-tp3732206p4025547.html
To unsubscribe from Java3D now works with JOGL 2.0, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

gouessej
Administrator
In reply to this post by gouessej
Hi

My tutorial about Java 3D 1.6.0 and JOGL 2.0 is here.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

Eike
Hi there and thank you very much for the work you have done.
I just tried to get one of my projects running that needs Java 7 and Java3D on the mac. I followed your tutorial so far but unfortunately I run into problems. Whatever I do, I get always the following error on a MacBook Pro 13", 2,5GHz Intel Core i5, 4GB, Intel HD Graphics 3000 384MB, OS X 10.8 (12A269):

********************************************************************************

3D [dev] 1.6.0-pre1-daily-experimental daily

2012-08-09 19:09:22.595 java[612:14303] -[NSViewAWT CGLPBufferObj]: unrecognized selector sent to instance 0x7fb23a612d40
2012-08-09 19:09:22.597 java[612:14303] An uncaught exception was raised
2012-08-09 19:09:22.597 java[612:14303] -[NSViewAWT CGLPBufferObj]: unrecognized selector sent to instance 0x7fb23a612d40
2012-08-09 19:09:22.597 java[612:14303] (
        0   CoreFoundation                      0x00007fff833d6716 __exceptionPreprocess + 198
        1   libobjc.A.dylib                     0x00007fff86eb8470 objc_exception_throw + 43
        2   CoreFoundation                      0x00007fff8346cd5a -[NSObject(NSObject) doesNotRecognizeSelector:] + 186
        3   CoreFoundation                      0x00007fff833c4c3e ___forwarding___ + 414
        4   CoreFoundation                      0x00007fff833c4a28 _CF_forwarding_prep_0 + 232
        5   AppKit                              0x00007fff8405bb3e -[NSOpenGLContext setPixelBuffer:cubeMapFace:mipMapLevel:currentVirtualScreen:] + 59
        6   libjogl_desktop.jnilib              0x0000000113b1289b setContextPBuffer + 203
        7   libjogl_desktop.jnilib              0x0000000113b7629b Java_jogamp_opengl_macosx_cgl_CGL_setContextPBuffer__JJ + 43
        8   ???                                 0x0000000105e47d6e 0x0 + 4393827694
        9   ???                                 0x0000000105e3c85a 0x0 + 4393781338
        10  ???                                 0x0000000105e3ce03 0x0 + 4393782787
        11  ???                                 0x0000000105e3c929 0x0 + 4393781545
)
2012-08-09 19:09:22.598 java[612:14303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSViewAWT CGLPBufferObj]: unrecognized selector sent to instance 0x7fb23a612d40'
*** First throw call stack:
(
        0   CoreFoundation                      0x00007fff833d6716 __exceptionPreprocess + 198
        1   libobjc.A.dylib                     0x00007fff86eb8470 objc_exception_throw + 43
        2   CoreFoundation                      0x00007fff8346cd5a -[NSObject(NSObject) doesNotRecognizeSelector:] + 186
        3   CoreFoundation                      0x00007fff833c4c3e ___forwarding___ + 414
        4   CoreFoundation                      0x00007fff833c4a28 _CF_forwarding_prep_0 + 232
        5   AppKit                              0x00007fff8405bb3e -[NSOpenGLContext setPixelBuffer:cubeMapFace:mipMapLevel:currentVirtualScreen:] + 59
        6   libjogl_desktop.jnilib              0x0000000113b1289b setContextPBuffer + 203
        7   libjogl_desktop.jnilib              0x0000000113b7629b Java_jogamp_opengl_macosx_cgl_CGL_setContextPBuffer__JJ + 43
        8   ???                                 0x0000000105e47d6e 0x0 + 4393827694
        9   ???                                 0x0000000105e3c85a 0x0 + 4393781338
        10  ???                                 0x0000000105e3ce03 0x0 + 4393782787
        11  ???                                 0x0000000105e3c929 0x0 + 4393781545
)
libc++abi.dylib: terminate called throwing an exception

******************************************************************************

I wonder if you could give me an advise where I should have a look?

Thank you
Eike
Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

affogato
In reply to this post by gouessej
Hi,

This is fantastic work. I'm using Java3d for a computational biology research project.

Is there any plan to create an 'official' site for the continued development of Java3d maintained by yourself and hharrrison?

Currently, the only way I found to get to the github source, or to the Jar's, was using the links you supplied in the wordpress guide 'Java 3D is back'. Is there any other way for people to find them?

Also, are the JAR's at the link you gave up to date (for people that do not or are not able to build the source) ?

Thanks,
Gideon
Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

gouessej
Administrator
Hi

You're welcome.

I'm glad to see that you're satisfied by Java3D. As far as I know, there is no plan to create an official website for Java3D, we are even not sure we are allowed to use the term "Java3D" which may be a trademark.

There are no other way to find these JARs but my article is frequently updated, the links are up to date.

I maintain several scenegraphs. Java3D works fine but don't forget the conclusion of my article. On the long term, switching to another scenegraph is a better solution. I ported Ardor3D and JMonkeyEngine 3.0, I use the former daily in my project and I fix its bugs within hours most of the time, I rarely use the latter but it has a very active community. Don't hesitate to contact us if you need some help to use any of these scenegraphs.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

affogato
Hi,

Thanks for your response. I'd like to use a different framework as you suggested, but re-implementing the visualisation module would be very difficult, as I have limited time, and need to focus on the research aspect of my project.

Thanks for your offer of help. Actually, I get the hanging issue that has been reported in several of the threads on this forum (see below), I assume for the same reasons.

Do you know if any progress has been made in solving this problem?
- Is a fix coming with rc11?
- Is it solved by using JOGL 1.1.1a

Thanks again,
Gideon


I'm using:
- Mac OSX 10.8.2
- Java 1.7.0_09
- Java3d 1.6
- JOGL 2.0 rc10

Threads that reported and discussed the hanging issu:
http://forum.jogamp.org/Issue-with-Java-3D-under-OpenJDK-7-Mac-OS-X-td4025259i20.html
http://forum.jogamp.org/Issue-with-Java-3D-under-OpenJDK-7-Mac-OS-X-td4025259.html
http://forum.jogamp.org/how-to-run-jogl-j3d-successfully-td4025876.html
Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

gouessej
Administrator
I understand your position. If there is a real demand of an automated tool to convert Java3D code to Ardor3D, I will spend some time on it. I really want scientists to feel comfortable when using our APIs. Java3D has some design flaws; if we can't fix them, we will provide other solutions.

The hanging issue comes from a bug of AWT in Java 1.7 under Mac OS X, we can't fix it but ... Ardor3D works fine with NEWT, it is not concerned by this bug. JOGL 1.1.1a doesn't solve your problem, it would be even worse under Mac. I don't know if someone reported the real bug that causes the hanging issue. Anyway, please switch to the RC11, always use at least the latest release candidate. Maybe your freeze comes from another problem but I can't be sure until you switch to the RC11.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

Sven Gothel
Administrator
In reply to this post by affogato
On 11/06/2012 10:52 AM, affogato [via jogamp] wrote:
> Hi,
>
> This is fantastic work. I'm using Java3d for a computational biology research
> project.
>
> Is there any plan to create an 'official' site for the continued development
> of Java3d maintained by yourself and hharrrison?

After a few more bug fixes of JOGL and other areas,
we will produce java3d binaries.

However, we might need a new active maintainer for it,
since java3d has very low priority for us.

Maintenance can start on a very low or easy level,
like adding some unit tests allowing at least to validate it's usability
w/ the rest of the Jogamp modules (GlueGen, JOGL).

If you or others like to step in here to help .. you are more then welcome.

~Sven


signature.asc (907 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

gouessej
Administrator
Java3D design flaws might refrain me to plan the addition of major features but we can do our best for its maintenance, it is not a big effort.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

affogato
ah sorry about that, i _was_ using rc11.

Thanks for your responses.
Looking forward to new versions of Java3d :-)

It's really awesome work that you're doing.
Reply | Threaded
Open this post in threaded view
|

Re: Java3D now works with JOGL 2.0

affogato
Hi

I've tried the simulation on an Ubuntu VM v12.04 (on top of Mac OSX 10.8.2), and I get exactly the same hanging issue.
The console output is:

3D [dev] 1.6.0-pre3-daily-experimental daily

This does not occur for me on older versions of Mac OSX 10.7.x
Does this output hint at anything you can think of?

Thank you very much for your help,
Gideon
12