On Thu, 30 May 2002, Zak Nixon wrote: > I am wanting to place a 2048x1024 size image in the scene. I place the image > on a flat plane on the xy-axis, from 0 to 1. The image appears fine. > But, when I increase the size of the plane, the image tiles itself on the > plane. > Question: Is there anyway to stop this tiling effect, and force the image to > strech to > the size of the plane? > > Thanks for your help! > > -Zak >
Howdy Zak, I found an awful lot of good material on applying textures in the Java3d tutorials. You can find them on suns site, and I believe there is a link to them from j3d.org. I highly recommend taking a look through them, if you haven't already. There's a lot of good info (Chapter 7) Anyway, you have a couple of options. One option is for you to go back and map the texture coordinates at every point in your new plane so that the lower left hand corner always maps to 0,0 and the upper right hand corner always maps to 1.0,1.0. That is, make sure that your texture coordinates never exceede 1.0. The other option you have is to clamp the texture. By clamping the texture, what happens is that rather than tiling the image, the colors on the border of the image are extended to the border of the shape its supposed to be covering. To do this, you can set this option through your Texture2D object. I hope this helps! Noah Ternullo Systems Engineer Lockheed Martin =========================================================================== 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".
