Raul,

With about a 50 degree field-of-view most of your 512x512 image is going to
be non-visible. The image really is texture mapped onto the inside of the
entire sphere. If your screen size is 800x600 (or even higher) that means
your going to magnify your image considerably.

Changing the size of the sphere will not help - background geometry is
assumed to be mapped onto a unit sphere positioned at infinity. For a more
realistic effect I think you will need to modify the position of your
texture on the sphere dynamically - either through changing the texture
coordinates on the fly or perhaps by using a Texture transform 3D to rotate
the texture image with your view (?). Multi-texturing will also help - use a
low-res texture for the sky, and map higher-res clouds on top of it. I think
the Cosm (http://www.cosm-game.com/) team did something similar using
multiple nested spheres and transparency, there may be some implementation
hints on their site.

Sincerely,

Daniel Selman

-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Raul Rios
Sent: Thursday, October 04, 2001 5:41 AM
To: [EMAIL PROTECTED]
Subject: BAD QUALITY in background geometry textures


Finally I have been able to put a background geometry into my scene.

I wanted to render some clouds in the background of my terrain scene.
I've got it using a Sphere of radius 1.0 as a background geometry,
flipping the normals, and mapping my "clouds.jpg" into the sphere:

  Appearance app = new Appearance();
  app.setTexture(myCloudsTexture);

  Sphere sphere =  new Sphere(1.0f,
Sphere.GENERATE_NORMALS_INWARD |
         Sphere.GENERATE_TEXTURE_COORDS,             15, app);

  BranchGroup bgBackground = new BranchGroup();
  bgBackground.addChild(sphere);

  Background b = new Background(bgBackground);
  b.setApplicationBoundingLeaf(myBoundingLeaf);
  myRoot.addChild(b);


Well, the problem now is that the result is very poor!!.
The clouds don�t seem clouds because of the enlargement of
the texture image, even with a 512x512 pixels image.

Can i manage with this in any way?
I've tried with a smaller radius of the sphere, but the sphere
size seems not to change.


I have tried also with a simple image (no geometry) as background.
The result has much more quality, but the clouds are always in the same
place and don�t translate or rotate with the view. Also this way is slower
than geometry background.


Thanks in advance.

=========================
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".

Reply via email to