View Issue Details

IDProjectCategoryView StatusLast Update
0001123FSSCPgraphicspublic2007-11-22 18:56
ReporterARSPR Assigned Totaylor  
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.9 
Fixed in Version3.6.10 
Summary0001123: DDS format is not valid for Glow Point textures
DescriptionThe summary is the description ;)

Steps To ReproduceI've discovered it while playing-resolving-posting 0001122. If you take the attached dds version of "blue_glow4" in that bug report, and put it in the highest priority place, you will notice that it is ignored (you'll see the old one with the background black square).

I've made another try with u8888 DDS format and again it isn't read.

I don't know if this is a bug or just a to-be-added feature. But if DDS is going to be the "preferred" format, I think it should be a must-have.
TagsNo tags attached.

Activities

taylor

2006-10-26 16:19

administrator   ~0007002

DDS is valid for everything, it can't really tell the difference when it's trying to load a texture. The TGA version would still be used over the DDS version if using -jpgtga however. If the DDS file itself is invalid for some reason then it can't load, but it should be logged to fs.log in that case.

Where exactly did you put the file?

It will only work properly from data/maps/ or data/effects/, but a version in data/maps/ would get found first.

ARSPR

2006-10-26 17:04

reporter   ~0007004

I've just retested with the dds version included in 0001122. I've put it in mediavps\data\maps and it doesn't work.

If I put the tga version (deleting the dds one), it works. Please check it yourself as DDS file seems to be ok, (I can open it with ddsview and Photoshop).

taylor

2006-10-26 17:14

administrator   ~0007006

Works fine for me.

Remember that if you use -jpgtga that a TGA will always get used first, regardless of directory based load priority. It searches everywhere for a TGA, then everywhere for a JPG, then everywhere for a DDS, etc. Try it again without -jpgtga and see if that makes a difference.

ARSPR

2006-10-26 17:28

reporter   ~0007007

Last edited: 2006-10-26 17:33

It's the -jpgtga flag.

I've got it enabled as there are a lot of textures that only exist in this format. Then the game is using the old bad version, despite the higher priority location of the new dds file.

I think this behaviour of -jpgtga flag is quite dangerous. I mean, the normal user doesn't expect the priority order being changed. And normally there's a mixture of formats for the textures so -jpgtga is nearly compulsory. So if you make better DDS files (less used memory and mipmaps) of some old tga textures which maybe are inside a vp with a lot of other things, it can be a PITA having to delete the old tga files so they do not override the new versions.

I would change this behaviour of the -jpgtga flag, (although I don't know how difficult doing it is).

taylor

2006-10-26 18:52

administrator   ~0007008

It's simple to change the bahavior of -jpgtga, and it is going to be changed so that DDS always has priority, but that won't happen until after 3.6.9 at least.

There is a slim possibility of squeezing it into 3.6.9 before it ships, but that depends more on the state of the new MediaVPs at the time. The current VPs have high quality images in TGA, and lower quality images in DDS. If we changed the load order then everyone would always get the lower quality images. The new VPs, if I'm not mistaken, will have everything in DDS (in high and low quality versions) so what gets loaded will be just a matter of VP filename ordering.

For movies I actually made a new loading system which can look for all valid formats at the same time. You simply tell it in what order you wish the formats to have priority and then let it loose. It will search each directory for each format and use the first one it finds. The problem with this is that it's incredibly slow in comparison, since the search time increases exponentially as you add more formats to look for. For that reason it isn't been used for bitmaps, yet. Post-3.6.9 will bring some bmpman and CFILE changes which could allow it to work better.

ARSPR

2006-10-26 20:13

reporter   ~0007013

Well, unless it is extremely slow, I feel it could be coded even now (FS2 has quite short loading times). I think it really doesn't matter the priority you choose between jpg/tga/dds/pcx in the same directory / vp. But if I put a texture in a higher priority place I want it loaded instead of any other previous texture with the same name despite of their format, (even if I have to pay some more loading time). (This is the whole philosophy of -MOD flag).

Many (old) mods have tga textures so maybe if DDS gets GLOBAL higher priority in the future, there are still slight chances of getting unspected results (I mean not using a texture designed to override the "retail" one).

(Like always, you are the coders, so the last decission is yours ...)

taylor

2006-10-26 20:32

administrator   ~0007015

It's VERY slow. Currently it checks all directories/VPs for a TGA, if not found it does the same thing for JPG, if not found the same thing for DDS, etc. But the main point is that when it finds something it stops looking. The other loading code would search each and every directory/VP for TGA/JPG/DDS/PCX/TGA. So where you might only be doing 30 searches to find a TGA the old way, you would do more in the neighborhood of 146 searches to find the same TGA in the new loader. When you get in the range of 10,000 to 15,000 files (a common number with the MediaVPs) you can easily end up going through more than 146 searches. That's a huge difference in load times, and why we are only going to use it for smaller type searches for now (ie, movies, and animations such as ANI and EFF).

Retail textures are all PCX (except perhaps a very rare 16-bit TGA) so changing DDS vs. TGA load order wouldn't have any affect on retail textures. Any affect that it would have is for mods that included both low quality DDS and high quality TGA images. I don't think that anyone really does that, except for the MediaVPs, opting instead to use TGA for high quality and PCX for low quality. Most everyone is switching (or has already switched) to DDS for everything though.

ARSPR

2006-10-27 17:07

reporter   ~0007025

Last edited: 2006-10-27 17:09

Ok. I've added some info about this in FS Wiki. It is mainly at the end of http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-mod (it seemed the place where it was better fitted).

I have also added a short mention after the firs paragraph of http://www.hard-light.net/wiki/index.php/Texturing#Texture_Types.

Please, check it and then close this false bug.

taylor

2006-10-28 22:53

administrator   ~0007034

Just suspending this one for now, since I do plan to rework loading at some point for 3.7 (or later). I'll probably reopen this once I rewrite several parts of bmpman and CFILE.

taylor

2007-11-22 18:56

administrator   ~0008686

Almost forgot that this was...

Fixered.

Issue History

Date Modified Username Field Change
2006-10-26 14:44 ARSPR New Issue
2006-10-26 16:19 taylor Note Added: 0007002
2006-10-26 16:20 taylor Status new => assigned
2006-10-26 16:20 taylor Assigned To => taylor
2006-10-26 17:04 ARSPR Note Added: 0007004
2006-10-26 17:14 taylor Note Added: 0007006
2006-10-26 17:28 ARSPR Note Added: 0007007
2006-10-26 17:33 ARSPR Note Edited: 0007007
2006-10-26 18:52 taylor Note Added: 0007008
2006-10-26 20:13 ARSPR Note Added: 0007013
2006-10-26 20:32 taylor Note Added: 0007015
2006-10-27 17:07 ARSPR Note Added: 0007025
2006-10-27 17:07 ARSPR Note Edited: 0007025
2006-10-27 17:09 ARSPR Note Edited: 0007025
2006-10-28 22:53 taylor Status assigned => resolved
2006-10-28 22:53 taylor Resolution open => suspended
2006-10-28 22:53 taylor Note Added: 0007034
2007-11-22 18:56 taylor Note Added: 0008686
2007-11-22 18:56 taylor Resolution suspended => fixed
2007-11-22 18:56 taylor Fixed in Version => 3.6.10