Jump to content
  • Advertisement
Sign in to follow this  
I_Smell_Tuna

Using PNG for a 3D game.

This topic is 4556 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
.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).

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!