View Issue Details

IDProjectCategoryView StatusLast Update
0004951The Dark ModGraphicspublic14.01.2019 14:34
ReporterSpooks Assigned Tonbohr1more  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product VersionSVN 
Target VersionTDM 2.07Fixed in VersionTDM 2.07 
Summary0004951: Z-fighting with shadow textures when foglight present
DescriptionTextures like shadowcaulk seem to "pass through" with regards to foglights, giving them an overfogged surface and causing apparent z-fighting when flush against another texture.
Steps To ReproduceFrom the linke below:

"I tested in a more controlled setting. I made a brush with a regular texture, duplicated it in place and textured the second brush with the "shadow" devtexture. This time, instead of z-fighting, it looked like the entire regular-textured brush was getting double-fogged because of the "shadow" duplicate brush. When I changed the dimensions of the shadow brush while still keeping one side of it flush to the original brush, I got the z-fighting. Shadow volumes don't have this issue."
Additional Informationhttp://forums.thedarkmod.com/topic/19257-testers-and-reviewers-wanted-bfg-style-vertex-cache/?p=429872

Initial report in this post, second point. Still present in 2.07 beta 4.
TagsNo tags attached.
Attached Files
scaulk.map (9,842 bytes)   
Version 2
// entity 0
{
"classname" "worldspawn"
"editor_drMapPos1" "1738.55 1171.14 -520.531"
"editor_drMapAngle1" "14.7001 87.8977 0"
"editor_drMapPos2" "414.798 255.441 -264.933"
"editor_drMapAngle2" "2.10002 84.5976 0"
"editor_drMapPos3" "-749.97 -1606.21 -470.066"
"editor_drMapAngle3" "-3.29998 6.59757 0"
"editor_drMapPos4" "1014.05 -953.679 -556.857"
"editor_drMapAngle4" "-10.2 355.498 0"
"editor_drMapPos5" "987.599 3513.79 -319.877"
"editor_drMapAngle5" "-61.1999 172.198 0"
"editor_drMapPos6" "-1032.5 -2840 739.5"
"editor_drMapAngle6" "-77.0999 175.798 0"
"editor_drMapPos7" "952.822 285.005 1366.04"
"editor_drMapAngle7" "-74.8 149.373 0"
"editor_drMapPos8" "976 424 320"
"editor_drMapAngle8" "-3 15.3467 0"
"editor_drMapPos9" "409.146 547.464 392.83"
"editor_drMapAngle9" "-16.8 284.947 0"
"editor_drMapPos10" "3134.38 -1495.39 -94.4922"
"editor_drMapAngle10" "-9.3 278.7 0"
"editor_drLastCameraPos" "207.655 83.2405 127.204"
"editor_drLastCameraAngle" "-25.2 158.4 0"
// primitive 0
{
brushDef3
{
( 0 0 1 -217 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/plaster/framed_01" 0 0 0
( 0 1 0 -256 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/plaster/framed_01" 0 0 0
( 1 0 0 -320 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/plaster/framed_01" 0 0 0
( 0 -1 0 0 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/plaster/framed_01" 0 0 0
( -1 0 0 -64 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/plaster/framed_01" 0 0 0
( 0 0 -1 209 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/plaster/adobe_rough" 0 0 0
}
}
// primitive 1
{
brushDef3
{
( 0 0 1 -209 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
( 0 1 0 -272 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 -320 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
( 0 0 -1 0 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
( -1 0 0 -64 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
( 0 -1 0 256 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 2
{
brushDef3
{
( 0 0 1 -209 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
( 0 1 0 -256 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 -336 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
( 0 0 -1 0 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
( 0 -1 0 0 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
( -1 0 0 320 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 3
{
brushDef3
{
( 0 1 0 -256 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/plaster/framed_01" 0 0 0
( 1 0 0 -320 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/plaster/framed_01" 0 0 0
( 0 0 -1 -8 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/plaster/framed_01" 0 0 0
( 0 -1 0 0 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/plaster/framed_01" 0 0 0
( -1 0 0 -64 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/plaster/framed_01" 0 0 0
( 0 0 1 0 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/darkmod/stone/brick/grainy_large_blocks01" 0 0 0
}
}
// primitive 4
{
brushDef3
{
( 0 0 1 -209 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 -320 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
( 0 0 -1 0 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
( 0 -1 0 -16 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
( -1 0 0 -64 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
( 0 1 0 0 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 5
{
brushDef3
{
( 0 0 1 -209 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/shadowcaulk" 0 0 0
( 0 1 0 -256 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/shadowcaulk" 0 0 0
( 0 0 -1 0 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/shadowcaulk" 0 0 0
( 0 -1 0 0 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/shadowcaulk" 0 0 0
( -1 0 0 -80 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/shadowcaulk" 0 0 0
( 1 0 0 64 ) ( ( 0.015625 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/shadowcaulk" 0 0 0
}
}
}
// entity 1
{
"classname" "info_player_start"
"name" "info_player_start_1"
"angle" "90.000000"
"origin" "128 128 0"
}
// entity 2
{
"classname" "atdm:ambient_world"
"name" "ambient_world"
"_color" "0.08 0.08 0.08"
"light_center" "0 0 0"
"light_radius" "320 320 320"
"origin" "128 96 64"
}
// entity 3
{
"classname" "atdm:torch_gothic_wall"
"name" "atdm_torch_gothic_wall_1"
"origin" "128 252 66"
"rotation" "1 0 0 0 1 0 0 0 1"
}
// entity 4
{
"classname" "func_static"
"name" "func_static_2830"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_wall02.lwo"
"origin" "0 56 170"
"rotation" "1 0 0 0 -1 0 0 0 -1"
"skin" "mansion01_white"
}
// entity 5
{
"classname" "func_static"
"name" "func_static_2"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_wall02.lwo"
"origin" "128 56 170"
"rotation" "1 0 0 0 -1 0 0 0 -1"
"skin" "mansion01_white"
}
// entity 6
{
"classname" "func_static"
"name" "func_static_3"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_wall02.lwo"
"origin" "256 56 170"
"rotation" "1 0 0 0 -1 0 0 0 -1"
"skin" "mansion01_white"
}
// entity 7
{
"classname" "func_static"
"name" "func_static_88"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_horiz_spacer02.lwo"
"origin" "0 -12 179"
"rotation" "-1 0 0 0 -1 0 0 0 1"
"skin" "mansion01_white"
}
// entity 8
{
"classname" "func_static"
"name" "func_static_1"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_horiz_spacer02.lwo"
"origin" "128 -12 179"
"rotation" "-1 0 0 0 -1 0 0 0 1"
"skin" "mansion01_white"
}
// entity 9
{
"classname" "func_static"
"name" "func_static_4"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_horiz_spacer02.lwo"
"origin" "256 -12 179"
"rotation" "-1 0 0 0 -1 0 0 0 1"
"skin" "mansion01_white"
}
// entity 10
{
"classname" "func_static"
"name" "func_static_5"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_horiz_spacer02.lwo"
"origin" "-64 64 179"
"rotation" "0 1 0 -1 0 0 0 0 1"
"skin" "mansion01_white"
}
// entity 11
{
"classname" "func_static"
"name" "func_static_6"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_horiz_spacer02.lwo"
"origin" "-64 192 179"
"rotation" "0 1 0 -1 0 0 0 0 1"
"skin" "mansion01_white"
}
// entity 12
{
"classname" "func_static"
"name" "func_static_8"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_wall02.lwo"
"origin" "4 64 170"
"rotation" "0 -1 0 -1 0 0 0 0 -1"
"skin" "mansion01_white"
}
// entity 13
{
"classname" "func_static"
"name" "func_static_9"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_wall02.lwo"
"origin" "4 192 170"
"rotation" "0 -1 0 -1 0 0 0 0 -1"
"skin" "mansion01_white"
}
// entity 14
{
"classname" "func_static"
"name" "func_static_7"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_horiz_spacer02.lwo"
"origin" "0 268 179"
"rotation" "1 0 0 0 1 0 0 0 1"
"skin" "mansion01_white"
}
// entity 15
{
"classname" "func_static"
"name" "func_static_11"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_horiz_spacer02.lwo"
"origin" "128 268 179"
"rotation" "1 0 0 0 1 0 0 0 1"
"skin" "mansion01_white"
}
// entity 16
{
"classname" "func_static"
"name" "func_static_12"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_horiz_spacer02.lwo"
"origin" "256 268 179"
"rotation" "1 0 0 0 1 0 0 0 1"
"skin" "mansion01_white"
}
// entity 17
{
"classname" "func_static"
"name" "func_static_13"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_wall02.lwo"
"origin" "0 200 170"
"rotation" "-1 0 0 0 1 0 0 0 -1"
"skin" "mansion01_white"
}
// entity 18
{
"classname" "func_static"
"name" "func_static_14"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_wall02.lwo"
"origin" "128 200 170"
"rotation" "-1 0 0 0 1 0 0 0 -1"
"skin" "mansion01_white"
}
// entity 19
{
"classname" "func_static"
"name" "func_static_15"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_wall02.lwo"
"origin" "256 200 170"
"rotation" "-1 0 0 0 1 0 0 0 -1"
"skin" "mansion01_white"
}
// entity 20
{
"classname" "func_static"
"name" "func_static_16"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_wall02.lwo"
"origin" "264 64 170"
"rotation" "0 1 0 1 0 0 0 0 -1"
"skin" "mansion01_white"
}
// entity 21
{
"classname" "func_static"
"name" "func_static_17"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_wall02.lwo"
"origin" "264 192 170"
"rotation" "0 1 0 1 0 0 0 0 -1"
"skin" "mansion01_white"
}
// entity 22
{
"classname" "func_static"
"name" "func_static_18"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_horiz_spacer02.lwo"
"origin" "332 64 179"
"rotation" "0 -1 0 1 0 0 0 0 1"
"skin" "mansion01_white"
}
// entity 23
{
"classname" "func_static"
"name" "func_static_19"
"model" "models/darkmod/architecture/modules/interior_mansion01/mansion01_horiz_spacer02.lwo"
"origin" "332 192 179"
"rotation" "0 -1 0 1 0 0 0 0 1"
"skin" "mansion01_white"
}
scaulk.map (9,842 bytes)   

Relationships

related to 0003662 resolvedSpringheel NoFog material keyword not working 

Activities

nbohr1more

nbohr1more

09.01.2019 02:47

developer   ~0011265

Rev 15536.
Partially fixed by adding translucent keyword (acts as an exclusion flag).
grayman

grayman

09.01.2019 13:04

viewer   ~0011267

Last edited: 09.01.2019 13:05

Please revert this change.

shadowcaulk is supposed to be a sealing texture (i.e. use of forceOpaque keyword).

Adding translucent to this texture overrides the effect of forceOpaque, and anyone (me!) trying to dmap a map using shadowcaulk will now see leaks.

Need a different solution to the problem.

nbohr1more

nbohr1more

09.01.2019 14:00

developer   ~0011268

Last edited: 11.01.2019 02:34

Will do that tonight if you don't do it first.

(Changes were reverted.)

duzenko

duzenko

09.01.2019 19:50

developer   ~0011271

Last edited: 09.01.2019 19:51

1. I would need a test map
2. Someone needs to investigate why this happens with shadowcaulk and not regular caulk. DMAP?
3. What is shadowcaulk anyway and how is it different to regular caulk? Presume I'm clueless about DR and mapping (I am)
4. Try face-flipping your shadowcaulk surface.

grayman

grayman

09.01.2019 20:16

viewer   ~0011273

1. I can provide a "leak-test" shadowcaulk test map.
3. Regular caulk allows light to pass through, which can cause problems if the models and/or other textures on the far side of the caulk brush aren't creating shadows. Shadowcaulk acts like regular caulk, but any faces painted with shadowcaulk will stop the light (cast shadows).
4. "face-flipping" ??? Whatever it is, we can't ask existing missions to go back in and face-flip their surfaces.
nbohr1more

nbohr1more

09.01.2019 20:31

developer   ~0011276

Without delving deeply, I think the original request is implying that we exclude shadowcaulk and common/shadows brushes from fog painting.

I recall attempting to use the noFog keyword and finding that it was only a dmap flag so we don't really have a "don't fog on this" keyword?
nbohr1more

nbohr1more

09.01.2019 20:33

developer   ~0011277

Strangely, some code comments indicate this is not a dmap flag:

                    // All non-translucent surfaces receive fog unless they are explicitly noFog
bool ReceivesFog( void ) const { return ( IsDrawn() && !noFog && coverage != MC_TRANSLUCENT ); }
nbohr1more

nbohr1more

09.01.2019 21:00

developer   ~0011280

Last edited: 10.01.2019 02:10

Interaction.cpp


// "invisible ink" lights and shaders
        if ( shader->Spectrum() != lightShader->Spectrum() ) {
            continue;
}

// Proposed fix

if ( !shader->ReceivesFog() && lightShader-> IsFogLight() )
{
continue;
}

nbohr1more

nbohr1more

10.01.2019 02:09

developer   ~0011286

Last edited: 10.01.2019 02:11

Since IsDrawn is part of the ReceivesFog condition, the fix for 3662
should now fix this too.

Indeed, some strange z-fighting in Heart of Lone Salvation seems to have been cured by this.

grayman

grayman

10.01.2019 14:16

viewer   ~0011299

Attached test map with shadowcaulk used for one worldspawn brush.

This dmaps okay with the latest SVN, but please use it for a check when changing shadowcaulk, to make sure shadowcaulk still seals.
nbohr1more

nbohr1more

10.01.2019 14:30

developer   ~0011300

Last edited: 10.01.2019 14:30

Thanks!

I think that my noFog changes bypass the issue originally reported here but
it might be worthwhile for Duzenko to study how shadowcaulk works in practice in
case there is something amiss in his shadow casting code.

Spooks

Spooks

10.01.2019 23:06

reporter   ~0011310

At note 11276, ideally there should be parity between how the fog is rendered in shadow stencil and map mode. By the sound of this, it may not be or, rather, there will be parity but it sounds like shadow textures may "appear" different than eg 2.06, when fog is in the mix. I wager this is probably a good enough fix but it remains to be seen how models with common/shadow textures behave.
nbohr1more

nbohr1more

11.01.2019 02:33

developer   ~0011312

I've not witnessed any variance in fog\shadow scenes between
the shadow modes since this change.

For both modes this should prevent tris owned by materials that are
"ineligible for fogging" to be submitted the vertex pipeline.

(Also an optimization, I guess.)

grayman's test map works fine
HOLS works fine, as well as all the fogged missions I tried.

If you have an example map where you are concerned about the behavior
of shadows and fog, I'd be happy to review it.

Issue History

Date Modified Username Field Change
08.01.2019 10:13 Spooks New Issue
09.01.2019 02:47 nbohr1more Note Added: 0011265
09.01.2019 13:04 grayman Note Added: 0011267
09.01.2019 13:05 grayman Note Edited: 0011267
09.01.2019 14:00 nbohr1more Note Added: 0011268
09.01.2019 14:23 nbohr1more Assigned To => duzenko
09.01.2019 14:23 nbohr1more Status new => assigned
09.01.2019 19:50 duzenko Note Added: 0011271
09.01.2019 19:51 duzenko Note Edited: 0011271
09.01.2019 20:16 grayman Note Added: 0011273
09.01.2019 20:31 nbohr1more Note Added: 0011276
09.01.2019 20:33 nbohr1more Note Added: 0011277
09.01.2019 20:38 nbohr1more Relationship added related to 0003662
09.01.2019 21:00 nbohr1more Note Added: 0011280
09.01.2019 21:03 nbohr1more Note Edited: 0011280
10.01.2019 02:09 nbohr1more Note Added: 0011286
10.01.2019 02:10 nbohr1more Assigned To duzenko => nbohr1more
10.01.2019 02:10 nbohr1more Status assigned => feedback
10.01.2019 02:10 nbohr1more Target Version => TDM 2.07
10.01.2019 02:10 nbohr1more Note Edited: 0011280
10.01.2019 02:11 nbohr1more Note Edited: 0011286
10.01.2019 14:14 grayman File Added: scaulk.map
10.01.2019 14:16 grayman Note Added: 0011299
10.01.2019 14:30 nbohr1more Note Added: 0011300
10.01.2019 14:30 nbohr1more Note Edited: 0011300
10.01.2019 23:06 Spooks Note Added: 0011310
10.01.2019 23:06 Spooks Status feedback => assigned
11.01.2019 02:33 nbohr1more Note Added: 0011312
11.01.2019 02:33 nbohr1more Status assigned => feedback
11.01.2019 02:34 nbohr1more Note Edited: 0011268
14.01.2019 14:34 nbohr1more Status feedback => resolved
14.01.2019 14:34 nbohr1more Resolution open => fixed
14.01.2019 14:34 nbohr1more Fixed in Version => TDM 2.07