Why is the viewing port

a bit different in Xith3D than what it feels like in Java3D?
I mean in one of my port, I set the primary TransformGroup 850 into the canvas3D whereas I had to get it 350 unit closer, 500, in Xith3D to achieve a better resemblance.
Java3D t3D.setTranslation(new Vector3f(0,0,-850));
Xith3D t3D.setTranslation(new Vector3f(0,0,-500));

Are you setting the field of view the same in both instances? We use the standard mesa perspective calculation, so I would not expect differences.

Could you please post some code as in:


    locale.addBranchGraph(branchGroup());
    virtualUniverse.addLocale(locale);
    virtualUniverse.addView(view);

    canvasPeer   = renderPeer.makeCanvas(canvasParent,canvasWidth,canvasHeight,32,false);
    canvasPeer.getComponent().addKeyListener(this);

    canvas.set3DPeer(canvasPeer);
    canvas.requestFocus();
    view.addCanvas3D(canvas);


        view.setFieldOfView((float) Math.toRadians(28));

I don’t know what the default field of view is for Java3D, but you can use this same method in both to make sure it is the same.

I figured out Java3D’s field of view after many attempts; 22.5.
Therefore to have Java3D’s default view in Xith3D, one must include the following line:


view.setFieldOfView((float) Math.toRadians(22.5)); 

Java3D

http://www.realityflux.com/abba/Java3DViewField.jpg

Xith3D

http://www.realityflux.com/abba/Xith3DViewField.jpg

PS: Both demos are running the same amount of particles, notice the difference in the frame rate :wink:
PS2: the only difference in code is how to load a texture and set up a canvas3D :wink: x 2