question to devs

question to devs

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
zorbawic
Posts: 107
Joined: 07 May 2006, 15:09

question to devs

Post by zorbawic »

whats the best file format for textures used in maps (NMF) - i mean for best quality and render speed
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

For render speed it doesn't matter which format you use, textures are all converted to the same internal format on loading (except possibly formats without alpha and formats with alpha, no clue if alpha textures are supported tho).

Regarding quality I doubt it matters much, but if you're really picky you should use lossless fileformats, e.g. png (and not jpg). But again - as long as your jpeg quality is high enough I seriously doubt anyone would ever notice jpeg compression artifacts on textures.

So I suggest just using jpg, at least for textures without alpha channel.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Does Spring use/support DXT? Wouldn't DDS be the best format in that case?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

I haven't seen that support in the NMF (yet), I could be mistaken tho.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

DDS is supported IIRC, like with models or any other image (All springs code uses the same image loading lib), but it is a lot larger than png/jpg. So like tobi said, jpg is usually the best choice.

However if you need alpha (Sm3 bumpmaps store specular in alpha channel), you can use PNG I think.
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

PNG can have a alpha channel, jpg cannot
SJ
Posts: 618
Joined: 13 Aug 2004, 17:13

Post by SJ »

DDS should be the format of choice as long as you can stand the artifacts from it, since it will take up 4x less texture memory.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

What SJ said is correct. DDS is optimized for GPUs, and should be used whenever possible.
Post Reply

Return to “Engine”