Jump to content
The Dark Mod Forums

Normalmap artefacts with image_useNormalCompression 1


Dragofer

Recommended Posts

I've noticed that some textures with normalmaps now have a blotchy appearance in 2.09 if viewed from a sharp angle:

Untitled.thumb.jpg.a19de28230d742d03efa15db036c9841.jpgUntitled2.thumb.jpg.d3d328b8448256613d2772d28d08c746.jpg

The problem disappears if I either:

  • comment out the normalmap in the material definition
  • set image_useNormalCompression 0
  • revert to TDM 2.08

It affects for example textures/darkmod/wood/boards/polished_01, but not textures/darkmod/stone/brick/blocks_large_sandstone.

This is on a PC with Intel UHD 630, Intel i5-9400F. Got a console log here: 209_splotchy.txt

Link to comment
Share on other sites

How does it look on a different machine (e.g. with NVIDIA GPU) ?

Most likely this is the artefact of RGTC compression.
If this problem does not happen on other GPUs, then it is a problem of how Intel driver compresses to RGTC.

It is hard to see on a screenshot how bad the problem is, especially when "good" screenshot is not provided.

The most important question is: will we have to live with such problem if we compress all normal textures to RGTC, as we plan to do for 2.10 ?
To answer this question, you have to take some offline tool (most likely Compressonator) and convert this normal map to DDS. Then ensure this DDS is loaded in game (I'm not sure whether engine already loads DDS automatically or not) and check how it looks.
 

Link to comment
Share on other sites

17 hours ago, stgatilov said:

To answer this question, you have to take some offline tool (most likely Compressonator) and convert this normal map to DDS. Then ensure this DDS is loaded in game (I'm not sure whether engine already loads DDS automatically or not) and check how it looks.

Converting that normal map to .dds with DXT1 and mipmaps with GIMP has resolved the issue:ogda_demomap_2021-03-11_09_30_03.thumb.jpg.8f636efa075d933aab44b8f4e120b1bc.jpg

To confirm that the engine does in fact load .dds normalmaps, I also converted, renamed and assigned some very noticeable curtain normalmaps to this wood floor and saw no difference compared to the original .tga curtain normalmaps. The paintings are untouched and still have the splotchiness.

Also, I noticed that current SVN (ca. rev 9216) doesn't have this issue.

 

18 hours ago, stgatilov said:

How does it look on a different machine (e.g. with NVIDIA GPU) ?

Will have to see when I get a chance. But there's definitely something fishy with intel GPUs, map loading times are really long in 2.09 with this GPU and they're shortened to one quarter by disabling that normal map compression cvar.

Link to comment
Share on other sites

2 hours ago, Dragofer said:

Converting that normal map to .dds with DXT1 and mipmaps with GIMP has resolved the issue:

Well done.
Although I have a feeling that DXT1 and RGTC are different compression formats.

I think RGTC is also called BC5U.

UDPATE: I guess it is either BC5 or ATI2N_XY...
Damn this stupid nomenclature!

Link to comment
Share on other sites

7 hours ago, stgatilov said:

Well done.
Although I have a feeling that DXT1 and RGTC are different compression formats.

I think RGTC is also called BC5U.

UDPATE: I guess it is either BC5 or ATI2N_XY...
Damn this stupid nomenclature!

BC5/ATI2 (3Dc) unfortunately doesn't seem to work regardless of whether I generate mipmaps. The normalmap is missing ingame (flat appearance) and the console writes "Failed to get bindless texture handle:".

If I set r_useBindlessTextures 0 the texture becomes dark except for where a light source lights it up (no ambient light illumination). I've seen that before when the normalmap can't be loaded.

 

These are the DDS export options in GIMP:

image.png.ee0dda3751a837598b958513f4c44b3f.png

The appearance with r_useBindlessTextures 1 is as in the previous message, and this below is what it looks like when I set r_useBindlessTextures 0:

ogda_demomap_2021-03-11_19_28_45.thumb.jpg.5b4b953efaea0e1f10f97b20e1bc316a.jpg

Btw, I found that increasing anisotropy filtering in graphics settings makes the artefacts less severe (as can be seen on the ceiling in this shot).

Link to comment
Share on other sites

Oof.. Is the new backend not RGTC capable?

@cabalistic ?

Quote

Also, I noticed that current SVN (ca. rev 9216) doesn't have this issue.

Is this true if you copy the glprogs directory from tdm_src to your SVN darkmod directory?

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

That map is my testmap from this thread:

 

I didn't make any changes to the wood textures.

For the paitings: the diffuse maps of the paintings where exported with the photoshop nvidia dds plugin with setting BC1 (which equals to DXT1 as stated by the plugin) with production quality. The normal maps where as far as I remember exported with BC3 (equaling to DXT4/DXT5 as stated by the plugin).

If something is wrong with that export method, please let me know so I can fix the paintings. But I hope that's not the case, as the problem also shows on the wood texture.

 

Link to comment
Share on other sites

1 hour ago, nbohr1more said:

Is this true if you copy the glprogs directory from tdm_src to your SVN darkmod directory?

Copying the glprogs folder from darkmod_src to my 2.09 release build made no difference, still splotchy. But on darkmod_svn (assets) there's no problem.

1 hour ago, nbohr1more said:

@Dragofer  can I get a test map? I have never seen this artifact in 2.09 or SVN and I always have normalmap compression enabled.

Sure, as OGDA said it's his paintings demo map. I've already reuploaded my own version because the original version had a small mistake in the folder structure (there's one top level of folders too many) that prevented it from being possible to treat like an FM: https://drive.google.com/file/d/1G4WJY9G5T6hyIn9pM2KINOHD503b9sxS/view?usp=sharing

@OGDA I don't think there's any need for action from your side, to me it looks like it's a problem with a 2.09 change to how TDM handles normalmaps, which seems to break on Intel GPUs.

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

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 2 replies
    • 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
×
×
  • Create New...