View Issue Details

IDProjectCategoryView StatusLast Update
0004707The Dark ModGraphicspublic26.12.2020 10:27
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 2.09 
Fixed in VersionTDM 2.09 
Summary0004707: Wrong reflection in mirror
DescriptionSometimes reflection in the mirror is black, sometimes it is lit incorrectly.
Steps To Reproduce1. Load "Accountant 2" Mission.
2. Get to the elevator (sorry, cannot explain it better).
3. On the second floor, enter Griswold apartment.
4. Go through the corridor and turn right on the first possibility.
5. You are in the dining room, go to the door at the end of the room and open it, do not enter.

Now there three cases:
1. You look directly at the mirror through the door: the image is correct.
2. You look from the floor height (need noclip) or from the side: the mirror is black.
3. You look from the ceiling (need noclip): the reflection is visible, but it is not lit correctly (some light source is excluded).
Sometimes you can even see partially black screen.
Additional InformationThis happens on latest 2.06 beta.
On the previous version (before 7351 and 15123) you could also see start and sky in the mirror in some cases. Now I don't get skybox.
TagsNo tags attached.
Attached Files
mirror_black.jpg (506,815 bytes)
mirror_correct.jpg (505,361 bytes)
mirror_black2.jpg (539,330 bytes)
mirror_light_lacking.jpg (451,937 bytes)
Darkmod.cfg (11,967 bytes)
Untitled.png (30,100 bytes)   
Untitled.png (30,100 bytes)   

Relationships

related to 0004699 resolvedduzenko Mirror textures broken 
related to 0004632 closedduzenko Mirror is black: no reflection (Inn Business) 

Activities

stgatilov

stgatilov

23.12.2017 08:14

administrator   ~0009867

I have attached the screenshots with various cases + config file I use.
stgatilov

stgatilov

23.12.2017 08:30

administrator   ~0009868

Ok, I have checked this place in 2.05.
I see cases 1 and 3 only. So the lack of lighting is reproduced even in 2.05. But the mirror never got completely black (or mostly black) in 2.05.
duzenko

duzenko

31.12.2017 09:59

developer   ~0009949

Last edited: 31.12.2017 09:59

This appears to be a portal bug.
The bathroom door portal is closed when it should not.
Not sure why though.

duzenko

duzenko

31.12.2017 10:40

developer   ~0009950

It might be that when portal is invisible in the mirror (the clipped part of it) it is marked as closed and then does not make it into the main view. The question is, why all other surfaces in the portalled area draw but not the mirror itself?
duzenko

duzenko

31.12.2017 12:21

developer   ~0009951

On a closer look it actually looks like two mirror surfaces, one of them (mirror bottom very thin invisible?) toggles another (main).
I think this needs to be resolved on the mapper's level.
The current engine logic is only do one subview of the same mirror material. All other are skipped until next frame.

R_MirrorRender:
    if ( stage->dynamicFrameCount == tr.frameCount ) {
        return;
    }

Attached screenshot with the blocking surface debug data.
It could originate from this surface in .proc file

/* surface 3 */ { "textures/washroom/mirror" /* numVerts = */ 4 /* numIndexes = */ 6
( -231 286 565 2.796875 1.9687502384 0 0 -1 ) ( -231 362 565 3.390625 1.9687502384 0 0 -1 ) ( -232 362 565 3.390625 1.9765627384 0 0 -1 )
( -232 286 565 2.796875 1.9765627384 0 0 -1 )
0 1 2 3 0 2
}
stgatilov

stgatilov

26.12.2020 08:28

administrator   ~0013209

Last edited: 26.12.2020 10:25

Digged to the same problem again on 2.09 beta (at same place):
  https://forums.thedarkmod.com/index.php?/topic/20691-beta-testing-209/&do=findComment&comment=454925

    I tried to test AC2, which has mirrors, and its mirrors are buggy. They have been buggy for quite some time, also in 2.09 they are buggy in slightly different way due to r_useClipPlaneCulling.
    So I digged deeper, and realized that the mirror that has the problem (near -115.41 415 1157.25) is created with a brush having many mirror-textured sides. The engine only renders mirrored effect for one mirror surface (per material stage), so it just chooses a random surface out of 5-6 available and it happens to be the wrong one.

At the very least, I'm going to add a warning about it.
Now thinking if I can "magically" fix it for existing maps.
stgatilov

stgatilov

26.12.2020 10:12

administrator   ~0013214

I tried to search for mirror textures in .map files.
I believe only "Accountant 2" and "patently dangerous" are affected by this problem.
stgatilov

stgatilov

26.12.2020 10:20

administrator   ~0013215

Last edited: 26.12.2020 10:26

With svn rev 9052, now dmap issues a warning if such bad brushes appear, aka:
  "Brush %d (entity %d) has several sides with same mirror-like material %s"

Given that only two FMs are potentially affected by this, I won't introduce hacks to engine to fix them.
Hopefully, the will be fixed in some map updates.

Issue History

Date Modified Username Field Change
23.12.2017 08:07 stgatilov New Issue
23.12.2017 08:07 stgatilov Status new => assigned
23.12.2017 08:07 stgatilov Assigned To => duzenko
23.12.2017 08:08 stgatilov Additional Information Updated
23.12.2017 08:09 stgatilov Steps to Reproduce Updated
23.12.2017 08:10 stgatilov File Added: mirror_black.jpg
23.12.2017 08:10 stgatilov File Added: mirror_correct.jpg
23.12.2017 08:10 stgatilov File Added: mirror_black2.jpg
23.12.2017 08:10 stgatilov File Added: mirror_light_lacking.jpg
23.12.2017 08:11 stgatilov File Added: mirror_partially_black.jpg
23.12.2017 08:11 stgatilov File Added: Darkmod.cfg
23.12.2017 08:14 stgatilov Note Added: 0009867
23.12.2017 08:15 stgatilov Relationship added related to 0004699
23.12.2017 08:16 stgatilov Relationship added related to 0004632
23.12.2017 08:30 stgatilov Note Added: 0009868
31.12.2017 09:59 duzenko Note Added: 0009949
31.12.2017 09:59 duzenko Note Edited: 0009949
31.12.2017 10:40 duzenko Note Added: 0009950
31.12.2017 12:21 duzenko Note Added: 0009951
31.12.2017 12:21 duzenko File Added: Untitled.png
31.12.2017 12:22 duzenko Status assigned => resolved
31.12.2017 12:22 duzenko Fixed in Version => TDM 2.06
31.12.2017 12:22 duzenko Resolution open => no change required
26.12.2020 08:26 stgatilov Assigned To duzenko => stgatilov
26.12.2020 08:26 stgatilov Status resolved => confirmed
26.12.2020 08:26 stgatilov Product Version TDM 2.06 => TDM 2.09
26.12.2020 08:28 stgatilov Note Added: 0013209
26.12.2020 10:12 stgatilov Note Added: 0013214
26.12.2020 10:20 stgatilov Note Added: 0013215
26.12.2020 10:25 stgatilov Note Edited: 0013209
26.12.2020 10:26 stgatilov Note Edited: 0013215
26.12.2020 10:27 stgatilov Status confirmed => resolved
26.12.2020 10:27 stgatilov Resolution no change required => fixed
26.12.2020 10:27 stgatilov Fixed in Version TDM 2.06 => TDM 2.09