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

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

    • jaxa

      Does TDM 2.12 add "30" to the list of FPS caps? I accidentally changed mine and had to look up a console command to set it back to 30.
      · 2 replies
    • Skaruts

      Going from DarkRadiant to Trenchbroom feels like going back to the stone age. It's great at geometry (prevents invalid brushes and vertex drifting like no other), but... that's about all. It's terribly underdeveloped. So far behind on so many things...
      Unfortunately it seems to be the only option for my Godot projects, as editors like DR and Hammer are too tied to the engines/games they were made for. (Hammer probably even has a license wall or something, anyway.)
      Sorry, just needed to let this out.
      · 12 replies
    • STiFU

      Any Thief-Fan who also enjoys Soulslikes should give Lies of P a shot. The art direction is sooo incredible! Love it!
      · 2 replies
    • taaaki

      Server definitely still has some issues. I think I've narrowed down where the issue is, so I'll take a proper look after work.
      · 6 replies
  • Create New...