View Issue Details

IDProjectCategoryView StatusLast Update
0005307The Dark ModGraphicspublic30.08.2020 13:56
Reportercabalistic Assigned Toduzenko  
PrioritynormalSeveritynormalReproducibilityalways
Status assignedResolutionopen 
Product VersionTDM 2.09 
Target VersionTDM 2.09 
Summary0005307: Accountant 1: machine arrows have black background
DescriptionLoad mission "The Accountant 1" and go to the coordinates from the screenshot. The depicted machinery has some gauges with an arrow that with 2.09 renders with a black background. In 2.08 the background is transparent as it should be, *unless* you set "image_useNormalCompression 2", in which case the same error is visible.

It happens during interaction rendering for the ambient light in both the old and new backend. Given the reproducibility in 2.08, it likely has to do with the normal map compression changes?
TagsNo tags attached.

Activities

cabalistic

cabalistic

21.07.2020 15:41

developer  

duzenko

duzenko

21.07.2020 16:26

developer   ~0012665

Can we fix this on the map level?
tdm_epi_shader_electrical.mtr > transformer_needle_a

The bump stage (blend bumpmap) wants to alpha test which makes no sense

Same applies to transformer_needle_b
cabalistic

cabalistic

21.07.2020 18:49

developer   ~0012666

I guess it depends how many materials are affected, and how complicated it would be to work around it in code.
nbohr1more

nbohr1more

22.07.2020 02:22

developer   ~0012668

I believe that original Doom 3 respects alpha on the bump stage. It can be used to fade away the bump pattern at the edge of a decal (etc).

The needle material doesn't really need it though.
duzenko

duzenko

22.07.2020 07:09

developer   ~0012670

@nbohr1more

You're confusing alpha and alphaTest here, no?
nbohr1more

nbohr1more

22.07.2020 18:29

developer   ~0012671

Hmm, I suspect that this is another variant of "DDS does not work with Image Program functions" since we
always revert whenever someone accidentally converts a glass normalmap to DDS.

Does RGTC mode still respect:

forceHighQuality
highquality
uncompressed

keywords that prevent the on-the-fly conversion or fallback DDS loading?
duzenko

duzenko

22.07.2020 19:06

developer   ~0012672

Gee, @nbohr1more, your hard line breaks keep freaking me out :>

> Hmm, I suspect that this is another variant of "DDS does not work with Image Program functions" since we
> always revert whenever someone accidentally converts a glass normalmap to DDS.

I disagree. The image file in question is a .tga. It has been reported that image-normal-compression somehow affects this bug but I don't feel like bothering with that since I have already found what's causing it and suggested a fix not related to RGTC.
I could speculate that maybe it has something to do with the default alpha the GL spec requires RG format implicitly to generate which is different to what D3 filled in on 24-bit .tga files. But generally I don't care.

To be completely honest it's possible to fix this also on the renderer level, but it will have a side effect potentially causing other glitches somewhere else.

> Does RGTC mode still respect:

>forceHighQuality
>highquality
>uncompressed

> keywords that prevent the on-the-fly conversion or fallback DDS loading?

We don't really have DDS's for normal maps, do we? I can't remember which keyword controls dds/jpg/tga loading and which controls on-the-fly compression. But again I don't care because I assume the render quality difference to be negligible for bumpmaps, especially compared with stock TDM diffuse maps. It's more of a VRAM conservation/load speed choice than anything else.
VanishedOne

VanishedOne

30.08.2020 13:56

developer   ~0012766

Re. alpha in normal maps, I just noticed this in the renderbump docs at https://www.iddevnet.com/doom3/bumpmaps.html

'The alpha channel of the normal map will contain a mask if there were areas in the map that did not directly map to geometry. This can be copied to a diffuse map to use with the alpha test option for per-pixel opacity. Note that if you use the normal map as a template for the specular map, you should explicitly clear or remove the alpha channel, because it will prevent more efficient compression forms from being used.'

So it seems normal (no pun intended) for the internal renderbump tool to produce a normal map with an alpha channel, but as per id's docs you're expected to copy it to diffuse if you want it for alphaTest. It's quite likely not everyone who's used renderbump has actually seen that passage, though.

(The fish I ported from Arx:EoS has an unused normal map that's fully alpha transparent everywhere but the fish's eye; I experimented with it a bit, but I think in the end I packaged it without enabling it in the material decl.)

Issue History

Date Modified Username Field Change
21.07.2020 15:41 cabalistic New Issue
21.07.2020 15:41 cabalistic Status new => assigned
21.07.2020 15:41 cabalistic Assigned To => duzenko
21.07.2020 15:41 cabalistic File Added: ac1_2020-07-21_12.41.06.jpg
21.07.2020 16:26 duzenko Note Added: 0012665
21.07.2020 18:49 cabalistic Note Added: 0012666
22.07.2020 02:22 nbohr1more Note Added: 0012668
22.07.2020 07:09 duzenko Note Added: 0012670
22.07.2020 18:29 nbohr1more Note Added: 0012671
22.07.2020 19:06 duzenko Note Added: 0012672
30.08.2020 13:56 VanishedOne Note Added: 0012766