nbohr1more Posted March 11, 2020 Report Posted March 11, 2020 I found the first "color specular: bug (Tears of St Lucia basement): The yellow patch on the ground flickers with r_testSpecularFix enabled. A few other places in this mission have these strange specular patches. Probably attempts to make it look moist? 1 Quote 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...)
Springheel Posted March 11, 2020 Report Posted March 11, 2020 5 hours ago, nbohr1more said: I found the first "color specular: bug (Tears of St Lucia basement): The yellow patch on the ground flickers with r_testSpecularFix enabled. A few other places in this mission have these strange specular patches. Probably attempts to make it look moist? There are no patches in that area that I can see in the map. The closest thing is a dirt decal, but it's on the other side. And the stone texture, textures/darkmod/stone/cobblestones/cobblestone_blue_black, does not have a specular stage. Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps
stgatilov Posted March 12, 2020 Report Posted March 12, 2020 6 hours ago, Springheel said: There are no patches in that area that I can see in the map. The closest thing is a dirt decal, but it's on the other side. And the stone texture, textures/darkmod/stone/cobblestones/cobblestone_blue_black, does not have a specular stage. According to r_showSurfaceInfo, it is 9-th surface in _area123 with material textures/decals/stain01bwet. Somehow, it applies to a triangular part of this floor. It has specularmap textures/decals/stain01b_s.tga, which includes mild orange tones. Although I'm not sure why it looks so strong. Since the specular color is not set explicitly in the material, should the shader assume it is (1 1 1) ? Quote
nbohr1more Posted May 6, 2020 Author Report Posted May 6, 2020 On March 11, 2020 at 11:02 PM, stgatilov said: According to r_showSurfaceInfo, it is 9-th surface in _area123 with material textures/decals/stain01bwet. Somehow, it applies to a triangular part of this floor. It has specularmap textures/decals/stain01b_s.tga, which includes mild orange tones. Although I'm not sure why it looks so strong. Since the specular color is not set explicitly in the material, should the shader assume it is (1 1 1) ? Looking at the material def, I think there is a bug with TWOSIDED_DECAL_MACRO. Quote 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...)
stgatilov Posted May 7, 2020 Report Posted May 7, 2020 11 hours ago, nbohr1more said: Looking at the material def, I think there is a bug with TWOSIDED_DECAL_MACRO. Perhaps it is time to fix it? I have no idea what to do. Except that delete the specularmap line. 9 hours ago, duzenko said: I just stumbled into this, and yes, this does not make sense What does it mean BTW - zero timestamp in this context? It is already fixed. Zero timestamp means that all files inside PK4 were last modified at the beginning of the epoch. Even if you change a file inside and repack it, the game will still think it was modified at the beginning of the epoch and won't notice changes. Quote
nbohr1more Posted May 7, 2020 Author Report Posted May 7, 2020 I converted the specular to black and white with the "makeIntensity" keyword and it cured the flickering but I'm afraid that workaround is only masking a general problem with specular decals. I tried replacing the TWOSIDED_DECAL_MACRO with other decal attributes and still the colored specular decals flicker. Quote 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...)
duzenko Posted May 7, 2020 Report Posted May 7, 2020 4 hours ago, stgatilov said: Perhaps it is time to fix it? I have no idea what to do. Except that delete the specularmap line. Can I help somehow? Quote It is already fixed. Zero timestamp means that all files inside PK4 were last modified at the beginning of the epoch. Even if you change a file inside and repack it, the game will still think it was modified at the beginning of the epoch and won't notice changes. idDeclFile::Reload still checks for zero timestamps. That's what bothered me last night. It reloads all packed materials, at least. Seemingly .def's and .prt's as well. Quote
duzenko Posted May 7, 2020 Report Posted May 7, 2020 On 3/11/2020 at 5:38 PM, nbohr1more said: I found the first "color specular: bug (Tears of St Lucia basement): The yellow patch on the ground flickers with r_testSpecularFix enabled. A few other places in this mission have these strange specular patches. Probably attempts to make it look moist? FWIW I can't repeat it on my side Quote
nbohr1more Posted May 7, 2020 Author Report Posted May 7, 2020 46 minutes ago, duzenko said: FWIW I can't repeat it on my side That is because I fixed the material. tdm_decals_legacy.mtr Broken: textures/decals/stain01bwet { TWOSIDED_DECAL_MACRO qer_editorimage textures/decals/stain01bwet.tga { blend gl_dst_color,gl_zero map textures/decals/stain01b.tga } specularmap textures/decals/stain01b_s.tga } "Fixed" Rev 15923 textures/decals/stain01bwet { TWOSIDED_DECAL_MACRO qer_editorimage textures/decals/stain01bwet.tga { blend gl_dst_color,gl_zero map textures/decals/stain01b.tga } { blend specularmap map makeIntensity(textures/decals/stain01b_s.tga) } } The issue is that this "fix" is probably hiding a general issue with this scenario. If another mapper tries to create a decal with colored specular they will see the bug. 1 Quote 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...)
duzenko Posted May 8, 2020 Report Posted May 8, 2020 15 hours ago, nbohr1more said: That is because I fixed the material. tdm_decals_legacy.mtr Broken: textures/decals/stain01bwet { TWOSIDED_DECAL_MACRO qer_editorimage textures/decals/stain01bwet.tga { blend gl_dst_color,gl_zero map textures/decals/stain01b.tga } specularmap textures/decals/stain01b_s.tga } "Fixed" Rev 15923 textures/decals/stain01bwet { TWOSIDED_DECAL_MACRO qer_editorimage textures/decals/stain01bwet.tga { blend gl_dst_color,gl_zero map textures/decals/stain01b.tga } { blend specularmap map makeIntensity(textures/decals/stain01b_s.tga) } } The issue is that this "fix" is probably hiding a general issue with this scenario. If another mapper tries to create a decal with colored specular they will see the bug. Can you guess what they tried to achieve here? I suspect blending with gl_dst_color is what adds the orange tone since the torch light is yellow Quote
Geep Posted October 5, 2021 Report Posted October 5, 2021 Missing Texture Uncompressed Specular File "stain01b_s.tga" This concerns 2.08, 2.09, and 2.10 dev, and relates to @nbohr1more's May 7, 2020 post in this thread. The "stain01bwet" shader is defined in tdm_textures_base01.pk4/tdm_decals_dirt.mtr as: textures/darkmod/decals/dirt/stain01bwet { DECAL_MACRO translucent twosided noimpact qer_editorimage textures/decals/stain01b { blend gl_dst_color,gl_zero map textures/decals/stain01b.tga } { blend specularmap map makeIntensity(textures/decals/stain01b_s.tga) } } Unfortunately, the file stain01b_s.tga is not included in any of these releases, only stain01b_s.dds, which makeIntensity(...) does not look for (nor should it). So a console complaint. Perhaps someone assumed that the .tga was unneeded, given the .dds, and so it was purged from the distribution. If anyone could provide me with the missing file, I think I can work around the problem for my FM. (The original source, from @SeriousToni in 2008, no longer has a valid link.) And of course a more permanent fix within 2.10 would be great. 2 Quote
nbohr1more Posted October 5, 2021 Author Report Posted October 5, 2021 stain01b_s.tga 1 hour ago, Geep said: Missing Texture Uncompressed Specular File "stain01b_s.tga" This concerns 2.08, 2.09, and 2.10 dev, and relates to @nbohr1more's May 7, 2020 post in this thread. The "stain01bwet" shader is defined in tdm_textures_base01.pk4/tdm_decals_dirt.mtr as: textures/darkmod/decals/dirt/stain01bwet { DECAL_MACRO translucent twosided noimpact qer_editorimage textures/decals/stain01b { blend gl_dst_color,gl_zero map textures/decals/stain01b.tga } { blend specularmap map makeIntensity(textures/decals/stain01b_s.tga) } } Unfortunately, the file stain01b_s.tga is not included in any of these releases, only stain01b_s.dds, which makeIntensity(...) does not look for (nor should it). So a console complaint. Perhaps someone assumed that the .tga was unneeded, given the .dds, and so it was purged from the distribution. If anyone could provide me with the missing file, I think I can work around the problem for my FM. (The original source, from @SeriousToni in 2008, no longer has a valid link.) And of course a more permanent fix within 2.10 would be great. Both of these are Doom 3 textures from pak004.pk4 I don't see any SVN history where we committed a TGA version only the DDS version. I guess we can convert it to TGA and upscale it a little. Here is a converted file: stain01b_s.tga Heh! That would explain why makeIntensity would cure the flicker. It just kills the specular texture. 1 1 Quote 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...)
OrbWeaver Posted October 6, 2021 Report Posted October 6, 2021 18 hours ago, nbohr1more said: Both of these are Doom 3 textures from pak004.pk4 That's a potential copyright issue, isn't it? Or were there particular textures included with Doom 3 which were released under an open license when the D3 engine itself became open source? Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts
Geep Posted October 6, 2021 Report Posted October 6, 2021 (edited) In the "be careful what you wish for" category, I added that file to my FM's /textures/decals/, and now I've got the flickering on my bar top (of a tavern_bar01 model). Sigh I'm guessing that when the DDS is created it munges the surface normals, and they remain munged when converted backto TGA. Although I guess there's also a 3 color issue, which is why MakeIntensity had to be used. Edited October 6, 2021 by Geep Quote
Geep Posted October 6, 2021 Report Posted October 6, 2021 Maybe @SeriousToni's work was to create a variant stain pattern (with the same filename) to avoid copyright infringement? Dunno. Quote
nbohr1more Posted October 6, 2021 Author Report Posted October 6, 2021 23 minutes ago, OrbWeaver said: That's a potential copyright issue, isn't it? Or were there particular textures included with Doom 3 which were released under an open license when the D3 engine itself became open source? The DDS uses an alternate image that does not exactly match the Doom 3 original. I guess the only concern might be the name of the texture but it is so generic that I somehow doubt we would be in trouble? Quote 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...)
Geep Posted October 6, 2021 Report Posted October 6, 2021 (edited) BTW, the post between SeriousToni and @Springheel was from 2013, not 2008. Here: As I said above, the dropbox links are no longer good. But there is a reference to FM "Chalice of Kings", so maybe better (non-infringing, non-flickering) versions of these 2 variant files (diffuse & specular) could be had from there? EDIT: No custom textures in TD2:Chalice of Kings. Edited October 6, 2021 by Geep Quote
Geep Posted October 6, 2021 Report Posted October 6, 2021 Since the existing (flickering) cure is worse than the (dmap warning) disease, I'm reverting back to life without a stain01b_s.tga, for now. Quote
Geep Posted October 6, 2021 Report Posted October 6, 2021 Hmm, when I said above, "I'm guessing that when the DDS is created it munges the surface normals, and they remain munged when converted backto TGA", I was confused. That doesn't apply to a specular map, only to a normal/bump map (which is not used in this shader). Quote
Geep Posted October 6, 2021 Report Posted October 6, 2021 I tried converting the tga to b&w with lens blur and adjustments to brightness/contrast. Probably too bright, so it became like a sheet of glass in an experimental FM. But then it immediately became obvious that the "flickering" was just plain old z-fighting. I'm seeing some evidence that the tavern_bar01 model (even if not custom scaled) incorporated instances of this stain decal in the same plane as the wood bar top surface. Maybe at one time this was ok to do, but not now? So if you wanted to use specular as intended here, only correcting the model (e.g., in blender), to put space between the wood surface and stain, would do it. Sorry, no can do myself. (Or give up on specular & return to leaving out the .tga file) Quote
nbohr1more Posted October 7, 2021 Author Report Posted October 7, 2021 Yes, it seems that either specular of itself or in combination with surface normals is changed enough since 2.05 that this texture is very prone to z-fighting. It should be possible to fix with a high polygonOffset or privatePolygonOffset value but it doesn't seem to work in my tests. Perhaps these keywords require a dmap? (Not eager to do a bunch of dmap iterations to find out.) Hmm... maybe I need to disable bindless textures... Quote 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...)
Geep Posted October 7, 2021 Report Posted October 7, 2021 That sounds beyond what I can help with. Good luck Quote
SeriousToni Posted October 11, 2021 Report Posted October 11, 2021 I'm currently really busy so I'm not sure if I understood correctly what you discussed: Do you need the textures from the dropbox links still? I can have a look in my backup files then. Just ping me here again if that is the case. Quote "Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager
nbohr1more Posted October 13, 2021 Author Report Posted October 13, 2021 I moved this discussion out of the 2.08 Beta thread Related bug trackers: https://bugs.thedarkmod.com/view.php?id=5044 https://bugs.thedarkmod.com/view.php?id=5325 1 Quote 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...)
stgatilov Posted October 14, 2021 Report Posted October 14, 2021 By the way, I have already implemented texture decompression locally, which makes image programs work on DDS files. As soon as I commit it to SVN, the issue on Saint Lucia will return. 2 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.