Nice Black Screen

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
[222 byte] By [mlka] at [2007-9-19]
# 1

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

slyfoxvia at 2007-7-8 > top of java,Security,Cryptography...
# 2

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

>

Abusea at 2007-7-8 > top of java,Security,Cryptography...
# 3

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.

dmbdmba at 2007-7-8 > top of java,Security,Cryptography...
# 4
sorry should of added, I'm testing it with the sample apps shipped with Java3D.I've tried most of the demos, in both applet and application mode.ThanksMike
mlka at 2007-7-8 > top of java,Security,Cryptography...
# 5
turns out i was inside my own object.Still would be nice if there was a debug mode that told you that.(Didn't render object because facing back - sides.
dmbdmba at 2007-7-8 > top of java,Security,Cryptography...
# 6
'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,
Abusea at 2007-7-8 > top of java,Security,Cryptography...
# 7

> '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.

dmbdmba at 2007-7-8 > top of java,Security,Cryptography...
# 8
I have the same problem, but not much help here. None has answered the question. Instead they delve into their own topics. Still after more than a year, the initial question remains unanswered. Conclusion: This forum suck like a stinky swamp in the inner jungle - stick to .NET!
thomasww@yahoo.coma at 2007-7-8 > top of java,Security,Cryptography...
# 9
> Conclusion: This forum suck like a stinky swamp in the inner jungle -> stick to .NET!Why are you making a straight comparison between the Java3d API and .NET?
DrQuincya at 2007-7-8 > top of java,Security,Cryptography...
# 10

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.

_Breakfast_a at 2007-7-8 > top of java,Security,Cryptography...