Jump to content
The Dark Mod Forums

Recommended Posts

Posted

It looks like it's about time to take this on. Changing our model .tga textures to .dds files could have a significant impact on loading times/performance for the release map.

 

I have too many other things on my plate to tackle this any time soon, however. Is there anyone else that has some time that wouldn't mind taking this task on? A script that would do it automatically would be fantastic, as there are a few hundred textures.

  • Replies 143
  • Created
  • Last Reply

Top Posters In This Topic

Posted
It looks like it's about time to take this on. Changing our model .tga textures to .dds files could have a significant impact on loading times/performance for the release map.

 

I have too many other things on my plate to tackle this any time soon, however. Is there anyone else that has some time that wouldn't mind taking this task on? A script that would do it automatically would be fantastic, as there are a few hundred textures.

 

Just the diffuse and speculars, or normals too?

Posted
The normals need to be left as is, just like the texture files.

 

As I am currently working on the package script and teaching it automatically package textures, one part of it's task will be identifing textures - and for that it needs to figure out DDS vs TGA version.

 

From that it should be only a small step to call ImageMagick and do the conversion automatically and check the DDS version into SVN.

 

Question: Does it hurt if both DDS and TGA are in SVN? (I believe we already have that case, but can't prove it at the moment).

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Posted
Question: Does it hurt if both DDS and TGA are in SVN? (I believe we already have that case, but can't prove it at the moment).

 

It won't break anything, if that's what you mean. D3 chooses which one to use based on your video settings. But there's not a lot of point in having both in SVN, since people then have to download both when they first download the mod, and it could create some confusion if people only modify one version.

 

What we will probably do is move the .tga versions to the highres repository.

 

From that it should be only a small step to call ImageMagick and do the conversion automatically and check the DDS version into SVN.

 

Do you mean it would convert the .tgas to .dds? That would be great, if so. How soon would that be available? It would be nice to see what kind of performance impact that would have.

Posted
It won't break anything, if that's what you mean. D3 chooses which one to use based on your video settings. But there's not a lot of point in having both in SVN, since people then have to download both when they first download the mod, and it could create some confusion if people only modify one version.

 

What we will probably do is move the .tga versions to the highres repository.

 

Okay.

 

Do you mean it would convert the .tgas to .dds? That would be great, if so.

 

I don't know if I can do the conversion automatically. I know I can do it manually with Gimp, but haven't tried automatically.

 

How soon would that be available? It would be nice to see what kind of performance impact that would have.

 

Dunno, I am currently hacking at the script (see devel/extract-assets.pl and the releated SVN checkins). Hopefully will be done in a few hours.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Posted
Okay.

I don't know if I can do the conversion automatically. I know I can do it manually with Gimp, but haven't tried automatically.

Dunno, I am currently hacking at the script (see devel/extract-assets.pl and the releated SVN checkins). Hopefully will be done in a few hours.

 

Btw, the progress is tracked here:

 

http://forums.thedarkmod.com/index.php?showt...st&p=153102

 

Currently I am teaching the Games::D3::Parser to correctly parse material definition files. Once it can do this, it will be easy to extract the diffusemap/specular/bumpmap for each material and then figure out the DDS vs. TGA file from it. (That's the theory, anyway :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Posted

You can get the DDS plugin for photoshop made by NVidia, and use photoshops batch tools to automate the process. I'll try it right now.

I always assumed I'd taste like boot leather.

 

Posted
You can get the DDS plugin for photoshop made by NVidia, and use photoshops batch tools to automate the process. I'll try it right now.

 

I don't think this will work on Linux. :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Posted

Alright I just found a tool with the source available (it's really small) that converts tga and bmp to DDS (DXT3 w/Mipmaps), I just converted 27 megs of textures down to 4.5 megs.

 

Get it here: http://www.flipcode.com/archives/Batch_DDS...rter_Tool.shtml

You can see the source for it in there and also the source code comes with the download. Try it it works great. I checked in photoshop and the textures are saved as DXT3 with mipmaps.

I always assumed I'd taste like boot leather.

 

Posted
Alright I just found a tool with the source available (it's really small) that converts tga and bmp to DDS (DXT3 w/Mipmaps), I just converted 27 megs of textures down to 4.5 megs.

 

Get it here: http://www.flipcode.com/archives/Batch_DDS...rter_Tool.shtml

You can see the source for it in there and also the source code comes with the download. Try it it works great. I checked in photoshop and the textures are saved as DXT3 with mipmaps.

 

Thats good to know, but the first step is to know _which_ TGAs to convert to DDS and do so automatically.

 

Edit: The tool you posted does not compile on Linux, it is for Windows only.

 

It is all great if someone does it manually now, but we will have to redo that everytime manually.

 

If you would just let me finish my script so I can detect the files automatically.........

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Posted

You only need dxt3 if there is an alpha, otherwise dxt 1 will do, which is half the filesize. A 1024x texture should be around 600kb.

Civillisation will not attain perfection until the last stone, from the last church, falls on the last priest.

- Emil Zola

 

character models site

Posted
You only need dxt3 if there is an alpha, otherwise dxt 1 will do, which is half the filesize.

 

Ah thanx. Hopefully this can be determined automatically, too.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Posted
You only need dxt3 if there is an alpha, otherwise dxt 1 will do, which is half the filesize.

 

I thought also that DXT3 had less compression artifacts?

I always assumed I'd taste like boot leather.

 

Posted

NAh, you barely notice the difference.

Also, are mip maps really necessary, since you can shave another 200kb off that by not having them.

Doesn't sound much, but over 1000 textures, that 200mb saved.

Civillisation will not attain perfection until the last stone, from the last church, falls on the last priest.

- Emil Zola

 

character models site

Posted
NAh, you barely notice the difference.

Also, are mip maps really necessary, since you can shave another 200kb off that by not having them.

 

I think they are, because the graphic card will generate the mipmaps anyway. (which could contribute to even more on-load-stuttering, if sneaksies poor graphic card needs to generate mipmaps for 50+ textures :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Posted
I think they are, because the graphic card will generate the mipmaps anyway. (which could contribute to even more on-load-stuttering, if sneaksies poor graphic card needs to generate mipmaps for 50+ textures :)

 

Doom 3 won't show the textures in game unless you generate the mipmaps before hand, at least that's what happened to me when I tried making them without mipmaps.

I always assumed I'd taste like boot leather.

 

Posted
It is all great if someone does it manually now, but we will have to redo that everytime manually.

 

Why? Generate them once manually, upload them to SVN, problem solved.

Posted
NAh, you barely notice the difference.

Also, are mip maps really necessary, since you can shave another 200kb off that by not having them.

Doesn't sound much, but over 1000 textures, that 200mb saved.

 

You're right, I can't tell the difference, the two DXT formats look almost exactly the same.

dxcompareyi2.png

I always assumed I'd taste like boot leather.

 

Posted

If we're going to do this as a batch, we'd have to use DXT3, unless someone wants to manually open each texture to see if it uses any transparency.

Posted
If we're going to do this as a batch, we'd have to use DXT3, unless someone wants to manually open each texture to see if it uses any transparency.

 

That was my second comment about "automating it", sorry if it was to confusing. I am pretty sure ImageMagick can tell you automatically if analpha channel was used or not.

 

But let me first finish the parser and the script, and then work on the conversion.

 

(Currently the parser comes along nicely, now I just need the script to actually use the parsed information, but my head is like broccoli tonight - damn fever :(

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Posted

For size considerations, it's worth checking. Or at least, erring on the side of making everything DXT1 and then finding the broken ones which need fixing to DXT3. It's just a matter of seeing it screwed up in game and jotting it down, or the manual method of opening it (easier and foolproof, though perhaps more tedious). Anyone can help out doing either; no reason to suddenly accept bloated sizes.

 

if sneaksies poor graphic card needs to generate mipmaps for 50+ textures

I really don't think it's a matter of the card, it's the 1.4GHz processor. The card is a GF6800 - older, but no slouch by any means, and even higher than a few other users' cards. But when the difference in launch time (D3 to main menu only, or DR with no map) between my 1.4GHz CPU and my 3.0GHz CPU is on the order of 3-4x longer at least, that's the key factor. Or, compiling a map on the 3.0 in <6 mins, but >20 mins on the 1.4. So the card is probably sitting there waiting to be handed the next set of textures. And once they're all cached, and as long as they don't go beyond some magic number in size, it runs without issue. The loading is slow, the swapping is slow. Live rendering is fine.

 

Edit:

I am pretty sure ImageMagick can tell you automatically if analpha channel was used or not.

It might be the fault of PS6.0 (known to have some bugs/limitations with alpha channels), but I see at least a blank alpha for what seems to be every darkmod DDS I open. Just so you're aware.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
×
×
  • Create New...