Jump to content
The Dark Mod Forums

converting TGA to DDS


Tels

Recommended Posts

  • Replies 81
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Generally, making them larger keeps the level of quality, whereas making it smaller will get rid of "pixel information". Hence make them larger.

 

P.S. Unless it's a 520x520 texture, of course. The 8 pixel difference to 512 would not be noticeable.

Link to comment
Share on other sites

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?

 

It could indeed mess things up (2 pixels wouldn't matter much, but 20 might). As long as any size change is proportional, it won't mater, but if there were a 512x400 texture, changing it to 512x512 would indeed mess up the way it wraps around the associated model.

 

There shouldn't be any textures like that in the first place, however.

Link to comment
Share on other sites

It could indeed mess things up (2 pixels wouldn't matter much, but 20 might). As long as any size change is proportional, it won't mater, but if there were a 512x400 texture, changing it to 512x512 would indeed mess up the way it wraps around the associated model.

 

There shouldn't be any textures like that in the first place, however.

 

Here is the list of the "wierd" textures. what should we do with these?

 

* 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

"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

Link to comment
Share on other sites

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

 

This one can just be shrunk to 512x512.

 

The others I'll have to look at. The bc_ one is baddcog's; perhaps he can comment on that.

 

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

 

This one can be safely enlarged to 1024x1024.

 

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

 

This is for quite a small model; it could be shrunk to 64x512 without problem.

 

The other two models/darkmod/props/textures/corner_brace_rust.tga and * models/darkmod/props/textures/grammo2_d.tga, are quite awkward. I'll have to look at the models themselves.

Link to comment
Share on other sites

about: models/darkmod/props/textures/table_medallion.tga

This one can be safely enlarged to 1024x1024.

 

I think it can also safely shrunk to 512x512, because it won't loose much details, and enlarging to 1024x1024 won't make it more detailed, either :)

 

Btw Springheel and flander, thanx for looking into this!

"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

Link to comment
Share on other sites

The models look just fine, as I thought there seem to be no texture misplacements. Only the grammo turns out completely black, I probably did something there.

 

The grammo and the one using corner_brace_rust.tga (not sure which model that is) are the only ones at risk. The grammo is .ase so I can't help there.

Link to comment
Share on other sites

You don't change the model to point directly to the texture. The model points to the material shader, which will automatically load the .dds version as long as the name doesn't change.

 

The problem is that the dimensions of that image are so skewed that changing it is very likely to affect the appearance of the model (the texture will likely be misaligned). Since it is an .ase file, I can't edit the uvmap to fix it.

Link to comment
Share on other sites

I did a search of every material file, and I can't find "models/darkmod/props/textures/corner_brace_rust" listed anywhere. Is it possible it isn't even used?

Link to comment
Share on other sites

You don't change the model to point directly to the texture. The model points to the material shader, which will automatically load the .dds version as long as the name doesn't change.

 

Oops that was stupid, totally forgot that.

 

Ok this is what I did now:

Placed the stretched dds as grammo_dds in darkmod\dds\models\darkmod\props\textures.

Copied the textures/magnesius/grammo2 material piece renamed it to textures/magnesius/grammo3 and changed the diffusemap to grammo_dds.

Copied the grammo3.ase model and changed

*BITMAP "//base/textures/magnesius/grammo2" to

*BITMAP "//base/textures/magnesius/grammo3" and saved it as grammo4.ase

 

Here's a screenshot of both in game.

 

On the right tga (384*512) and on the left the dds (512*512)

post-2289-1226571978_thumb.jpg

Link to comment
Share on other sites

I see no clear difference between the two. The dds version should be quite sharper than the other, at the very least. Did you delete or rename the .tga version when loading the dds version? Are we sure D3 doesn't default to loading the .tga if it is available?

Link to comment
Share on other sites

Stretching the image won't do any harm to the model, as the U/V coordinates are saved as fractions of the image dimension: [0..1],[0..1], which won't change if you scale the image in whatever direction. The image quality is likely to change, but as we're scaling upwards there should be no visible difference.

Link to comment
Share on other sites

Stretching the image won't do any harm to the model, as the U/V coordinates are saved as fractions of the image dimension: [0..1],[0..1],

 

Oh, really? I wasn't aware of that. That's good to know.

Link to comment
Share on other sites

I did a search of every material file, and I can't find "models/darkmod/props/textures/corner_brace_rust" listed anywhere. Is it possible it isn't even used?

 

That is likely, we never cleaned of unused stuff (we just didn't include it into a relase package so far). Maybe people can see why I argue against "just include models/*.* and be done" :)

"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

Link to comment
Share on other sites

Stretching the image won't do any harm to the model, as the U/V coordinates are saved as fractions of the image dimension: [0..1],[0..1], which won't change if you scale the image in whatever direction. The image quality is likely to change, but as we're scaling upwards there should be no visible difference.

 

Yeah, that's what I was thinking of, didn't knew how to explain it.

Link to comment
Share on other sites

Maybe people can see why I argue against "just include models/*.* and be done"

 

Just because it isn't used by a model is not necessarily a reason not to include it.

Link to comment
Share on other sites

I found another naming convention: "foo_bmp.tga" which seems to stand for "bumpmap". We seem to have two files with that name.

 

In any event, I am now preparing to start the script conversion of specular and diffusemaps.

 

The plan is:

 

* run the script for the speculars

* check in the new DDS files

* somehow figure out how to upload these TGAs to the hires

* check in the deletion of the TGA files

 

* run the script for the diffusemaps

* check in the new DDS files

* somehow figure out how to upload these TGAs to the hires

* check in the deletion of the TGA files

 

That will take a long time, tho, esp. the file uploads. Should I do this before the weekend?

 

I think it would be much better if spar could run the script, his network access to the repo is magnitudes faster.

"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

Link to comment
Share on other sites

*knockknock* hello?

"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

Link to comment
Share on other sites

I'd say the specular maps are a good task to start and test your script, if that's what you want to hear?

 

As for the upload - unless you have bandwidth considerations (like Fidcal), I'd still suggest that you control the upload yourself. It's difficult for somebody else to judge whether your script produced the correct results or not.

Link to comment
Share on other sites

I'd say the specular maps are a good task to start and test your script, if that's what you want to hear?

 

Yeah, basically yes :)

 

As for the upload - unless you have bandwidth considerations (like Fidcal), I'd still suggest that you control the upload yourself. It's difficult for somebody else to judge whether your script produced the correct results or not.

 

My main concern was that I can't test the result myself, either. I only have one computer running the mod and little time and I might miss a lot of possible problems.

 

(Not to mention the "multiple-hours upload" time it will take)

 

So I think I am just gonna do the speculars and then people test it and we fix any problem that crops up.

"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

Link to comment
Share on other sites

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

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...