Jump to content
The Dark Mod Forums

Convert normal maps to RGTC?


duzenko

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.


  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • 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.
      · 4 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
×
×
  • Create New...