Must be powers of 2
Like the Alpha of Animations
Creating and editing texture images is something that
is normally done external to Java 3D programs. In fact, most texture images
are prepared before the program is begun. There are two essential tasks in texture
1. ensuring the images are of acceptable dimensions, and
2. ensuring the images are saved in a file format which can be read.
Of course the image could be edited to achieve the desired color, transparency, and tiling characteristics.
For rendering efficiency, Java 3D requires the size of the texture image to be a mathematical power of two (1, 2, 4, 8, 16, …) in each dimension. Failing to meet this restriction will result in a runtime exception. If an image is not of acceptable dimensions, it must be modified (scaled or cropped) to meet the dimension requirements before it is used.
Image editing can be done in a wide variety of programs including the Java Advanced Imaging API 2 . In Figure, the two smaller images are 128 by 128, the tree is 256 by 128, and the earth is 256 by 256.
As far as the file formats are concerned, any file format can be used provided there is a method to load it.