Jump to content
The Dark Mod Forums

Recommended Posts

Posted

I have written a wrapper script around tga2dds to do the conversion for every TGA file. Stil toying around, and some questions remain:

 

* ./textures/darkmod/props/textures/fireplace_wooden_d.tga - it smaller as TGA than as DDS, probably to the huge black areas and the TGA being RLE encoded. Can't this texture be cut down to half the size?

* I am skipping any "_local" and "_local[0-]+.tga" file (we have some _local2 named ones). Are there other naming schemes I missed?

* I am skipping speculars with "_s.tga". I guess these should not compressed? And do we have other naming conventions I missed?

"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

  • Replies 81
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted

More info:

 

* There are 608 files and it is very slow (due to starting wine for every file)

* models/textures/darkmod/props/textures/water_mill_combined.tga crashes either wine or the compressonator. (The file looks a bit garbled at the bottom, too) Can somebody under windows please check it out and decide whats up with it?

 

Ditto crash for:

 

* models/darkmod/props/textures/bc_stair01.tga 512x96

* models/darkmod/props/textures/corner_brace_rust.tga 179x294

* models/darkmod/props/textures/table_medallion.tga 580x593

* models/darkmod/props/textures/grammo2_d.tga 384x512

* models/darkmod/props/textures/numberwheel_d.tga 64x640

* models/darkmod/props/textures/bathtube_d.tga 514x514

 

Edit: Fixed paths and added dimensions above.

"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

Can these be converted:

 

map heightmap(models/darkmod/props/textures/bc_doublebass_h, 10)

 

?

 

I think not, so for the final run I probably need to ignore _h.tga, too.

 

The biggest problem I see is that the convert creates massive amounts of data:

 

608/608 - sheetmusic01.tga: 3148996 to 1398256 bytes, 44.40% (overall 437395717 to 181206935 bytes, 41.43%)

 

Thats ~437 Mbytes TGA files to upload to the highres repo and ~ 180 Mbyte DDS to the normal SVN. Ouch.

 

Edit: The above numbers also mean that if someone built a map containing every model, you would need a graphic card with at least 512 Mbyte memory to fit all the textures in, possible even bigger (that does not count normal and specular maps), while with DDS there is a chance it fits into 256 Mbyte :)

"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
* models/textures/darkmod/props/textures/water_mill_combined.tga crashes either wine or the compressonator. (The file looks a bit garbled at the bottom, too) Can somebody under windows please check it out and decide whats up with it?

 

Ditto crash for:

 

* models/textures/darkmod/props/textures/bc_stair01.tga

* models/textures/darkmod/props/textures/corner_brace_rust.tga

* models/textures/darkmod/props/textures/table_medallion.tga

* models/textures/darkmod/props/textures/grammo2_d.tga

* models/textures/darkmod/props/textures/numberwheel_d.tga

* models/textures/darkmod/props/textures/bathtube_d.tga

 

Saving them as a dds file in photoshop works fine. I can't upload them here, betamappers can't upload such files :( .

Posted
Saving them as a dds file in photoshop works fine. I can't upload them here, betamappers can't upload such files :( .

 

The betamapper repo doesn't allow DDS files? Strange. You can email them to me at nospam-abuse@bloodgate.com (yes, literally :) and I can then include them. And thanx! :)

"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
The betamapper repo doesn't allow DDS files? Strange. You can email them to me at nospam-abuse@bloodgate.com (yes, literally :) and I can then include them. And thanx! :)

 

Ah, uploading at the forum doesn't work. The files are in my folder in the bm repo now. I used standard settings to save them (something like dxt1 rgb no alpha).

 

I had to expand some of them a few pixels cause their dimensions were not multiples of 4. Could that be why the compressonator couldn't handle them? Hope this was not something I should not have done.

 

Let me know if they are ok.

Posted
* I am skipping speculars with "_s.tga". I guess these should not compressed? And do we have other naming conventions I missed?

 

There's no reason not to compress speculars--we did with the brush textures.

 

./textures/darkmod/props/textures/fireplace_wooden_d.tga - it smaller as TGA than as DDS, probably to the huge black areas and the TGA being RLE encoded. Can't this texture be cut down to half the size?

 

It's not a very well-designed uvmap, I'll grant you, but there's no way to modify it without changing the model itself.

 

* I am skipping any "_local" and "_local[0-]+.tga" file (we have some _local2 named ones). Are there other naming schemes I missed?

 

You should also skip any "_h" names, as they are heightmaps used in addnormals declarations. I have a nagging feeling I've also seen some "_n" extensions, but I can't say for sure.

 

I had to expand some of them a few pixels cause their dimensions were not multiples of 4.

 

Just in case you're not aware, they only have to be multiples of 2, not 4 (which may not have helped in this case).

Posted
I have a nagging feeling I've also seen some "_n" extensions, but I can't say for sure.

 

Yes, there are some textures with a _n extension.

 

Just in case you're not aware, they only have to be multiples of 2, not 4 (which may not have helped in this case).

 

Hmm, photoshop explicitly asks for width and height to be multiples of 4.

Posted

@Tels: can your script check whether the texture dimensions are matching powers of two? The DDS files need to be in powers of two, otherwise the texture will be black in-game without further error message. TGA files are fine but DDS files must match.

Posted
@Tels: can your script check whether the texture dimensions are matching powers of two? The DDS files need to be in powers of two, otherwise the texture will be black in-game without further error message. TGA files are fine but DDS files must match.

 

:wacko:

The ones converted by me are not. I can stretch them to power 2 dimensions, if this is preferable, or keep the TGA's?

Posted

Stretching is preferable, but beware this will mess up the scale in the editor. It's generally best to start with a canvas that has powers of two as width/height and follow the Texture Guidelines on the wiki.

Posted
@Tels: can your script check whether the texture dimensions are matching powers of two? The DDS files need to be in powers of two, otherwise the texture will be black in-game without further error message. TGA files are fine but DDS files must match.

 

Sure, I had not even thought of doing that check.

 

However, the remark from Springheel about "need to modify the model" to modify the diffuse map (due to UV mapping) leads me to wonder if it would be okay to resize a diffuse map from lets say 1022 to 1024?

"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
Just in case you're not aware, they only have to be multiples of 2, not 4 (which may not have helped in this case).

 

Textures should (must?) be power of 2 (so 64, 128, 256, 512, 1024, but not 68 (which is a multiple of two but not a power of two). :) Coincidentily, power of two means also multiple of 4 :)

 

And since DDS seems to compress blocks of 4x4 pixels, textures that are not power of 2 will fail that check.

"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
Yes, there are some textures with a _n extension.

 

They seem all to be normal maps:

 

models/darkmod/props/textures/barrell_large_n.tga

models/darkmod/props/textures/anchor_n.tga

models/darkmod/props/textures/anvil_n.tga

models/darkmod/architecture/metalrust_n.tga

 

Should probably renamed to _local.tga. But thats for another day, I am just skipping them for now.

"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
Textures should (must?) be power of 2 (so 64, 128, 256, 512, 1024, but not 68 (which is a multiple of two but not a power of two). :) Coincidentily, power of two means also multiple of 4 :)

Just for the records, power of two does not mean multiple of 4. Take 44 as example.

 

edit: or wait, did you mean powers of 4? That would be true indeed. Ignore my post then.

edit2: scratch my whole post, I just had to re-read what you meant. I thought you meant multiple of 4 is always a power of two, not the other way around.

Posted
Just for the records, power of two does not mean multiple of 4. Take 44 as example.

 

edit: or wait, did you mean powers of 4? That would be true indeed. Ignore my post then.

 

44 is not a power of 2 :) 2,4,8,16,32,64,128,256,512 are. But I admit I don't know what the exact rules are. All I know that a 512x96 texture is rejected :)

 

Erg, lets try this again:

 

* 16 is a power of 2 and a multiple of 4 and a multiple of 2

* 20 is not a power of 2, but a multiple of 2 and a multiple of 4

* 22 is not a power of 2, but a multiple of 2, but not a multiple of 4

 

All powers of two are also multiple of 4 (except 2) since 4 itself is a power of 2.

 

Does that make it more clear? :)

"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 was trying to convert a small director first, so to speak as a warmup and selected

 

models/darkmod/props/textures/firearrow/

 

however, that would result in:

 

dds/models/darkmod/props/textures/firearrow/

 

Doesn't that violate the 5-paths rule? I cannot find any mention of this in:

 

http://wiki.thedarkmod.com/index.php/Dds

 

tho :(

"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

Meh, now I wanted to try out the DDS converted firearrows and check that it worked, but there is a new event, so I had to recompile the source code. Now 20 mins later, I get this:

 

dlopen '/home/te/.doom3/darkmod/gamex86.so' failed: /home/te/.doom3/darkmod/gamex86.so: undefined symbol: _ZNK15RevisionTracker18GetHighestRevisio
nEv

 

Someday I hate computers........

"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
The sconscript needs to be updated, I can do that later, if nobody beats me to it.

 

Took me a while to figure out, but it should work now.

"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

The firearrow is black now, so it didn't work. Shot. :(

"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
Stretching is preferable, but beware this will mess up the scale in the editor. It's generally best to start with a canvas that has powers of two as width/height and follow the Texture Guidelines on the wiki.

 

Ok, stretch/compress to the nearest power of 2? Or only stretch out/compress? Changing dimension ratio does not mess up correct uv placement right?

Posted
Ok, stretch/compress to the nearest power of 2? Or only stretch out/compress? Changing dimension ratio does not mess up correct uv placement right?

 

The power-of-two is needed for the conversion AFAIK. The second point, I guess so, but I really don't know for sure.

"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

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
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...