Java3D viability questions...

Greetings,
I've been looking around for a Java library that would be useful for rendering and manipulating 3d scenegraph data and objects from within a larger application framework. LWJGL and JOGL both utilize low level access via OpenGL or DirectX mostly as a thin wrapper over the c code. I was hoping for something a little more high level and so... here I am.
I am wondering though... how much life is left in the Java3D project? I'm digging around and I find most of the information and resources scattered about on the 4 winds with nothing that looks like a concrete development project going on. I see where it's mentioned that Java3D has become a community project, but is there any active participation going forward on the development side? Is Java3D a dead project with folks just scavenging up the pieces and utilizing them as best they can?
I'm hoping that I can figure out how to usefully manipulate 3d artifacts from within a GUI built on Swing or SWT if I must, not from a single game window with limited GUI elements and I'm wondering if this package will get me there? So, would some kind forum members here take the trouble to enlighten me?
Thanks,
Mark

Hi,
the latest release is Java 3D 1.5.2 and it was published in 2008. It is most unlikely that the owner Oracle.Sun will restart its development or provide a maintenance release. Also, it is unlikely that someone else will continue the development of this concrete implementation.
Java 3D is a matured API. It is very well specified and nearly perfect described in its javadocs. Helpful books are available even if they don't cover the latest release. Since 1.4 the implemented OpenGL shading language (GLSL) allows to run vertex and fragment shader on the current release GLSL 4.1 and beyond. Java 3D's lightweight and heavyweight 3D rendering capabilities make it 'easy' to integrate and interact with 3D content in applications based on the GUI frameworks JavaFX 1.3.x, Pivot, Java Swing, Scala Swing, and SWT.
Compare Java 3D 1.5.2 to the currently available releases of following alternatives: Ardor3D, Aviatrix3D, jMonkeyEngine, and Xith3D.
I'm not aware of any detailed and impartial comparison. You will find blog or forum entries where the authors defend their preferred API and attack all the other ones.
Your requirements 'manipulate 3d artifacts from within a GUI' are a bit vague. So, it's up to you to compare capabilities and to find out which one you can trust more concerning long term development and maintenance. Also check their dependencies on third party/communitiy low level 3D APIs.
Here are some helpful Java 3D 1.5.2 links:
- home : https://java3d.dev.java.net/
- downloads : https://java3d.dev.java.net/binary-builds.html
- tutorial : http://java.sun.com/developer/onlineTraining/java3d/
- books : http://wiki.java.net/bin/view/Javadesktop/Java3DBooks
- J3DWorkbench : http://eclectic3d.net/
- SweetHome3D : http://www.sweethome3d.com/index.jsp
- GUI - Java 3D meets .. : http://www.interactivemesh.org/testspace.html
Knowledge, experiences, concepts and 3D data do not really get lost when you switch to another high level 3D Java API at a later date.
I decided to stay with Java 3D and to provide up-to-date GUI integration and importer (X3D; in work: 3DS, COLLADA, OBJ) APIs. At the same time I'm continuing my own Java 3D fork/successor JUniversal3D.
August, InteractiveMesh

Similar Messages

  • General Java3D Art question

    Hello everyone, was hoping that someone could point me in the direction of any documentation that might exist for guidelines on building 3d models and graphics for Java3D. Ideally, it would include information about what features are supported, and how settings, on shaders or lighting for example, translate to java3d.
    If something like this doesn't exist, I'd consider making one, so any art related documentation that anyone could point me in the direction of, would also be helpful.
    Thanks in advance for any assistance... Also, I'm new to the forums, so if anyone has a suggestion on a forum this topic might be more relevant to, feel free to offer it. Thanks again.
    - 3DCaveman
    "I'm just a caveman, I don't understand your modern, high tech world" - Unfrozen Caveman Lawyer

    Sorry, I think I probably didn't clearly explain what I'm looking for, I'm already a fluent user of 3d studio MAX, with numerous years of professional experience in realtime engines...
    What I'm looking for is what features out of max are supported, and what features translate over to Java3d... For example, the specular settings of a shader on a model carries over it's color from MAX, which is something that I'm not accustomed to in the other engines I've used, so wondering if there is any documentation on this topic, are multi sub object materials supported? is userdata? keyframe animation,? mesh-deformation? bones animation and character studio? Which map channels are exported? can it do reflections? refractions? etc etc... Just wondering if any documentation on this topic exists, either official, or made by users, it's definitely helpful to have as reference when working with any engine.
    Any ideas if something like this is out there somewhere or not?

  • Viability question

    Hello,
    I have just been told to deploy a system which involves image and audio streaming and some other things. I've heard about JMF, but I'd like to ask for your expert oppinion. Here's a brief description of the system:
    There's a central computer and 2 identical hosts. Each host has got a camera, microphone, speakers, a push button which is used to "ring" the central computer, and a small circuit which opens a door. As you can imagine this system will be used to guard remotely two doors.
    The central computer must show the content of the webcams, and be able both to hear and to speak to the hosts.
    a) JMF has support for video and audio streaming? Does it work with GNU/Linux? Which classes are involved? (last question is a "where to begin from" one)
    b) In order to implement the "call" button and the door opening system I'm thinking about using serial or USB ports. How can I access them with Java? Can I use low enough level methods to activate the lines?
    Thank you very much for your attention
    P.D.: is there any similar system already implemented (and avalaiable)?

    Originally Posted by ataubman
    For some values of "heavily used", yes I'd say it should work for you OK. The main problem being, if you do discover any problems there are unlikely to be any new patches for NW.
    For CIFS on NetWare I'd go further and replace "are unlikely to" with "will not". Okay there might be the odd FTF but I'd say you've got to be pretty special to now get an issue fixed.
    With the release of Windows Vista in 2006 Microsoft introduced SMB2 (SMB 2.0) with SMB 2.1 introduced with Windows 7 & Windows Server 2008 R2 and SMB 2.2 coming with Windows 8. CIFS on neither NetWare or OES (Linux) can do SMB2 so SMB1 is used instead. See Server Message Block - Wikipedia, the free encyclopedia
    CIFS on NetWare is (understandably) behind the curve but CIFS in OES requires enhancements plus Samba needs updating (OES11 has Samba 3.4).
    @Lawrence, the issue with using CIFS is not usually "Large userbase and very heavy volume use" but one of the number of CIFS connections to be supported.
    In answer to your question, if this is a "new" install then skip NetWare and go with OES. If DSfW I'd be inclined to go with OES11 but for just CIFS (not Samba) either OES2 SP3 (fully patched) or OES11 will work.
    HTH.

  • Java3D Simple Question

    Hello,
    The default view coordinates of SimpleUniverse is from -1 to 1 for all coordinates. But I want to change it to something like;
    X coordinate => min -10 max 10
    Y coordinate => min -10 max 10
    Z coordinate => min 0 max 20
    Please help me,
    Thanks

    Note: This thread was originally posted in the [New To Java|http://forums.sun.com/forum.jspa?forumID=54] forum, but moved to this forum for closer topic alignment.

  • Short question in Java3D!

    Hello,
    I learn completely newly Java and Java3D programming, because of this I have questions on it.
    My current question is an automatic scaling.
    I have partly solved it but it has not quite worked!
    At first I explain the whole task to you briefly so that you can understand this small question.
    The task is around calls of an editor side (.txt) in Java3D.
    This list contains numbers of 3 components points (x, y, z).
    e.g.: (1, 2, 3)
    (2, 4, 6)     
    (3, 5, 7)     
    etc.
    After calling the editor side these points shall be recorded as little balls (with minute radii).
    I have completely taken care of it!
    But the remained problem is:
    Some Editor pages contain 3 components numbers, these sew from each other so are.
    e.g.: (0.01, 0.02, 0.03)
    (0.011, 0.021, 0.031)
    (0.0111, 0.0211, 0.0311)
    etc.
    Only one roll because of this see the balls in the graphic on each other as. i.e:
    We see only one ball.
    I need an automatic scaling for it so that the programme supplies us with the correct drawing to every list
    I must calculate min and Max at this automatic scaling first.
    I have found that the right solution starts me with the following orders:
    Code:
    float minDistance = Float.MAX_VALUE;
    for (int i=0; i<positionen.size(); i++)
    for (int j=i+1; j<positionen.size(); j++)
    Point3f p0 = positionen.get(i);
    Point3f p1 = positionen.get(j);
    minDistance = Math.min(minDistance, p0.distance(p1));
    float faktor = minDistance / (2 * r);
    But I still lack it the correct drawing a small step further, with that me
    get can. Perhaps you have idea as I can make it further?
    The whole program is in the appendix (Hello.zip) on the following internet page. (Hello.java)
    http://rapidshare.com/files/28536450/Hello.java.html
    I have uploaded only the Java page of ball production here.
    I have not uploaded the other Java page of calls of the Editorseite.
    I think we do not need it for this problem.
    But, if it is necessary, I can upload it later.
    Please, somebody can help me at it?
    And as I have already written I am a whole beginner in programming, primarily in Java3D.
    Because we learn very little programming in my course of study "electrical engineering".
    But I learn it as a voluntary traineeship.
    I am immediately available for further explanations.
    I am address within reach also under the following e-mail:
    [email protected]
    Yours
    Angelo

    My Dear Friend, you posted your question in wrong forum,
    Please Post your question here.
    forums.java.net/jive/forum.jspa?forumID=70
    you will find many very good devlopers who can help you...

  • A short and fundamental question: Java3D in headless mode

    To begin I would like to introduce myself as a complete Java3D newbie.
    What I would like to accomplish is to produce an application which, in headless mode, will read in data and generate 3d images as files, without ever making any GUI components to appear on the screen.
    Is this possible?
    Thanks!

    When you say "unix doesn't have Arial" you obviously aren't using Solaris where Arial most certainly
    ships and is in fact the main font used to support dialog & sanserif.
    There are numerous APIs to calculate the width of a string in pixels, depending on whether
    you want the integer metrics, fp metrics , logical bounds, pixel bounds (which guarantees to enclose
    every pixel if you correctly specify the graphics/FRC)
    Every single one of these works in headless mode.
    Even the most simple-minded FontMetrics.stringWidth(String) call should be good enough
    for your requirements.
    The error you show looks like you have a misconfigured environment.. It can't find
    the correct implementation class of GraphicsEnvironment which is nothing to do with
    fonts. Moreover this DOES work for me :
    import java.awt.*;
    public class Arial {
    public static void main(String args[]) {
    Font arial = new Font("Arial", Font.PLAIN, 10);
    System.out.println(arial);
    % java -version
    java version "1.4.2_01"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
    Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)
    % java -Djava.awt.headless=true Arial
    java.awt.Font[family=Arial,name=Arial,style=plain,size=10]
    QED.
    -Phil.

  • Urgent question..how to display 2D image/text on Canvas(Java3D)?

    I am developing a first-person action game and want to add a box which show the value(eg,what weapon you are carrying,any value) on the canvas like CS,but I dont know how to set it up.I want to know how to create it?

    Hey,
    I'm new to java3d, but I'm pretty sure that you can draw 2D strings/images on top of a Canvas3D. Just make a custom Canvas3D class, then in that class implement postRender(), and in there you can do all your 2D displaying.
    For example, this is what I did to display some information and graphics above the Canvas3D in my program:
    public class CustomCanvas3D extends Canvas3D
    public CustomCanvas3D(GraphicsConfiguration gcIn)
    super(gcIn);
    public void postRender()
    J3DGraphics2D g = getGraphics2D();
    Image crosshair = this.getToolkit().createImage("crosshair.png");
    MediaTracker mt = new MediaTracker(this);
    mt.addImage(crosshair, 0);
    try
    mt.waitForAll();
    catch (InterruptedException e)
    e.printStackTrace(System.out);
    g.drawImage(crosshair, 200, 200, this);
    g.setColor(Color.orange);
    g.drawString(player.getVitalInformation(), 100, 100);
    g.flush(true);
    Hope that helped,
    James Attenborough

  • Flocking3D (Java3d) Question

    Hi Guys,
    I am trying to get a program running from the "Killer Game Programming" O'reilly book.
    The code I am try to run is the Chapter 22 code "Flocking3d"
    When I perform a javac *.java on the folder containing the files from the book I get 100 errors.
    I have everything installed including Java3D.
    I can post some of the errors if it helps.
    Many thanks.
                       ^
    CheckerFloor.java:11: package javax.media.j3d does not exist
    import javax.media.j3d.*;
    ^
    CheckerFloor.java:12: package com.sun.j3d.utils.geometry does not exist
    import com.sun.j3d.utils.geometry.Text2D;
                                     ^
    CheckerFloor.java:13: package javax.vecmath does not exist
    import javax.vecmath.*;
    ^
    CheckerFloor.java:22: cannot find symbol
    symbol  : class Color3f
    location: class CheckerFloor
      private final static Color3f blue = new Color3f(0.0f, 0.1f, 0.4f);
                           ^
                           ^
    PreyBoid.java:16: package javax.media.j3d does not exist
    import javax.media.j3d.*;
    ^
    PreyBoid.java:17: package javax.vecmath does not exist
    import javax.vecmath.*;
    ^
    PreyBoid.java:22: cannot find symbol
    symbol  : class Color3f
    location: class PreyBoid
      private final static Color3f orange = new Color3f(1.0f,0.75f,0.0f);
                           ^
    WrapFlocking3D.java:17: package com.sun.j3d.utils.universe does not exist
    import com.sun.j3d.utils.universe.*;
    ^
    WrapFlocking3D.java:18: package com.sun.j3d.utils.geometry does not exist
    import com.sun.j3d.utils.geometry.*;
    ^
    WrapFlocking3D.java:19: package javax.media.j3d does not exist
    import javax.media.j3d.*;
    ^
    WrapFlocking3D.java:20: package javax.vecmath does not exist
    import javax.vecmath.*;
    ^
    WrapFlocking3D.java:21: package com.sun.j3d.utils.behaviors.vp does not exist
    import com.sun.j3d.utils.behaviors.vp.*;
    ^
    WrapFlocking3D.java:31: cannot find symbol
    symbol  : class Point3d
    location: class WrapFlocking3D
      private static final Point3d USERPOSN = new Point3d(0,5,20);
                           ^
    WrapFlocking3D.java:36: cannot find symbol
    symbol  : class SimpleUniverse
    location: class WrapFlocking3D
      private SimpleUniverse su;
              ^
    WrapFlocking3D.java:37: cannot find symbol
    symbol  : class BranchGroup
    location: class WrapFlocking3D
      private BranchGroup sceneBG;
              ^
    WrapFlocking3D.java:38: cannot find symbol
    symbol  : class BoundingSphere
    location: class WrapFlocking3D
      private BoundingSphere bounds;   // for environment nodes
              ^
    WrapFlocking3D.java:116: cannot find symbol
    symbol  : class Canvas3D
    location: class WrapFlocking3D
      private void orbitControls(Canvas3D c)
                                 ^
    Boid.java:51: cannot find symbol
    symbol  : class Point3f
    location: class Boid
          new Point3f( -(float)FLOOR_LEN/2.0f, 0.05f, -(float)FLOOR_LEN/2.0f);
              ^
    Boid.java:53: cannot find symbol
    symbol  : class Point3f
    location: class Boid
          new Point3f( (float)FLOOR_LEN/2.0f, 8.0f, (float)FLOOR_LEN/2.0f);
              ^
    Boid.java:69: cannot find symbol
    symbol  : class Vector3f
    location: class Boid
      protected Vector3f boidPos = new Vector3f();
                                       ^
    Boid.java:70: cannot find symbol
    symbol  : class Vector3f
    location: class Boid
      protected Vector3f boidVel = new Vector3f();
                                       ^
    Boid.java:72: cannot find symbol
    symbol  : class TransformGroup
    location: class Boid
      private TransformGroup boidTG = new TransformGroup();
                                          ^
    100 errors

    My folder where my .java files for the flocking3d program is:
    C:\Flocking3D
    And my Java3D folder is:
    C:\Program Files\Java\Java3D\1.5.2
    this folder has the following sub folders:
    bin
    lib
    What would I need to type to tell my compiler where to find the java3D classes?
    Regards

  • Simple question of java3d

    Dear all,
    I am trying to make a sphere and cube on the same graph. I try to modify the code from http://www.vrupl.evl.uic.edu/LabAccidents/java3d if you run the following code, you can see only a cube. However, if you change the size of sphere from 0.1f to 0.7f, then you will only see a blackscreen. Could anyone please tell me what wrong of the code. The problem should be under createSceneGraph function.
    Thanks
    package java3d01;
    // First we import packages that I use for Java3D
    import java.awt.Frame;
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import com.sun.j3d.utils.applet.MainFrame;
    import com.sun.j3d.utils.geometry.*;
    import com.sun.j3d.utils.universe.*;
    import javax.media.j3d.*;
    import javax.vecmath.*;
    public class Tools extends Applet { // notice'lesson01', which is also the name of the file : lesson01.java
        SimpleUniverse simpleU; // this is the SimpleUniverse Class that is used for Java3D
         public Tools (){  // this constructor is sometimes needed, even when empty as in here   
         public void init() {
         // this function will be called by both applications and applets
         //this is usually the first function to write       
         setLayout(new BorderLayout()); // standard Java code for BorderLayout
         // Canvas3D is where all the action will be taking place, don't worry, after adding it
         // to your layout, you don't have to touch it.         
            Canvas3D c = new Canvas3D(SimpleUniverse.getPreferredConfiguration());
         // add Canvas3D to center of BorderLayout
             add("Center", c);   
         simpleU= new SimpleUniverse(c); // setup the SimpleUniverse, attach the Canvas3D
         //This is very important, the SceneGraph (where all the action takes place) is created
         //by calling a function which here is called 'createSceneGraph'.
         //The function is not necessary, you can put all your code here, but it is a
         //standard in Java3D to create your SceneGraph contents in the function 'createSceneGraph'
             BranchGroup scene = createSceneGraph();
         //set the ViewingPlatform (where the User is) to nominal, more on this in the next lesson
            simpleU.getViewingPlatform().setNominalViewingTransform();
         // this will optimize your SceneGraph, not necessary, but it will allow your program to run faster.
            scene.compile();
            simpleU.addBranchGraph(scene); //add your SceneGraph to the SimpleUniverse  
        public BranchGroup createSceneGraph() {     
         //Here we will create a basic SceneGraph with a ColorCube object
            BranchGroup objRoot = new BranchGroup();
         TransformGroup cctg = new TransformGroup();      // a TransformGroup for the ColorCube called cctg
         ColorCube c = new ColorCube(0.1f);     // create a ColorCube object
             cctg.addChild(c);                // add ColorCube to cctg
         Sphere sphere = new Sphere(0.1f);
         cctg.addChild(sphere);
            Transform3D cc3d = new Transform3D(); // a Transform3D allows a TransformGroup to move
         cc3d.setTranslation(new Vector3f (0.5f ,0.2f ,0.0f )); // set translation to x=0.8, y=1.0, z= -2.0
         cctg.setTransform(cc3d); //
            objRoot.addChild(cctg);
         return objRoot;
        public void destroy() {     // this function will allow Java3D to clean up upon quiting
         simpleU.removeAllLocales();   
        public static void main(String[] args) {
         // if called as an application, a 500x500 window will be opened   
            Frame frame = new MainFrame(new Tools(), 1000, 1000);   
    }

    Don't use char and switch in this case.
    String answer = JOptionPane.showInputDialog("A/B?");
    if (answer.equalsIgnoreCase("A")) {
    } else if (answer.equalsIgnoreCase("B")) {
    } else {
    }

  • Java3D + Newer Eclipse Version - Access Restriction (solution + question)

    Current eclipse versions don't go well with java3d. Programs that worked fine before now produce 100s of strange errors, e.g.
       <tt>"Access restriction: The type SimpleUniverse is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\ext\j3dutils.jar"</tt>
    Java3D is installed correctly and everything was (and is) working perfectly well with older eclipse versions. I googled for a solution and found out that changing
       <i>Windows -> Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and restricted API -> Forbidden reference (access rules)</i>
    to <i>"warning / ignore"</i> eliminated the error(s).
    Can anyone explain me what is going on here? Why is Java3D "Deprecated and restricted"? Is the default setting of eclipse correct or oversuspicious? Did I miss anything else? Will the next java3d / eclipse version be fix this? Do I have to fix this?
    Many thanks in advance!
    Ingo

    Hi,
    my Eclipse Helios SDK 3.6.1 installation also shows this behavior, even if all classes of all three Java 3D-jars are declared as accessible in their access rules! See:
    Project -> Properties -> Java Build Path -> Libraries JRE System Library [JavaSE-1.6] -j3dcore.jar, -j3dutils.jar, -vecmath.jar
    I have no idea what is going on here. Following work arounds do the job well without accepting 'forbidden references':
    A. Per project add the three Java 3D-jars to the Libraries and place them on the top:
    Project -> Properties -> Java Build Path -> Libraries AddExternal JARs.. ..\jre6\lib\ext\j3dcore.jar, j3dutils.jar, vecmath.jar
    Project -> Properties -> Java Build Path -> Order and Export Top j3dcore.jar j3dutils.jar vecmath.jar
    B. An alternative is to create and add a 'User Library' in this way:
    Windows -> Preferences -> Java -> Build Path -> User Libraries 1. New: J3DAll, 2. Add JARs.. select all three at ..\jre6\lib\ext\j3dcore.jar, j3dutils.jar, vecmath.jar
    Project -> Properties -> Java Build Path -> Libraries Add Library .. -> User Library -> Next select J3DAll Finish
    Project -> Properties -> Java Build Path -> Order and Export Top J3DAll
    Does this help? August

  • Thank you DGOOD76 !!  - another question - viability of attachment in form

    Thank you DGOOD76 for all your help.
    You have now triggered more questions.........
    We want to attach in Oracle applications an csv file to a template form and then
    use the attachment to populate a standard Oracle file.....
    Will this work............

    http://www.oracle.com/technology/sample_code/products/forms/extracted/hyperlink/fileupload.html
    PS: Never tried it personally though..

  • Newbie question about the viability of web services.

    Hello All,
    I have never dealt with web services, and have only cursory knowledge of the technology, so forgive my ignorance in advance.
    I have a situation that I wonder if Web Services might help me solve.
    I have built a Java/JSP application that resides on a server that is inside our firewall. It has been successful, and management wants to make the data and functionality available to our customers outside the firewall.
    The problem is that our organization tightly controls the "public" applications. And the UI for my system does not meet their standards. Nor will they punch a hole in the firewall to allow access to my server.
    The solution we have been working on is to create a new UI using their approved methods, and copy the needed java classes to the "public" server.
    As you can see, if I do this, I will have to maintain two instances of the same class on two different servers.
    Can I avoid this by using web services to make those classes available to other applications from my internal server?
    Thanks in advance for your help.
    James.

    The solution we have been working on is to create a
    new UI using their approved methods, and copy the
    needed java classes to the "public" server.
    As you can see, if I do this, I will have to maintain
    two instances of the same class on two different
    servers. Okay, first, yes - webservices can help you if you MUST maintain two seperate UI's for some reason using the same backend data code or if you want to provide a datafeed only to your external users. It will take care of having to maintain seperate but identical class files, but it will create other overhead such as interfacing the existing files and the like, but if you must enable the UI then you will have two versions of this to maintain. If you are looking to just enable the data feeds and not the UI then it would seem a very logical fit.
    If you must maintain the UI, then why can't you convert your app over to the approved UI and host it on the "public" server for all users (internal and external)? Then you only have one set of data to maintain - period and webservices aren't necessary. If you proceed with either your current implementation or even with a webservices based implementation, you will have at least two seperate UI's to maintain as well as whatever the resulting support code - be it webservice interfaces to existing code or replicates of existing code - to also maintain.

  • Java3d speed collapse caused by other java apps running at the same time

    Hi
    I am programming a flightsimulator for some months.
    The current state is online available (all free, no copyrights)
    at http://www.snowraver.org/efcn/efcnsim/index.htm
    especially the sample (source) which shows the
    behaviour which is the reason for my post is here
    http://www.snowraver.org/efcn/efcnsim/page2.htm
    My Problem:
    When I start the sim while two other java programs
    ( one is a server running localhost, one is a client )
    are running, the speed of the flightsim is very slow,
    one frame update takes 3 to 5 seconds.
    ( 3 java.exe's in task list plus 1 which is the IDE )
    When I start the flightsim ALONE, I have 30 to 40 frames per second.
    ( 2 java.exe's in the task list = the flightsim and the IDE -> no prob here )
    That means, the flightsim is about 100 times slower, when
    started while the other two apps are running.
    BUT the other two applications do almost ***NOTHING***, the
    CPU load is 1 or 2 percent.
    Of course they have threads running, but all are waiting
    for a signal - no thread really consumes CPU power.
    Interestingly, when I FIRST start the flightsim and AFTER THIS
    start the two other applications, the flightsim
    holds 30 frames per seconds without problems, even
    though the other applications consume some CPU power
    until they have completely started up.
    Configurations:
    JSDK 1.4.2_1 , 0_2..
    Java3D 1.3.1 OPENGL (The DirectX version crashes with D3D device lost)
    Win2000,XP CPU 800MHz upto 3 GHz
    In my point of view, the java3d thread scheduler makes
    some funny decisions when it starts up, which lead
    to the order dependent behaviour described above.
    My question is, if anyone has some ideas, how I could
    get away from this speed collapse.
    The problem is caused in native code I guess.
    I also could imagine, that it has to do something with
    the order in which one creates, attaches and starts
    the Canvas3D. (? could produce race conditions)
    The flightsim runs in full retained mode. Of course
    the CPU work in the behaviours is rather big, because
    the ROAM triangulation update (..) is done there
    and the triangles are recalculated and passed
    ( all BY_REFERENCE ).
    Or could it have to do something with the memory
    consumption ( when all runs, almost all of
    the 512MB RAM is taken by the three java.exe's ) ?
    Any hints or ideas ?

    :) No, Sun does handle it [lol]
    I just have tested it on my computer at work
    ( 3GHz HP compaq, 1GB Ram and a Intel 82865G Graphics
    Card with 64MB memory, Windows XP )
    and it has worked without problems any way I tried.
    ( Except for xclusive fullscreen mode, but I guess, the administrators
    have deactivated it somehow, so we don't play games at work :)
    I couldn't test it under Linux so far, but I think, this will be less
    problematic than Windows [usually].
    However my current assumption is:
    I totally have forgot the [limited] videocard memory.
    I suppose, Java3D tries to put all triangle data and all
    textures to the videocards memory, so most data processing
    then can be passed to it's graphiccard CPU using
    OpenGL commands.
    Now the flightsim produces a varying amount of (by_reference) triangle data ( a few thousands )
    and has some texture maps for the terrain, the sea and other things,
    plus indexed triangle data for the planes and ships.
    The notebook system, which slows down has an ATI Mobile Radeon card
    with only 32MB RAM onboard, whereas the others have 64MB Ram.
    An additional pointer to that theory is that I can trigger the slowdown by resizing
    the flightsim window, while it is running.
    On the notebook, it holds 30fps, until the window exceeds a size of 962*862 pixels.
    At this size the speed collapses and goes down to 1 frame update every 4 seconds.
    If I make the window a few pixels smaller, the speed of 30fps immediately
    is there again.
    Therefore I guess, some data passed to the graphic cards memory depends
    linearly from the canvas3d's window dimension, and at some limit,
    the graphiccard's memory is too small and Java3D changes it's strategy
    and performs most calculations on the computer's mainmemory,
    which of course is a lot slower.
    I'm not very sure about that, I'm just speculating.
    Next thing I will try is to disable directdraw for the other two applications,
    possibly swing also uses graphicscard memory, when directdraw is enabled.
    The solution seems to be clear anyway: The flightsim must examine the system
    and set some parameters depending on the machine's capabilities.
    Onboard videagraphic ram is one of them. If it's too slow, I start to decrease
    the window size and expect to see a sudden increase of speed, as soon as
    the rendering can be done by the graphicscard CPU. If this never happens,
    I assume no OpenGL accelerator is present on that system. This can be seen as a method
    for finding out the amount of videocard memory on a system by trial and error ..?:)
    Thanks for your tips, Alain.
    I especially have to check out the data sharing class in 1.5.

  • JAVA3D versions and runtime errors

    hi, everybody:
    I just begin to program in java3d today and met some problems.Now I share you with my solution(s) and wish every author can end his question with the final solution in the forum.
    OS: Windows XP
    J2SDK: 1.4.1_02,1.4.2._01
    DirectX: 9.0 update
    Java3D: 1.3.1
    Error: Fail to Create Vertex Buffer---D3DERR_INVALIDCALL
    Solution: uninstall java3D1.3.1, install java3D1.2.1_04
    wellcome to add more information to this topic.

    A better solution might be to switch to the OpenGL version
    of Java 3D.
    -Paul

  • JAVA3D rotation problem

    I'm using JAVA3D that creates a map. The map is split into 4 parts. I forced each part to rotate only around the X-axis and this is done with the user clicking on it with the mouse. I want to limit the rotation where the user can rotate up to 90 degrees only downwards, and want to eliminate the option of rotation upwards. Is that possible.
    Another question is that when the user rotates one of the parts, the part comes out towards the user. Is it possible i can stop that and make it rotate on itself?
    Thanks in advance

    well my dear friend sorry to disappoint you but i did understand and that's the way rotX/Y/Z work within the Transform3D.
    the behavior you desire by the rotation is based on a cylindric coordinate system in which the point of view will move on the cylinder while the upVector of the lookAt method stay at the Y axis(Y axis is "up" in Java3D).
    since the Transform3d is based on spherical coordinate system you can't use it.
    the only way i know is to write an object as the Transform3d but much simpler, well lets see:
    class Transform extends Transform3D {
       Point3d position=new Point3d();
       Point3d lookingAt=new Point3d(1,0,0); // looking at the x axis
       Vector3d upVector=new Vector3d(0,1,0); // y is up
       double totalAngleXZ=0; // its a must to add the angle and to calculate it from the top since it creates a bug later on
       double totalAngleY=0; // its a must to add the angle and to calculate it from the top since it creates a bug later on
       public void rotXZ(double angle) {
          totalAngleXZ+= angle;
          lookAt();
       public void rotY(double angle) {
          totalAngleY+= angle;
          lookAt();
       private void lookAt() {
            lookingAt.set(Math.cos(totalAngleXZ),Math.cos(totalAngleY),Math.sin(totalAngleXZ));
            lookAt(position,lookingAt,upVector);
    }now if i'm not mistaken this should work...
    best of luck.

Maybe you are looking for