you have to create a BranchGroup, add a TransformGroup to the Group ,and add Node to the TransformGroup. if the black background is not acceptable you can add a different color background to the TransformGroup.
> Hi, I've justed tried Java3D 1.3beta2 [
> java3d-1_3-beta2-windows-i586-directx-sdk.exe ], I
> have the latest JDK [1.4.0] and dX drivers [8.1], but
> all I get is a nice black screen, any ideas?
>
> Thanks
> Mike
hehe - i was gonna suggest the Background thing, but then thought, nahhhh 2 ez :)
rob,
> you have to create a BranchGroup, add a TransformGroup
> to the Group ,and add Node to the TransformGroup. if
> the black background is not acceptable you can add a
> different color background to the TransformGroup.
>
> > Hi, I've justed tried Java3D 1.3beta2 [
> > java3d-1_3-beta2-windows-i586-directx-sdk.exe ], I
> > have the latest JDK [1.4.0] and dX drivers [8.1],
> but
> > all I get is a nice black screen, any ideas?
> >
> > Thanks
> > Mike
>
I must say black is awfully discouraging. Are there any debug settings one can imploy that perhaps outputs what Java3D is doing as it draws that black screen.
For instance I do, (among other things) to create MY beautiful black screen
GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
m_Canvas = new Canvas3D( config );
m_Universe = new SimpleUniverse( m_Canvas );
m_Scene = new BranchGroup();
m_Scene.removeAllChildren();
BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 1000.0);
m_Scene.addChild(new BoundingLeaf(bounds));
Shape3D obj = new Shape3D();
double[][] coordinates =
{
{ -10.0, 10.0, 10.0 },
{ -10.0,0.0, 10.0 },
{ 10.0,0.0, 10.0 },
{ 10.0, 10.0, 10.0 },
{ 10.0, 10.0, 10.0 },
{ 10.0,0.0, 10.0 },
{ 10.0,0.0, -10.0 },
{ 10.0, 10.0, -10.0 },
{ 10.0, 10.0, -10.0 },
{ 10.0,0.0, -10.0 },
{ -10.0,0.0, -10.0 },
{ -10.0, 10.0, -10.0 },
{ -10.0, 10.0, -10.0 },
{ -10.0,0.0, -10.0 },
{ -10.0,0.0, 10.0 },
{ -10.0, 10.0, 10.0 },
{ -10.0,0.0, 10.0 },
{ -10.0,0.0, -10.0 },
{ 10.0,0.0, -10.0 },
{ 10.0,0.0, 10.0 }
};
QuadArray qa = new QuadArray( 4, QuadArray.COORDINATES );
for (int i = 0; i < coordinates.length; i++)
qa.setCoordinate( i, coordinates );
Appearance app = new Appearance();
app.setColoringAttributes( new ColoringAttributes( 1.0f, 0.0f,
0.0f,ColoringAttributes.NICEST ));
obj.setGeometry( qa );
obj.setAppearance( app );
m_Scene.addChild(obj);
m_Scene.compile();
m_Universe.getViewingPlatform().setNominalViewingTransform();
m_Universe.addBranchGraph(m_Scene);
Would be nice if we could see something like
<Rendering Scene>
<Found Bounding Sphere>
<Found Object>
<Object culled because it's Out of view>
or something like that.
> 'a debug mode that told you that'
>
> told you what?
> j3d is a 3d api, not a primary school teacher - how
> exactly do you expect it to *tell* you, that your
> inside an object?
>
> rob,
VERY EASILY
Obviously, Java3d has a tree of objects that it _may_ render. In this imaginary debug mode, as it walked this tree it would spit out to System.out what object it was trying to render, what it's real 'post-transformation' bounds where, if it was rendered, and if it wasn't why. Answers could be out of the frustrum. Or, backside elimination, or even, no color specified (no normals or no lights or...), and perhaps other pertinent information.
In the case of inside the object, if it were to tell me that an object wasn't rendered because of backside elimination, and I only have one closed object, I probably could deduce that either (1) I was inside the object, or (2) I specified my coordinates in clockwise fashion. Either way it would be very helpful.
Perhaps they are talking about the .net direct3d runtime and the j3d api. In which case, I can say that having used both, at least Java3d didn't break half the games I own just by being installed...
What? Yes, I am aware that the post is a halfwit troll, I just like to take every opportunity I can to express my annoyance at that d3d thing.