I use X3Dloader to import x3d scene to construct Java3D scene graph from x3dv file~
And this x3d scene has Background node, which to pasted full image around the 3D world.
But I can’t see any background in Java3D world, when I use X3DLoader to import that X3D scene.
And then I use the browser(in Java3D render) bundled with Xj3D API, to view the X3D file…I can see the background.
I think the X3DLoader is already load the background node into java3D scene, but the background node’s shape is black(shade color), and no image pasted on these shape.
So how to use X3DLoader to load X3D scene’s background correctly??Does everyone familiar with Xj3D API can help me.
thanks~
My JDK is 1.5, My Java3D API is 1.3.1, Xj3D API is M10
x3dv code:
Background {
backUrl [ “ocean_3_back.jpg” ]
bottomUrl [ “ocean_3_bottom.jpg” ]
frontUrl [ “ocean_3_front.jpg” ]
groundAngle [ 0.1, 1.309, 1.571 ]
groundColor [ 0 0 0, 0 0.1 0.3, 0 0.2 0.5, 0 0.3 0.8 ]
leftUrl [ “ocean_3_left.jpg” ]
rightUrl [ “ocean_3_right.jpg” ]
skyAngle [ 0.1, 0.15, 1.309, 1.571 ]
skyColor [ 0.4 0.4 0.1, 0.4 0.4 0.1, 0 0.1 0.3, 0 0.2 0.6, 0.8 0.8 0.8 ]
topUrl [ “ocean_3_top.jpg” ]
}
Java code
BranchGroup worldRoot = new BranchGroup();
int flag = X3DLoader.LOAD_ALL;
X3DLoader loader = new X3DLoader(flag);
Scene scene = null;