Using PNG for a 3D game.
I want to decided on a primary image format that I can use for a 3D video game that I am developing. I've done some research and I'm leaning towards the PNG format since it is free of any patents, has lossless compression, and has a library for the format. Anyone have any suggestions or comments?
Go for it!
On the other hand, you might try using an image library (SDL_image, DevIL) that supports a lot of different fileformats so you gain a little more flexibility.
On the other hand, you might try using an image library (SDL_image, DevIL) that supports a lot of different fileformats so you gain a little more flexibility.
with all the pluses with PNG, it also means having to fuss with graphic compression. unless you're totally hellbent on lots of little graphics, or relatively few high-res / photo realism graphics, probably settle for a more moderate format. Well, thats if you had to pick just one... which of course you dont
.PNG is the only format I ever use anymore for anything except photographs, which are usually .JPG (unless I'm looking for lossless, anyway).
As far as AAAP's post about "fussing with graphics compression", there are many free libraries out there for loading .PNGs, so you don't have to write them yourself (SDL_image for OpenGL, or the built in DirectX functions are a few).
As far as AAAP's post about "fussing with graphics compression", there are many free libraries out there for loading .PNGs, so you don't have to write them yourself (SDL_image for OpenGL, or the built in DirectX functions are a few).
well ok, fair enough. I guess I havn't mentioned in this forum that I'm very much relentlessly opposed to using SDL in any project :o
Quote:Original post by AAAP
well ok, fair enough. I guess I havn't mentioned in this forum that I'm very much relentlessly opposed to using SDL in any project :o
Why?
And yes, PNG is just fine. It's a very solid format that also stores alpha information (RGBA)
here are two methods
SDL + SDL_Image
glpng
Usually, you want a format that allows artists to control the texture in quite some detail (compression, bit depth, MIP maps, etc) for your on-disk delivery format. PNG doesn't do so well there.
Similarly, you want as rich as possible a format for the source, so that you can go back and tweak certain layers of a texture. PNG is hopeless there, as it collapses everything to a single raster.
I use DDS for the delivery format, and PSD for the source format (because my graphics tool is Photoshop). DDS is not patent encumbered, is well described, and supports niceties like 3D textures, cube maps, built-in MIP maps, DXT compression, 16-bit textures, 32-bit textures, float textures, etc. It's very easy to parse, too, and the data is not, actually, DirectX specific.
Similarly, you want as rich as possible a format for the source, so that you can go back and tweak certain layers of a texture. PNG is hopeless there, as it collapses everything to a single raster.
I use DDS for the delivery format, and PSD for the source format (because my graphics tool is Photoshop). DDS is not patent encumbered, is well described, and supports niceties like 3D textures, cube maps, built-in MIP maps, DXT compression, 16-bit textures, 32-bit textures, float textures, etc. It's very easy to parse, too, and the data is not, actually, DirectX specific.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement