Hello Guest

what texture format to use?

  • 5 Replies
  • 6674 Views
what texture format to use?
« on: June 15, 2004, 03:49:42 »
Can anyone recommend a texture format for use in lwjgl for 3d games?  I need textures that support alpha, mipmaps, and texture compression.  Obviously DDS is probably the best format for this but microsoft standards make me feel icky.  I also have not found any java Image readers for DDS, and I don't really want to write my own Image reader.

The java Image class only appears to support PNG, JPG, and GIF.  None of these formats appear to properly support the alpha channel, although I could be mistaken.

Any advice?
JW
I can no longer sit back and allow, communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy, to sap and impurify all of our precious bodily fluids." - Gen. Jack T. Ripper

*

Offline spasi

  • *****
  • 2225
    • WebHotelier
what texture format to use?
« Reply #1 on: June 15, 2004, 07:30:25 »
Download this

http://java.sun.com/developer/earlyAccess/jai_imageio/index.html

and you'll be able to read/write more formats than the three you've mentioned.

There's no perfect format really. But anyway, since we don't want any AWT dependencies in our LWJGL apps, we usually build a custom format to read at runtime. It's easy and you can put any features you need (like pre-generated mipmaps). You may want to try what Cas has done in SPGL.

As for reading images in our tools I prefer TIFFs.

what texture format to use?
« Reply #2 on: June 15, 2004, 11:21:11 »
However, if it doesn't matter for you if you have any dependencies on ImageIO and AWT, i would recommend you to use PNG as image format. It supports full 8-bit alpha channel, and I use it for all my textures in my LWJGL projects. Besides that, its compressed but lossless, and the alpha features can be utilized increadibly easy from programs like Photoshop for example.  8)

what texture format to use?
« Reply #3 on: June 15, 2004, 15:16:23 »
How about mipmaps?  Do you feel that GLU does a good enough job on generating mipmaps?  How common is it to need to manually create your own mipmaps using photoshop or other art programs?

A
I can no longer sit back and allow, communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy, to sap and impurify all of our precious bodily fluids." - Gen. Jack T. Ripper

what texture format to use?
« Reply #4 on: June 15, 2004, 15:41:00 »
Are you having problems with the GLU-generated mipmaps?  Seeing some strange artifacts or something?
ellomynameis Charlie Dobbie.

what texture format to use?
« Reply #5 on: June 15, 2004, 20:40:30 »
Nope my GLU-generated mipmaps look fine so far.
I can no longer sit back and allow, communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy, to sap and impurify all of our precious bodily fluids." - Gen. Jack T. Ripper