Jump to content
The Dark Mod Forums

Converting model .tgas to .dds


Springheel

Recommended Posts

The missing cases are materials which have neither qer_editorsetting, nor diffusemap (instead they have a "blend diffusemap" "map ..." in a block) and thus the script needs to fix this and generate the image.

Ohh, I get you. Cool that sounds like a simple case to trap.

 

I can do the counting with the script, but what would be helpful is if you can load SL in f.i. Doom3 and tell me if D3 complains about anything in the def files. Or if DR loads SL and the complains that some _ed.jpg file is missing?

Yep that's what I'll be seeking to do.

 

Is it sure that DR really uses the .JPG files, tho?

99% sure, but I'll double check it. I even got it to show me a DDS _ed version in a test.

 

Sure, I'd look at that list if you produce it.

Link to comment
Share on other sites

  • Replies 143
  • Created
  • Last Reply

Top Posters In This Topic

I can confirm that DarkRadiant is able to load JPG files.

 

Sneaksie:

 

http://bloodgate.com/mirrors/tdm/beta/size.zip

 

username: betatesters

password: tearful

 

The archive contains two files, TGA files listed by size (all) and listed by size but not the _local ones (as I dimly remember these don't work as DDS).

 

Guess working from the biggest ones backwards gives the biggest benefit.

 

Edit: Just in case I forget how I created them:

 

find -name "*.tga" -exec du -b '{}' \; | sort -g >size_all.txt
find -name "*.tga" -exec du -b '{}' \; | grep -v '_local' | sort -g >size.txt

"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 found another problem, someone named editor materials "_editor" and my script turned that into "_editor_ed":

 

te@te-laptop:~/.doom3/darkmod$ grep "_editor.*_editor" materials/*
materials/tdm_door.mtr:    qer_editorimage textures/darkmod/door/frame/arched_heavy01_frame_editor_ed
materials/tdm_sky.mtr:    qer_editorimage textures/darkmod/nature/skybox/starry1_moon_editor
materials/tdm_sky.mtr:    qer_editorimage textures/darkmod/nature/skybox/starry1_moon_full_editor
materials/tdm_sky.mtr:    qer_editorimage textures/darkmod/nature/skybox/starry1_moon_quarter_editor
materials/tdm_sky.mtr:    qer_editorimage textures/darkmod/nature/skybox/starry1_moon_gibbous_editor
materials/tdm_sky.mtr:    qer_editorimage textures/darkmod/nature/skybox/starry1_moon_crescent_editor
materials/tdm_sky.mtr:    qer_editorimage textures/darkmod/nature/skybox/starry1_moon_full_editor
materials/tdm_water.mtr:        qer_editorimage textures/water_source/w_c_editor
materials/tdm_water.mtr:        qer_editorimage textures/water_source/w_c_editor
materials/tdm_water.mtr:        qer_editorimage textures/water_source/w_c_editor
materials/tdm_water.mtr:        qer_editorimage textures/water_source/w_c_editor
materials/tdm_water.mtr:        qer_editorimage textures/water_source/w_c_editor
materials/tdm_water.mtr:        qer_editorimage textures/water_source/w_c_editor
materials/tdm_water.mtr:        qer_editorimage textures/water_source/w_c_editor
materials/tdm_water.mtr:        qer_editorimage textures/water_source/t_editor
materials/tdm_water.mtr:        qer_editorimage textures/water_source/neon_editor
materials/tdm_water.mtr:        qer_editorimage textures/water_source/b1_editor
materials/tdm_water.mtr:        qer_editorimage         textures/water_source/water_overlay_editor

 

Fixing this 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

Link to comment
Share on other sites

  • 2 weeks later...

@Tels: combing through a bit more I found an exception for the script (assuming you still want these?)

 

textures/darkmod/stone/natural/rock_grey_dark

textures/darkmod/stone/natural/rock_grey_dark_rough

 

They're basically same texture, differing only in bumpmap. Since the script doesn't know this, it of course assumed a rock_grey_dark_ed existed; instead they both use rock_grey_dark_rough_ed. I've fixed that by hand and am about to upload the text fix.

 

Then... I tried the stone/sculpted directory. :blink: By about the tenth SHADER NOT FOUND I threw in the towel; it looks like _ed versions were not generated (probably due to the use of blend diffusemap as you mentioned).

 

 

PS: anyone else think we should split this off into it's own "Editor file script" (or whatever) thread? We really got the topic (model textures going to DDS) off track.

Link to comment
Share on other sites

Then... I tried the stone/sculpted directory. :blink: By about the tenth SHADER NOT FOUND I threw in the towel; it looks like _ed versions were not generated (probably due to the use of blend diffusemap as you mentioned).
Most of the textures in stone/sculpted (and probably some others too) should not use editor images generated out of the diffuse map anyway, since most of the character of the textures comes from the normal map. I already made separate editor images for my stone/sculpted textures, are they still there?
Link to comment
Share on other sites

Oh, right! Like that one statue that shows a normalmap because that is how it shows in game (it is otherwise just a stone tex)? Argh, I would bet they were 'cleaned up' by the script.

 

@Tels: well I guess that's one more set of exceptions. That's gonna have to be one self-aware script by the time it's done. ;)

Link to comment
Share on other sites

Oh, right! Like that one statue that shows a normalmap because that is how it shows in game (it is otherwise just a stone tex)? Argh, I would bet they were 'cleaned up' by the script.

 

@Tels: well I guess that's one more set of exceptions. That's gonna have to be one self-aware script by the time it's done. ;)

 

If the correct "qer_editorimage" parameters were set, the script should have left these alone. It only creates new ones (or it actually should) when they are missing.

 

I'll have a look tonight.

"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

  • 2 months later...

Tels, it seems like you deleted quite a few tga editor images from the stone/sculpted folder, there is a lot of "shader not found" going on. Would you mind putting them back (and possibly converting them to jpg as well)?

Link to comment
Share on other sites

Tels, it seems like you deleted quite a few tga editor images from the stone/sculpted folder, there is a lot of "shader not found" going on. Would you mind putting them back (and possibly converting them to jpg as well)?

 

Heh, that was 2 months ago :o:blush:

 

I would put them back, if I could remember which one that were (and why I deleted them). Do you have an easy way to find out or can tell me how to find that out?

 

Edit: Why shader not found? Wouldn't DR then just use the real image instead of the editor version?

"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 would put them back, if I could remember which one that were (and why I deleted them). Do you have an easy way to find out or can tell me how to find that out?
There are at least two ways to find out:

SVN log

Open DarkRadiant and go through the shaders

 

Edit: Why shader not found? Wouldn't DR then just use the real image instead of the editor version?
There are editor images defined in the materials, so DarkRadiant tries to uses them. The diffuse maps would be used if there are no editor images defined in the material or in lit mode.
Link to comment
Share on other sites

There are at least two ways to find out:

SVN log

 

The log is rather long and I don't see a way to get me a list of "file deletions", e.g. the log only lists the entries. And I am sure none of my entries will read "delete editor images of stone shaders" :)

 

Currently I am still waiting for svn even to finish writing the full log to a file...

 

Open DarkRadiant and go through the shaders

 

Would, if I knew which ones...

 

There are editor images defined in the materials, so DarkRadiant tries to uses them. The diffuse maps would be used if there are no editor images defined in the material or in lit mode.

 

Me gets the feeling you mean the shaders where the diffuse is of all the same file, but the editor images show some outlines that are added via normalmaps.

 

Still trying to figure out which files were deleted when, so I can restore them. Very probably my script overwrote the editor files.

 

Hm. If the stone material shader was used in a map; my package script would complain about the missing file name. So, if you can make a map with all the materials who have missing shaders, I can use a script to quickly pull up all the file names.

"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 relevant changes seem to be these:

 

------------------------------------------------------------------------

r5476 | tels | 2008-05-30 10:47:47 +0200 (Fri, 30 May 2008) | 1 line

 

fix check-materials.pl

------------------------------------------------------------------------

r5475 | tels | 2008-05-30 01:41:51 +0200 (Fri, 30 May 2008) | 1 line

 

update editorimages with the proper size (294 jpgs)

------------------------------------------------------------------------

r5474 | tels | 2008-05-30 01:08:53 +0200 (Fri, 30 May 2008) | 1 line

 

further fixes to check-materials.pl

------------------------------------------------------------------------

r5473 | tels | 2008-05-30 00:52:09 +0200 (Fri, 30 May 2008) | 1 line

 

a few manual fixes to material files

------------------------------------------------------------------------

r5472 | tels | 2008-05-30 00:02:08 +0200 (Fri, 30 May 2008) | 1 line

 

make the size argument actually work for devel/check-materials.pl

------------------------------------------------------------------------

r5471 | tels | 2008-05-29 23:56:45 +0200 (Thu, 29 May 2008) | 1 line

 

fixups to devel/check-materials.pl

------------------------------------------------------------------------

r5470 | komag | 2008-05-29 23:56:22 +0200 (Thu, 29 May 2008) | 1 line

 

--

r5462 | tels | 2008-05-29 21:20:31 +0200 (Thu, 29 May 2008) | 1 line

 

remove old editor TGA images

 

Still trying to figure out what was exactly affected.

 

Edit: I can't figure it out. "devel/check-materials.pl" does not report anything out of usual (except tons of other missing things). Having a definite list of materials that are affected would really help...

 

Switching to my laptop, can't run DR on my PC. standby...

"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 don't know if this is all of them, but many are in stone/sculpted.

 

After reverting back to revision 5400, "moving" all the added files,, then updatnig again etc. I now added back in 33 _ed files. The original files were TGAs, so I converted them to JPG while I was there.

 

Sorry again :blush:

 

Adding (bin) sculpted/carved_design_bones01_ed.jpg

Adding (bin) sculpted/carved_design_bones02_ed.jpg

Adding (bin) sculpted/carved_design_bones02_left_ed.jpg

Adding (bin) sculpted/carved_design_bones02_right_ed.jpg

Adding (bin) sculpted/carved_design_bones_skull_ed.jpg

Adding (bin) sculpted/carved_design_diamonds01_ed.jpg

Adding (bin) sculpted/carved_design_skull01_ed.jpg

Adding (bin) sculpted/carved_design_snakes_ed.jpg

Adding (bin) sculpted/carved_design_snakes_skull_ed.jpg

Adding (bin) sculpted/engraved_tile_cup01_ed.jpg

Adding (bin) sculpted/engraved_tile_ovals_ed.jpg

Adding (bin) sculpted/engraved_tile_star_ed.jpg

Adding (bin) sculpted/engraved_tile_x_ed.jpg

Adding (bin) sculpted/sarcophagus_cup_hammer01_ed.jpg

Adding (bin) sculpted/sarcophagus_swords_shield01_ed.jpg

Adding (bin) sculpted/sarcophagus_warrior01_ed.jpg

Adding (bin) sculpted/sarcophagus_wings01_ed.jpg

Adding (bin) sculpted/tile_diamond_trapezoid_ed.jpg

Adding (bin) sculpted/tile_empty_square_ed.jpg

Adding (bin) sculpted/tile_empty_trapezoid_ed.jpg

Adding (bin) sculpted/trapezoid_tile_1x1_ed.jpg

Adding (bin) sculpted/trapezoid_tile_2x1_ed.jpg

Adding (bin) sculpted/trapezoid_tile_4x1_ed.jpg

Adding (bin) sculpted/trapezoid_tile_8x1_ed.jpg

"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

Thanks! :)

 

No problem, afterall it was very likely me who caused it. The check_materials.pl script really needs an overhaul :)

"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 log is rather long and I don't see a way to get me a list of "file deletions", e.g. the log only lists the entries.

For future reference, use the -v option ("verbose") with command-line svn to list the added/modified/deleted files in each revision: svn log -v > svnlog.txt

 

Then you can search through that file to find the paths you're looking for and see which revisions they were changed in.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

For future reference, use the -v option ("verbose") with command-line svn to list the added/modified/deleted files in each revision: svn log -v > svnlog.txt

 

doh! :blush: 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

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

    • 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.
      · 6 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
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...