Thanks for your reply Daniel. Nope can't keep away. This project has at
least another year of development, so I will be bugging all of you for a
time yet :).
Your example is similar to example they have in the demo, but my geometry is
much more complex. I find the sphere to be bad for my purposes because of
the pinching. My tessalated dome is a bit different in construction. I
also have 2 domes one inside the other, for separate rendering of clouds
from sky/sun/stars. That way I can move and transform the clouds, separate
from the sky colors, etc. The clouds are alpha blended so the sky shows
through.
I just don't see what the difference is unless Java3d only supports a unit
sphere as background geometry. Does anyone know if yu can put arbitrary
geometry in the background?
Dave Yazel
----- Original Message -----
From: Daniel Selman <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, December 23, 2000 12:41 PM
Subject: Re: [JAVA3D] Background geometry question
David,
...just can't keep away, huh? ;-)
I have used background geometry for something similar to what you describe.
I create a unit Sphere (flip the normals) and then set it as background
geometry. The inside of the sphere is texture mapped with an image of
clouds.
Sincerely,
Daniel Selman
[EMAIL PROTECTED]
Tornado Labs Ltd.
http://www.tornadolabs.com
Here is some example code:
public void createBackground( Group bg )
{
// add the sky backdrop
Background back = new Background();
back.setApplicationBounds( getBoundingSphere() );
bg.addChild( back );
BranchGroup bgGeometry = new BranchGroup();
// create an appearance and assign the texture image
Appearance app = new Appearance();
Texture tex = new TextureLoader( "back.jpg",
this).getTexture();
app.setTexture( tex );
// render as a wireframe
/*
PolygonAttributes polyAttrbutes = new PolygonAttributes();
polyAttrbutes.setPolygonMode( PolygonAttributes.POLYGON_LINE );
polyAttrbutes.setCullFace( PolygonAttributes.CULL_NONE ) ;
app.setPolygonAttributes( polyAttrbutes );
*/
Sphere sphere = new Sphere( 1.0f,
Primitive.GENERATE_TEXTURE_COORDS |
Primitive.GENERATE_NORMALS_INWARD, app );
bgGeometry.addChild( sphere );
back.setGeometry( bgGeometry );
}
-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of David
Sent: Saturday, December 23, 2000 12:02 AM
To: [EMAIL PROTECTED]
Subject: Background geometry question
Hi all, hope your holidays are going well!
I am working on the sky, sun, clouds, etc for Cosm and had a couple of
questions. I have a tesselated dome which renders fine when placed in the
main scene graph and was wondering if this is something I could move to the
background object.
I did try to move it there, but it does not render. I could move the dome
in the main scene graph when the user moves, to keep him at the "center",
but the issues I have are with clipping. My distance terrain is currently
using rendering attributes to define a circle of invisible terrain cells
(because close cells are rendered at higher detail) and I depend on clipping
to prune distance terrain at a user definable setting. Unfortunatly this
also would clip my sky dome.
So a few questions:
1. Can I use a clip node to apply clip to just my sub-tree with the terrain?
2. Can I put my geometry in the background node?
3. Can I somehow clip everything normally, but elect to not clip my sky
dome?
How have other people addressed this?
Dave Yazel
Cosm Development Team
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".