Jump to content
The Dark Mod Forums

Recommended Posts

Posted
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.

 

Posted
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
Posted
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.

 

Posted
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

RNnvREc.png

Both fail to work in the game.

I always assumed I'd taste like boot leather.

 

Posted
5 minutes ago, AluminumHaste said:

I tried both, BC5u and BC3n
Both fail to work in the game.

It must be BC5u ("unorm").

I think @OrbWeaver tried to load precompressed RGTC in TDM recently and failed, and after that we fixed something.
Are you trying 2.11 beta?

Posted

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.

WWM8YOE.png

I always assumed I'd taste like boot leather.

 

Posted

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.

Posted

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.

 

Posted

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.

 

Posted
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.

Posted

Why would it be different between tools? It's a standard is it not?

Man, Gimp's DDS plugin hasn't been updated since 2013?!?!?

 

I always assumed I'd taste like boot leather.

 

Posted

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.

 

Posted
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.

Posted

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.

 

Posted
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.

 

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

    • MayheM

      It would be nice to have a link to the forum thread of a mission in download section, rather than having to search for it manually, like on Thief Guild.
      · 1 reply
    • taffernicus

      Anaglypta , floral and damask wallpaper look great in older homes 
      It’s rare to see anyone using “shader not found” wallpaper in their house

       
      · 0 replies
    • Ansome

      Terribly difficult juggling map designing with work, but I'm still alive and chipping away at something very special. I'm actually making a collaboration of sorts with a friend, I make the map itself and he acts as my "Chief Scope Creep Consultant" that checks in every so often to make sure this project isn't getting out of hand. It's a good system!
      · 1 reply
    • JackFarmer

      We don't need artificial intelligence; we need artistic intelligence. 
      Ralf Hütter, Kraftwerk
      · 6 replies
    • taaaki

      The post editor for the dark themes should be working again. Apologies for the inconvenience.
      · 1 reply
×
×
  • Create New...