RelicNews Forums

Go Back   RelicNews Forums > RDN - Relic Game Mods > Dawn of War - Adeptus Modificatus
User Name
Password
Register FAQ Members List Arcade Mark Forums Read



Closed Thread
 
Thread Tools
Old 6th May 05, 9:40 AM   # 1
Nachimir
Guest
 

Decal Texture study: TGA vs DXT3 vs DXT5

Allow me to introduce myself properly. My postcount is low, but I've been lurking since last November. I'm a level designer who works on independent projects and with Black Cat Games, and have been using the Unreal Engine for the past 5 years or so. I picked up the DoW ME as soon as the Mod Tools were released, and have returned to them in the last week.

My apologies for not having any DoW specific work to show along with this post. I've made skirmish maps but don't think they're yet worthy of release; some maps are in the works along with a limestone/Karst landscape decal set.


I'm currently constructing a comprehensive set of tutorials on skirmish map construction, because I keep seeing people asking for them . The material in this post will be a part of one of the tutorials, but I'd like some further input before I draw conclusions.

Information:
All decals were generated from the same 512 x 512 source art, including the alpha maps.
All files were made with Photoshop 7, with the plugin to allow TGA alpha channels.
TGAs are saved at 32 bit, as 24 and 16 don't allow alpha maps (More info on that here).
Map in test shot is 128 x 128.
Blue and red checker detail texture is DXT1, 256 * 256.


Resolution and format comparisons:
Firstly, here is a scale comparison.

.

Here is a reference shot taken in the Mission Editor, showing all the decals and what formats they are in.



As you can see, the mipmaps of the DDS files are evident in comparison to the TGA decals, especially on the higher resolution decals.

The file sizes of my test decals:
512 * 512:
DXT: 341K
TGA: 1.0Mb

256 * 256:
DXT: 85.4K
TGA: 256K

128 * 128:
DXT: 21.4K
TGA: 64K

DDS files saved with DXT 5 and 3 give identical file sizes.

Presumably, there's a performance hit when using TGA files and this is why a lot of third party mappers use DDS, even though those don't allow preview shots in the Mission Editor, and TGA files do? How big is the performance hit, in people's experience? (Presumably, DDS would still be more efficient than TGA even if mipmaps were turned off?)


Alpha map comparison:
I also have some questions about DDS alpha maps. Here is a closer comparison image of those.



As said, DDS files at DXT5 and DXT3 give identical filesizes. As you can see, DXT5 gives a smooth alpha, whereas DXT3 alphas are visibly stepped, especially on larger decals. Nonetheless, monoRAIL's detail texture tutorial specifies DXT3 (Though elsewhere you say 3 or 5). So is "DXT3 only" a mistake, or are there issues with DXT5 I'm unaware of? Are there any advantages to DXT3?

(Edit: I've checked, and the banding of DXT3 does also show on a detail texture test).

Finally, what resolutions do mappers prefer to use for decals? There are some large landforms such as sinkholes in one of my maps that benefit greatly from large decals, but will even a couple at 512*512 used very scarcely be too much for some systems?

-----

Thanks for any input; useful information included in the forthcoming tutorials will be credited along with a link to this thread.

Last edited by Nachimir : 6th May 05 at 2:21 PM.
 
Old 6th May 05, 7:32 PM   # 2
dr2sheds
Guest
 

Props to you for this!
I read here, that relic used DXT1 for their detail textures and DXT5 for their decals. They also mention to keep the decals/textures under 512x512 as over this you get a performance hit.
I'm guessing they use the dds format for the smaller file sizes thus it's less of a memory hog and relatively ups performance.
You might want to mention that decals/textures need to base2 resolutions or the map editor throws an error when trying to load 'em.
I'm guessing you've already looked through the FAQ and SWK's Map Tut - there's some good info in there which would benefit from being pulled together into one guide.

regards,
sheds
 
Old 6th May 05, 7:54 PM   # 3
monoRAIL
Member
 
Join Date: Aug 2004
Location: Melbourne

Well spotted Nachimir. I generally use .tgas for my decals now, and only use .dds for detail maps. I've edited the original tutorial to indicate that DXT5 compression can also be used.

As far as I know (and I may well be wrong) a 256x256 texture takes up the same amount of VRAM no matter what format it is. The only advantage of using a .dds is the smaller file size, and probably a slightly quicker loading time (to transfer the texture from the hard disk into VRAM). Unless videocards actually store the compressed texture and decompress it in realtime when drawing each frame - but I don't know enough about how videocards work to be sure about it.
__________________
monoRAIL is offline  
Old 7th May 05, 6:45 AM   # 4
Nachimir
Guest
 

Hmm. Like you, I don't know much about video cards. This is the only source I found, but apparently DDS compression does reduce VRAM usage.

Committing various shenanigans with a hex editor and Photoshop, I made a DDS decals version of Coral Reef to compare loading times and FPS with the original. I then won a 3 player skirmish against two AI and saved while looking around the map, and changed the filenames in order to look at FPS in both versions using the same savegame. The difference in loading times and FPS was absolutely negligible. I consider the in game decal test inconclusive, because it's not a very a decal intensive map. Regarding loading times though, it's hardly surprising given that the decals for Coral Reef have a combined footprint of 1.43Mb as TGAs

The only things that seemed to dent the FPS were the unit models and effects. I guess decals might have a more dramatic performance effect on maps like Lost City, but most custom decal sets seem to have an even smaller combined filesize.

I'll post the results of any more tests here. Does anyone know of any maps with a large amount of custom decals? (Either on disk, or just repeated in the map. DDS or TGA).

Judging by the comments at the Targetware page linked above, DDS will drop the lower limit of the gamut of systems a map can perform well on, though the units (even with LODmesh settings) and effects of DoW are probably demanding enough to pull that back up a bit anyway.

I might be very, very wrong about this, but I guess that the game, uh, "instances" even decal textures rather than "referencing" them at every point they appear*, because that would kind of defeat the point of having textures tile (Even though decals are meant to overlap, if you have a good system for loading and handling 2D art efficiently, why deviate from it, eh?).

* Sorry, 3DSMax terminology is the only logical equivalent I have. I mean having a single copy in VRAM and using it lots of times when rendering, rather than having lots of copies and using each once.

Thanks very much for the feedback guys. Guessing aside, I think I'll be able to give a lot of reasons for stuff in the texture part of the tutorials now.
 
Closed Thread



Go Back   RelicNews Forums > RDN - Relic Game Mods > Dawn of War - Adeptus Modificatus
User Name
Password
Register FAQ Members List Arcade Mark Forums Read



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




All times are GMT -7. The time now is 4:56 AM.

Page generated in 0.26042700 seconds (88.05% PHP - 11.95% MySQL) with 8 queries

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.