Jump to content
The Dark Mod Forums

Convert normal maps to RGTC?


duzenko
 Share

Recommended Posts

Now that we have upgraded the renderer to GL3.1 it makes sense to convert normal map tga's to DDS's.

Not only RGTC is better than DXT in quality per compressed megabyte of VRAM but being pre-compressed it will also load faster at map start.

I think we can automate conversion using the integrated DDS writer.

 

  • Like 1
Link to comment
Share on other sites

I only tested on the 2.08 exes that Duzenko made available to test, and on those it works, I see no visual difference (with one exception, see below...) nor performance difference with normal map compression 1 or 2, what I see is a huge reduction in GPU memory usage, with it off the scene I was on was using 1389 MB of VRAM with with on either on 1 or 2 it fall down to 878 MB, that's the difference between a older 1GB GPU being able to play the game well or not, on mine GPU that has 8GB of VRAM I could, right now, very well play with compression off.

... with RGTC enabled the water in Volta 2, at the beginning, looks even more broken, now it shows a reflection with the colors totally messed up, man that water shader does need to be reworked.

p.s I tested on 2.07 now and it worked, what i did was start Volta 2 went in-game and only there change the svar, on the menu I saw no difference, I assume that most be because the menu does not use any normal maps. 

Edited by HMart
  • Like 2
Link to comment
Share on other sites

3 hours ago, HMart said:

p.s I tested on 2.07 now and it worked, what i did was start Volta 2 went in-game and only there change the svar, on the menu I saw no difference, I assume that most be because the menu does not use any normal maps. 

Sorry about that. I plan to fix other things first. Worst case it might have to wait till the beta phase

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

I believe there were two main reasons:

1) Multiple team members complained about compression artifacts in pre-compressed normal maps

and opted to not use them. This also had the benefit of faster mission loading.

2) Pre-Compressed Normal maps cannot use image program functions like addnormals and heightmap so

they were seen as potential stumbling blocks for material re-use workflows which were the main source of

asset variation early in the mod

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Point 1 is still valid today. DXT5 makes normalmaps look more blurry and there are artifacts both for simple flat surfaces and more complex patterns. And the DXT5nm mode looks wrong and is unusable.

Edited by peter_spy
Link to comment
Share on other sites

I suppose for this we need to convert existing materials and generate new dds's for each use of image function

I understand this is not trivial but it would be a feel-good thing to do.

Not only it would save on VRAM but also on load speed (pk4 decompression and mipmap generation)

Moreover, textures can be loaded in parallel via PBO + background CPU thread.

Link to comment
Share on other sites

19 hours ago, nbohr1more said:

1) Multiple team members complained about compression artifacts in pre-compressed normal maps and opted to not use them.

But now normal maps are compressed with some DXT5 variation when they are uploaded to OpenGL. Does it mean that most of the players see those exact artifacts right now?

Link to comment
Share on other sites

Right. There was a great deal of FUD around normal map compression early in the mod development.

There are threads where devs and players mistook the lowest quality normal map compression with the highest.

There are threads where devs and players found their drivers didn't support one or another normal map compression form.

I think it wasn't until 3yrs ago that we became aware that our "image_useNormalCompression" is forcing conversion to normal map compression

rather than optionally using pre-compressed normal maps when available.

RGTC will improve image quality and lower texture memory consumption.

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

19 hours ago, stgatilov said:

But now normal maps are compressed with some DXT5 variation when they are uploaded to OpenGL. Does it mean that most of the players see those exact artifacts right now?

Since image_useNormalCompression is currently 1 then the new players will likely have their normal maps compressed to DXT5 (or whatever format we use) in runtime on map load.

I'm not sure what was the default value for image_useNormalCompression historically and what might be saved to local .cfg's for older installations.

Link to comment
Share on other sites

Btw. Not sure if you ever contacted Justin, but I remember he's been working on a "virtual texture" solution which basically a texture streaming thing. That should speed up loading time immensely, whether with DDS normalmaps or TGA.

 

Edited by peter_spy
Link to comment
Share on other sites

36 minutes ago, peter_spy said:

Btw. Not sure if you ever contacted Justin, but I remember he's been working on a "virtual texture" solution which basically a texture streaming thing. That should speed up loading time immensely, whether with DDS normalmaps or TGA.

 

The only thing missing there is the source code

Link to comment
Share on other sites

I think it would be great if artists could check how RGTC compression affects normal maps and write down the worst cases.

The RGTC compression should be somewhat better that hacked-DXT5 which TDM uses now, and significantly better than standard DXT5. Recall that RGTC is enabled by image_useNormalCompression 2.

Link to comment
Share on other sites

At first glance, normals on models look fine, even if you substitute diffuse texture with solid color. And the memory use is significantly lower. But when you use showprimitives, there is this warning that says R_BitsForInternalFormat: bad internalFormat: 36285

Another thing is that something changes with how cubemap reflections are rendered. I have a cubemap overlaid on top of my frobabble models, and before it looked like this:

obraz.png

And now it looks like this:

obraz.png

  • Like 1
Link to comment
Share on other sites

2 hours ago, peter_spy said:

Another thing is that something changes with how cubemap reflections are rendered. I have a cubemap overlaid on top of my frobabble models, and before it looked like this:

 

It's easy to fix the cubemap shader to support RGTC

  • Like 1
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.

 Share


  • Recent Status Updates

    • Gilkar

      When I was a young man my father was so ignorant I could hardly stand to have him around. As I grew older I was amazed at how much the old man had learned in such a short time.
      · 0 replies
    • jaxa

      RTX 3090 Super, RTX 3070 Ti 16 GB, RTX 2060 12 GB
      https://wccftech.com/nvidia-launching-rtx-3090-super-rtx-3070-ti-16gb-and-rtx-2060-12gb-by-january-2022/
      · 0 replies
    • duzenko

      CPU benchmark time - compiling DarkRadiant (2nd run)
      i5 8600K 6C/6T@4.4GHz DDR4 2x2133MHz 9MB cache
      Parallel builds: 1. 3:57 Parallel builds: 6 (default). 2:28 r5 1600AF 6C/12T@3.3GHz DDR4 1x2666MHz 16 MB cache, temp folder on HDD
      Parallel builds: 1. 5:05 Parallel builds: 4. 2:47 Parallel builds: 6. 2:55 Parallel builds: 12 (default). 2:57
      · 6 replies
    • nbohr1more

      Status updates are back so it is also a good time to return to contests!
      https://forums.thedarkmod.com/index.php?/topic/21095-christmas-connections-contest-2021
       
      · 0 replies
    • freyk

      Having seen the new scifi stuff from bladeghost/scythwraith, want to continue the cyberpunk project. Only one problem, can't map.
      · 1 reply
×
×
  • Create New...