Jump to content
The Dark Mod Forums

Updated carpet textures


Recommended Posts

3 hours ago, stgatilov said:

You can use RGTC (BC5) for high-quality normal map with the same size, or DXT1 (BC1) for same quality but 2x less size.

So I tried redoing the beermug normalmap as RTGC, fails.

WARNING:Invalid compressed internal format: models/darkmod/props/textures/cheapbeermug_local

And in game it's all broken.

Tried 3 different options for normal compression (RTGC etc), they all fail.

I always assumed I'd taste like boot leather.


Link to comment
Share on other sites

2 hours ago, AluminumHaste said:

The Nvidia tool says it uses 6:1 compression ratio for dx1, and dx3/5 is 4:1 ratio, which is higher quality as DDS compression is lossy.

Better read the wikipedia article S3_Texture_Compression.
The DXT formats mainly differ by their use case, not by compression/quality tradeoff.

Compression ratio is not a good number to look at:

  • DXT1 gets 6:1 ratio by replacing 16 x 3 bytes (no alpha) with 8 bytes.
  • DXT5 gets 4:1 ratio by replacing 16 x 4 bytes (with alpha) with 16 bytes, out of which 8 bytes are exactly DXT1 for color, and the other 8 bytes are high-quality alpha channel.
  • RGTC gets 2:1 ratio by replacing 16 x 2 bytes (no blue, no alpha) with 16 bytes, which are two high-quality blocks for red and green --- exactly the same quality as in DXT5 alpha block.

So RGTC has 2:1 compression ratio but DXT5 has 4:1 compression ratio.
Does it mean that RGTC-compressed files will be two times larger? 😛

  • Thanks 1
Link to comment
Share on other sites

5 hours ago, stgatilov said:

Also I noticed this white line on the testmap:23002917_carpets(2023-01-1510-24-04)(-1415.51312_7934.25).thumb.jpg.852722037e43eb631d85659818840a27.jpg

It looks quite bad from distance, like a 1-pixel aliased line.
Is this an issue in the testmap itself?

Yeah trying to figure that one out also. It doesn't do it with other textures.

I always assumed I'd taste like boot leather.


Link to comment
Share on other sites

4 minutes ago, stgatilov said:

DDS with RGTC data must have FOURCC = "ATI2".
It is also called BC5 I think.

I tried both, BC5u and BC3n


Both fail to work in the game.

I always assumed I'd taste like boot leather.


Link to comment
Share on other sites

Yeah on the latest code

Tried again with BC5u, same error in console about invalid internal compressed format and of course the normalmap isn't working right in game.


I always assumed I'd taste like boot leather.


Link to comment
Share on other sites

I'm afraid the workflows for RGTC normal maps is not well worked out yet.
On the other hand, when the compression format has 4 totally different names, it's no wonder you have problems with tools...

For the cup, you can just save TGA version for now.

For HD carpets, it would be really great to use RGTC or just DXT1 if it looks good enough, since the textures are large.

Link to comment
Share on other sites

Yeah I started redoing them as DX1, they look ok, the round carpet weave is blocky but that's at extreme closeup, not really noticeable in game.

The cup can just use DX1.

I still can't figure out why I'm getting the line between the patches using these textures.

It's very weird. I'll try TGA uncompressed and see if the problem happens still. Maybe it is the Photoshop DDS plugin.

I always assumed I'd taste like boot leather.


Link to comment
Share on other sites

It's really weird, for some reason, DarkRadiant maps a square image (2048px X 2048px) onto a square patch/brush (192x192), and wraps around to the other side of the texture, by like 1-2 pixels.





That white line, is the other side of the texture. If I shift it over a bit, you can see it better.


I always assumed I'd taste like boot leather.


Link to comment
Share on other sites

4 hours ago, stgatilov said:

I think @OrbWeaver tried to load precompressed RGTC in TDM recently and failed, and after that we fixed something.

This was the relevant SVN change:

r9525 | orbweaver | 2021-07-30 21:17:43 +0100 (Fri, 30 Jul 2021) | 11 lines

Use correct format for uploading precompressed ATI2 normal maps

When the 'ATI2' FOURCC is seen in a precompressed DDS file, use the
GL_COMPRESSED_RG_RGTC2 internal format (matching the behaviour of
image_useNormalCompression on uncompressed source images). The legacy code was

This is enough to get plausible looking normal maps with DDS files exported in
3Dc/BC5 format using the GIMP DDS plugin. Not tested with files exported from
any other tools; it is conceivable that other FOURCCs might need handling too.

Note in particular the comment about this only being tested with the GIMP DDS plugin, and that formats used by other tools might need additional changes.

Link to comment
Share on other sites

5 minutes ago, stgatilov said:

Can you share the normal map file?
And note which file it should replace...

Here's the PNG version if you want to convert it yourself to DDS. https://drive.google.com/file/d/1JlpzBtaZhAphCkbASD49V-6qqweCeCFo/view?usp=sharing

Here's my DDS version using GIMP->3DC. https://drive.google.com/file/d/1O7kiBUliAgHi-kvEkEl_8fypEZT7OAVu/view?usp=sharing

Should replace the file of the same name.

I always assumed I'd taste like boot leather.


Link to comment
Share on other sites

6 minutes ago, AluminumHaste said:

Yeah, but this is diffuse map.
Why are you even trying to compress it with RGTC?

Of course if you use it as diffuse texture, you'll get wrong color.

Link to comment
Share on other sites

Ok I think I figured out what's going on, and this is due to me not using the Nvidia tool properly.
It only works properly when you are converting a regular texture to normalmap, then you pick BC5u as format, and image type select Normal Map.


Then it works.
If you then try to take an already existing normal map and resave it as BC5u, that's when it doesn't work.

So sorry I've wasted your time with this, this one is down to my own incompetence.


edit: Nevermind, still doesn't work. I'll just use DX1 this is too annoying.

I always assumed I'd taste like boot leather.


Link to comment
Share on other sites

25 minutes ago, stgatilov said:

So... are you going recommit the normal maps as DXT1 ?...
If it looks OK in-game, then it's not a problem, I suppose.

Committed, let me know if I missed any, I think that's all the normal maps.

I always assumed I'd taste like boot leather.


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.

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

    • MayheM

      Hello, Since this track is originally from TDM,i think it's better to ask here than TTLG. Do you guys have the full version of this ambient track?
      · 2 replies
    • DeTeEff

      Bachelor Mapping Challenge!
      The girlfriend will be away to her mum's place for almost a week, which means more mapping time for me! I'm planning a speed build. Hope it will go my way
      I'm starting by downloading 2.11. Don't know if I'm going to use any fancy new stuff. Just want to crack those itching map muscles that has gone dry and dead since almost a year's worth of no-mapping
      · 4 replies
    • kano

      The cool part of Canonical's Snap, is that my machine can now ray-trace an entire (simple) scene faster than it takes the web browser to start!
      · 5 replies
    • datiswous

      Fm idea (braindump)
      "Experience the life of a mission builder"
      Esentially there are finnished elements placed somewhere in storage in the game and you have to place them in the correct places, build some walls here and there, add guard routes, give them their correct speech lines, etc. Decorate the places.. all in-game. lots of fun.. 😉
      If you do it right in the end you can play the mission.
      (would be even cooler if a thief-ai could play the mission, making it some kind of tower-defence game)
      This first started as an idea for an aquarium builder mission where-in you have to fill an empty aquarium with sand, waterplants, castles water and swimming fish. But above idea is more fun.
      · 4 replies
    • JackFarmer

      Dear ChatGPT, What are The Builders in the Dark Mod?
      The Builders is a popular game mode in the video game community called "Dark Mod," which is a fan-made tribute to the classic "Thief" series of stealth games. In this game mode, players assume the role of builders who construct structures in a dark and ominous environment while trying to avoid detection by patrolling guards.
      The Builders game mode is unique in that it offers players the opportunity to create and design their own levels using the in-game tools and resources provided. Players can experiment with different building materials, construct intricate traps and puzzles, and create their own unique gameplay experiences.
      While The Builders game mode is not an official part of the Dark Mod, it has become one of the most popular and well-loved aspects of the game, thanks to its emphasis on creativity, strategy, and stealth.
      You guys did not know that, did you?
      · 2 replies
  • Create New...