Java 3D meets JavaFX !

View: New views
4 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Re: Java 3D meets JavaFX !

by java3d-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The instructions for Mac OS X aren't very good ones.  I followed them, have tested the 3-D on the interactivemesh site, but I get the following error:

init:
deps-jar:
compile:
jar:
standard-run:
FXDistortString : Copyright (c) 2009 August Lammersdorf, www.InteractiveMesh.com.
Exception in thread "AWT-EventQueue-1" java.lang.IllegalStateException: Canvas3D: Illegal operation in off-screen mode
        at javax.media.j3d.Canvas3D.stopRenderer(Canvas3D.java:1679)
        at com.interactivemesh.j3d.community.gui.FXCanvas3D$InternalCanvas3D.createOffScreenBuffer(FXCanvas3D.java:605)
        at com.interactivemesh.j3d.community.gui.FXCanvas3D$InternalCanvas3D.access$2(FXCanvas3D.java:602)
        at com.interactivemesh.j3d.community.gui.FXCanvas3D$1.run(FXCanvas3D.java:409)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
        at com.sun.embeddedswing.EmbeddedEventQueue.dispatchEvent(EmbeddedEventQueue.java:440)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Exception in trigger:
java.lang.IllegalStateException: Canvas3D: Illegal operation in off-screen mode
        at javax.media.j3d.Canvas3D.stopRenderer(Canvas3D.java:1679)
        at com.interactivemesh.j3d.community.gui.FXCanvas3D$InternalCanvas3D.createOffScreenBuffer(FXCanvas3D.java:605)
        at com.interactivemesh.j3d.community.gui.FXCanvas3D$InternalCanvas3D.access$2(FXCanvas3D.java:602)
        at com.interactivemesh.j3d.community.gui.FXCanvas3D.createCanvas(FXCanvas3D.java:404)
        at com.interactivemesh.j3d.community.gui.FXCanvas3D.setBounds(FXCanvas3D.java:373)
        at java.awt.BorderLayout.layoutContainer(BorderLayout.java:809)
        at java.awt.Container.layout(Container.java:1401)
        at java.awt.Container.doLayout(Container.java:1390)
        at java.awt.Container.validateTree(Container.java:1473)
        at java.awt.Container.validateTree(Container.java:1480)
        at java.awt.Container.validateTree(Container.java:1480)
        at java.awt.Container.validateTree(Container.java:1480)
        at java.awt.Container.validateTree(Container.java:1480)
        at java.awt.Container.validateTree(Container.java:1480)
        at java.awt.Container.validateTree(Container.java:1480)
        at java.awt.Container.validateTree(Container.java:1480)
        at java.awt.Container.validate(Container.java:1448)
        at java.awt.Window.show(Window.java:516)
        at java.awt.Component.show(Component.java:1302)
        at java.awt.Component.setVisible(Component.java:1255)
        at com.sun.javafx.tk.swing.WindowStage.setVisible(WindowStage.java:291)
        at javafx.stage.Stage$_SBECL.onChange(Stage.fx:392)
        at com.sun.javafx.runtime.location.BooleanVariable.notifyListeners(BooleanVariable.java:146)
        at com.sun.javafx.runtime.location.BooleanVariable.replaceValue(BooleanVariable.java:94)
        at com.sun.javafx.runtime.location.BooleanVariable.setAsBoolean(BooleanVariable.java:113)
        at javafx.stage.Stage.set$visible(Stage.fx:391)
        at com.interactivemesh.j3d.testspace.jfx.distortstring.DistortStringMain$1.lambda(DistortStringMain.fx:115)
        at com.interactivemesh.j3d.testspace.jfx.distortstring.DistortStringMain$1.lambda(DistortStringMain.fx:115)
        at com.interactivemesh.j3d.testspace.jfx.distortstring.DistortStringMain$1.invoke(DistortStringMain.fx:111)
        at com.interactivemesh.j3d.testspace.jfx.distortstring.DistortStringMain$1.invoke(DistortStringMain.fx:111)
        at com.interactivemesh.j3d.testspace.jfx.distortstring.DistortStringMain$1.invoke(DistortStringMain.fx:111)
        at com.interactivemesh.j3d.testspace.jfx.distortstring.DistortStringMain$1.invoke(DistortStringMain.fx:111)
        at com.interactivemesh.j3d.testspace.jfx.distortstring.DistortStringUniverseFX$1.lambda(DistortStringUniverseFX.fx:66)
        at com.interactivemesh.j3d.testspace.jfx.distortstring.DistortStringUniverseFX$1.lambda(DistortStringUniverseFX.fx:66)
        at com.interactivemesh.j3d.testspace.jfx.distortstring.DistortStringUniverseFX$1.invoke(DistortStringUniverseFX.fx:65)
        at com.interactivemesh.j3d.testspace.jfx.distortstring.DistortStringUniverseFX$1.invoke(DistortStringUniverseFX.fx:65)
        at com.interactivemesh.j3d.testspace.jfx.distortstring.DistortStringUniverseFX$1.invoke(DistortStringUniverseFX.fx:65)
        at com.interactivemesh.j3d.testspace.jfx.distortstring.DistortStringUniverseFX$1.invoke(DistortStringUniverseFX.fx:65)
        at javafx.async.Task.impl_setDone(Task.fx:214)
        at com.sun.javafx.async.CallbackHandler.setDone(CallbackHandler.fx:26)
        at com.sun.javafx.async.TaskImpl$4.invoke(TaskImpl.java:77)
        at com.sun.javafx.async.TaskImpl$4.invoke(TaskImpl.java:75)
        at com.sun.javafx.runtime.Entry$2.run(Entry.java:105)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
        at com.sun.embeddedswing.EmbeddedEventQueue.dispatchEvent(EmbeddedEventQueue.java:440)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Exception in thread "AWT-EventQueue-1" java.lang.IllegalStateException: Canvas3D: Illegal operation in off-screen mode
        at javax.media.j3d.Canvas3D.stopRenderer(Canvas3D.java:1679)
        at com.interactivemesh.j3d.community.gui.FXCanvas3D$InternalCanvas3D.createOffScreenBuffer(FXCanvas3D.java:605)
        at com.interactivemesh.j3d.community.gui.FXCanvas3D$InternalCanvas3D.access$2(FXCanvas3D.java:602)
        at com.interactivemesh.j3d.community.gui.FXCanvas3D.createCanvas(FXCanvas3D.java:404)
        at com.interactivemesh.j3d.community.gui.FXCanvas3D.setBounds(FXCanvas3D.java:373)
        at java.awt.BorderLayout.layoutContainer(BorderLayout.java:809)
        at java.awt.Container.layout(Container.java:1401)
        at java.awt.Container.doLayout(Container.java:1390)
        at java.awt.Container.validateTree(Container.java:1473)
        at java.awt.Container.validateTree(Container.java:1480)
        at java.awt.Container.validateTree(Container.java:1480)
        at java.awt.Container.validate(Container.java:1448)
        at com.sun.embeddedswing.EmbeddedPeer$Shell.validate(EmbeddedPeer.java:325)
        at com.sun.embeddedswing.EmbeddedPeer$Shell$1.run(EmbeddedPeer.java:273)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
        at com.sun.embeddedswing.EmbeddedEventQueue.dispatchEvent(EmbeddedEventQueue.java:440)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
browser-run:
jws-run:
midp-run:
run:
BUILD SUCCESSFUL (total time: 1 minute 36 seconds)
[Message sent by forum member 'venacon' (venacon)]

http://forums.java.net/jive/thread.jspa?messageID=354640

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...


Re: Java 3D meets JavaFX !

by java3d-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

[b]To venacon[/b]

The thrown IllegalStateException "Canvas3D: Illegal operation in off-screen mode at javax.media.j3d.Canvas3D.stopRenderer(Canvas3D.java:1679)" is an indication that an installed Java 3D version less than 1.5.x is used on your system.

Please, run the applet 'Check for Java 3D installation: JNLP Text3D' on my web page http://www.interactivemesh.org/testspace/jnlpappletlauncher.html. It prints a lot of properties into the Java console.

Also check if Apple's out-dated Java 3D version 1.3 is installed in System/Library/Java/Extensions/ on your Mac and have a look at the following

Links concerning Java 3D installation on Macs:

Java 3D Forum
 - Newbie Mac owner:  http://forums.java.net/jive/thread.jspa?messageID=353167
 - Java3d and OS X: http://forums.java.net/jive/thread.jspa?messageID=334842 

Java 3D 1.5.2 Release Notes: https://j3d-core.dev.java.net/j3d1_5_2/RELEASE-NOTES.html
 - System Requirements Mac OS X
 - JOGL Rendering Pipeline

Java3DInstallation: http://wiki.java.net/bin/view/Javadesktop/Java3DInstallation
 - Installing Java3D for Mac OS X 10.4

Download Java 3D: https://java3d.dev.java.net/binary-builds.html
 - Zip binaries j3d-1_5_2-macosx.zip (includes 'Instructions for Unzipping the Java 3D 1.5.2 Release' in README-unzip.html)

Download JOGL: https://jogl.dev.java.net/servlets/ProjectDocumentList?folderID=11509&expandFolder=11509&folderID=11508
 - jogl-1.1.1a-macosx-universal.zip


[b]To all[/b]

 - Please, could someone who ran these JavaFX/Java3D samples successfully on a Mac post here how Java 3D is installed. Thanks.

 - Since my last post here I posted my "Thoughts about JavaFX 3D Rendering" in the sibling thread "JavaFX 3D powered by Java 3D" http://forums.sun.com/thread.jspa?threadID=5373702.

 - Latest news: Ken Russell (kbr), JOGL API project owner, is leaving Sun. See Chris Oliver's Weblog http://blogs.sun.com/chrisoliver/

August
[Message sent by forum member 'interactivemesh' (interactivemesh)]

http://forums.java.net/jive/thread.jspa?messageID=354876

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...


Re: Java 3D meets JavaFX !

by java3d-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

 [b]- Faster JavaFX 3D rendering[/b]

A different approach to synchronize Java 3D and JavaFX rendering can now be tested with the sample program [b]FXCharacterCube SB 4.0[/b]. A more serialized graphics device access of both pipelines reduces the time-consuming native 3D context switches. In addition, the two off-screen buffers can be replaced by a single one. This saves the time it takes to copy the buffer data.

Even if the public APIs of Java 3D and JavaFX provide only limited or no rendering callbacks the above mentioned approach results in a faster running rendering loop in comparison to the current FXCanvas3D API 2.0.


 [b]- Stereoscopic JavaFX 3D rendering[/b]

The Swing based stereoscopic API JCanvas3DAnaglyph was ported to JavaFX: [b]FXCanvas3DAnaglyph[/b]. The sample program [b]FXTuxInStereo[/b] allows to switch from stereoscopic to monoscopic viewing. When rendering is in monoscopic mode the prototype of the new single buffer FXCanvas3D API is used.


 [b]- Multiple simultaneous views [/b]

Sources, apidoc etc. of the multiple views API [b]FXCanvas3DMV[/b] and the corresponding sample [b]FXTuxInTheBox[/b] are now available for download.

This API is a derived work of the Java 3D utility class JCanvas3D and includes the Java classes FXCanvas3DMV and FXCanvas3DMVControl as well as the Java interface FXCanvas3DMVRepainter.

The following two objectives determine the current approach of the FXCanvas3DMV API:
 - Java 3D renders off-screen simultaneously into several lightweight components which are added via a resizable JavaFX SwingComponent to a JavaFX Scene.
 - The Java 3D rendering loop runs in parallel to the JavaFX painting loop with minimal synchronized overlap.

Each FXCanvas3DMV object provides two off-screen buffers to ensure that the threads of both loops can independently access the common image data. These two buffers consist of a BufferedImage which Java 3D is rendering into and a BufferedImage which JavaFX is drawing.

A FXCanvas3DMVControl object controls repainting and resizing of the FXCanvas3DMV objects with the help of a Lock with two Conditions. As soon as Java 3D has finished rendering into all attached and active FXCanvas3DMV objects for a single frame the FXCanvas3DMVControl object requests JavaFX to copy the image data and to repaint all corresponding SwingComponent objects in a single loop.

Only for the period of time it takes to copy the image data from one buffer into the other buffer the loops interrupt their regular tasks controlled by one of the two Lock's Conditions. The other Condition guarantees that during resizing of a FXCanvas3DMV panel the Java 3D renderer thread isn't blocked.

See http://www.interactivemesh.org/testspace/j3dmeetsjfx.html

August
[Message sent by forum member 'interactivemesh' (interactivemesh)]

http://forums.java.net/jive/thread.jspa?messageID=361189

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...


Re: Java 3D meets JavaFX !

by java3d-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

several updates have been made on the JavaFX 3D web page:  http://www.interactivemesh.org/testspace/j3dmeetsjfx.html 

Please, see the sibling thread in the JavaFX forum for more details: http://forums.sun.com/thread.jspa?threadID=5373702&tstart=0

August
[Message sent by forum member 'interactivemesh' (A.Lammersdorf@...)]

http://forums.java.net/jive/thread.jspa?messageID=371455

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...

< Prev | 1 - 2 | Next >