Player sprite seen briefly when crossing static portals

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
gramps
Posts: 300
Joined: Thu Oct 18, 2018 2:16 pm

Player sprite seen briefly when crossing static portals

Post by gramps »

When passing through a static portal, your player sprite is sometimes visible for a split second, right in front of you (maybe for just a single frame). This doesn't happen consistently, so you may need to run through portals many times before seeing it.

First noticed this happening some time after the recent rollback. It also happens in the new level refactor builds. Haven't ever noticed it prior to that.

Have only observed this in the OpenGL renderer. Checked for it in the other renderers, but couldn't get it to happen there. It's possible it's not limited to the GL renderer, though, since it can't be reproduced consistently.

I can provide a test map if needed, but any map with some static portals to run through should work.
Last edited by gramps on Fri Feb 08, 2019 12:31 am, edited 2 times in total.
User avatar
Enjay
 
 
Posts: 26430
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Player sprite seen briefly when passing though a portal

Post by Enjay »

That is something that has been noticed before (some years ago in fact). It certainly was addressed before, so I wonder if it has become more obvious again?
User avatar
Rachael
Admin
Posts: 13110
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Player sprite seen briefly when passing though a portal

Post by Rachael »

This is not a solvable issue due to the way interpolation and player prediction works. The problem can be mitigated by disabling the player prediction in the network options menu but that makes it play different.
User avatar
Enjay
 
 
Posts: 26430
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Player sprite seen briefly when passing though a portal

Post by Enjay »

I've just tried a few maps that use static portals - running back and forth through them - and not seen the player sprite once (including in some maps that used to cause the problem back when it was first reported). I'm not disputing the report, but from what I can see, most of the time the issues is not visible and I guess whatever was done to address this is still mostly doing what it is intended to do.
gramps
Posts: 300
Joined: Thu Oct 18, 2018 2:16 pm

Re: Player sprite seen briefly when passing though a portal

Post by gramps »

It seems like it won't happen for a while, and then it'll happen almost every time for a while, and sort of alternate like that, when pretty much constantly running through portals. Maybe it has something to do with temporary drops in fps, not sure. If this issue has been present the whole time, maybe I'm just now noticing it as the map I'm working on bogs performance down a bit more as it gets more detailed.

Anyway, it's not a huge issue. It's gone so fast that I wasn't even sure it was a player sprite until I happened to get a good look at it recently. Just thought I should report it now that I'm actually sure of what I'm seeing.
User avatar
Rachael
Admin
Posts: 13110
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Player sprite seen briefly when passing through a portal

Post by Rachael »

You can see it very easily if you tank your FPS. Try setting vid_scalefactor to 2, and enable SSAO, and set multisampling to 32x. Unless you have a monster of a GPU, your FPS should now be low enough to see the effect.
gramps
Posts: 300
Joined: Thu Oct 18, 2018 2:16 pm

Re: Player sprite seen briefly when passing through a portal

Post by gramps »

Hmm, here's a thought. There's a `Viewpoint.showviewer` that looks like it's responsible for deciding whether to render the player sprite. Without really knowing anything about the code, it seems that this could possibly just be turned off for static portals, since it doesn't seem like there's any possible configuration with static portals *alone* where the viewer should be visible. But I'm not sure how it's all supposed to work when other portals/mirrors come into play.
User avatar
Rachael
Admin
Posts: 13110
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Player sprite seen briefly when passing through a portal

Post by Rachael »

That sounds pretty hacky. I don't know how Graf feels about that, but personally I am a bit dubious about it. Ideas like that make the code unreadable after a while.
gramps
Posts: 300
Joined: Thu Oct 18, 2018 2:16 pm

Re: Player sprite seen briefly when passing through a portal

Post by gramps »

Yeah, this may be the wrong place to do it, I'm not sure (really have zero familiarity with this code). But it still might make sense to have the viewer never be visible as a result of a static portal one way or another, since there doesn't seem to be a legitimate situation where that should actually happen, due to the way static portals work.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48377
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Player sprite seen briefly when crossing static portals

Post by Graf Zahl »

There is no good solution, unfortunately. The main reason for that is that thanks to arbitrary portals any camera may show the player and adding some global switch for the sprite will always have some negative side effects.

The entire player interpolation code really needs to be tossed out and rewritten - unfortunately it's one of the more obtuse legacies of ZDoom.
Darkcrafter
Posts: 531
Joined: Sat Sep 23, 2017 8:42 am
Graphics Processor: nVidia with Vulkan support

Re: Player sprite seen briefly when crossing static portals

Post by Darkcrafter »

What's more interesting is that effect disappears with a better graphics card that provides a smooth framerate. The old 2007 card (ATI Radeon HD2400 PRO) wasn't only showing a player but also had a strange crossfade where a portal passage could be seen.

Return to “OpenGL Renderer Bugs”