Skip to main content

background color

2 replies [Last post]
Anonymous

i am still reading the java 3d tutorial and this might seem like a stupid question but how can i change the background of my vertual universe from black to somethign alse posibaly white, i found somethign that could b used but it didnt work so i decided to ask

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Matthew Hilliard

Create a new Background node (you can call the constructor with a colour)
and add it to your scene.
Note that you can have multiple Backgrounds, and the one that is closest to
your viewer will be the active one.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

aces
Offline
Joined: 2003-07-17

Do not forget do set [b]setApplicationBounds(Bounds region)[/b] or your background will not be rendered.

as:
[code]
BoundingSphere bounds = new BoundingSphere(new Point3d(),1000d);
background.setApplicationBounds(bounds);
[/code]