Jump to content
The Dark Mod Forums

Updated carpet textures


AluminumHaste

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.

Why???

 

USLad0i.png

 

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

9linKRA.png

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
using GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT.

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.

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

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 0 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...