Hello Sam, You probably know already but remember your images must be a power of 2 in width and height otherwise you'll get an exception. How the texture maps to the shape is determined by the texture coordinates of the shape. The image will distort to meet the texture coordinates, so the size of the shape shouldn't matter.
Java 3D provides minification/magnification filters to eliminate these effects. Use the setMagFilter(int magFilter) and setMinFilter(int minFilter) methods of Texture2D to set them respectively. Regards, David Rush -----Original Message----- From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]]On Behalf Of Sam Hocking Sent: 13 April 2002 19:17 To: [EMAIL PROTECTED] Subject: [JAVA3D] texture mapping? Hi, I'm pretty new to Java3D side of Java (few months) but thanks for your help recently. I'm having trouble using TextureLoader to load digital artwork in jpg format to then map to various box shapes (i.e. picture frames) in the scene. However, i need these box shapes to be created with the same x, y dimensions as the image texture that will map onto them. i.e the image can not be distorted to fit the shape, but the shape has to distort to fit the image? Is there a way i can do this, reasonably simply? I've looked at getWidth(), getHeight() methods of Texture2D, which i could use to then build the box's geometry, but just wondered if you experienced people here know of a better solution or maybe there's a class that does this already? Also, is there any ratio i can use between Java3D's units of measurement and pixel measurements of an image?? I.e. i don't really want minification of the image because i've created it larger than it has to be for the transformations it goes through. Thanks in advance Sam =========================================================================== 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".