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!

Player sprite seen briefly when crossing static portals

Postby gramps » Thu Feb 07, 2019 5:46 pm

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 1:31 am, edited 2 times in total.
gramps
 
Joined: 18 Oct 2018

Re: Player sprite seen briefly when passing though a portal

Postby Enjay » Thu Feb 07, 2019 5:48 pm

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Player sprite seen briefly when passing though a portal

Postby Rachael » Thu Feb 07, 2019 6:11 pm

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
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Player sprite seen briefly when passing though a portal

Postby Enjay » Thu Feb 07, 2019 6:23 pm

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.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Player sprite seen briefly when passing though a portal

Postby gramps » Thu Feb 07, 2019 6:57 pm

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.
gramps
 
Joined: 18 Oct 2018

Re: Player sprite seen briefly when passing through a portal

Postby Rachael » Thu Feb 07, 2019 10:51 pm

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.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Player sprite seen briefly when passing through a portal

Postby gramps » Thu Feb 07, 2019 11:49 pm

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.
gramps
 
Joined: 18 Oct 2018

Re: Player sprite seen briefly when passing through a portal

Postby Rachael » Fri Feb 08, 2019 12:05 am

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.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Player sprite seen briefly when passing through a portal

Postby gramps » Fri Feb 08, 2019 12:18 am

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.
gramps
 
Joined: 18 Oct 2018

Re: Player sprite seen briefly when crossing static portals

Postby Graf Zahl » Fri Feb 08, 2019 2:22 am

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.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Player sprite seen briefly when crossing static portals

Postby Darkcrafter » Tue Mar 26, 2019 5:30 pm

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.
Darkcrafter
 
Joined: 23 Sep 2017
Location: Russia


Return to OpenGL Renderer Bugs

Who is online

Users browsing this forum: No registered users and 1 guest