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

    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
×
×
  • Create New...