Jump to content
The Dark Mod Forums

[Resolved] X-ray glasses stale first frame


Daft Mugi

Recommended Posts

When playing Iris and Written in Stone, I noticed a graphical glitch with the x-ray glasses.

When the x-ray glasses are activated, the first frame of the fade to x-ray vision is the last frame of the previous x-ray glasses usage.

To reproduce:

  1. Use the x-ray glasses and look at something easily recognizable, such as a light source.
  2. Turn off the x-ray glasses.
  3. Look at something else.
  4. Use the x-ray glasses, and you should for a moment see the last thing you were looking at from #1.

What could be causing that?

 

I don't know if it is related, but I've noticed something similar with other (animated) fades:

  1. The pop-up note in the upper-left corner will start at 100% opacity and then reset near 0% before fading in to 100% opacity.
  2. Loading a new mission or loading a save will have a fullscreen graphical blink. It might be the last frame of the previous scene or the 100% -> 0% -> 100% opacity fade issue.

 

Bug: https://bugs.thedarkmod.com/view.php?id=6109

Edited by Daft Mugi
Link to comment
Share on other sites

  • 1 month later...
On 9/8/2022 at 12:10 AM, Daft Mugi said:

@duzenko Hey, checking on the status of this.

Has this been fixed? If not, does this have a bug tracker ticket?

Thanks!

I would think we don't have a ticket yet for this - feel free to create.

The big problem here is it's hard for me to notice that single bad frame.

Can you help with testing? You'd need to run a dev build and get to the point where you can reproduce it

Link to comment
Share on other sites

  • 3 weeks later...

@duzenko Hey, sorry for the late reply. I saw an email notification, but the "Can you help with testing?" bit wasn't in the email.

Sure, I can help with testing. However, with the recent SVN versions, the game has errors and I cannot play. I'm not sure what's going on yet. I can build and play earlier versions, such as r9853, just fine. I got compiled versions working again by using dev assets instead of 2.10 assets, so I can test properly now.

As a suggestion, could you use something like OBS to record your game and play it back frame by frame to catch the artifact?

Added bug to tracker: https://bugs.thedarkmod.com/view.php?id=6109

Edited by Daft Mugi
Link to comment
Share on other sites

Well, the engine is not very accurate regarding first frames of anything, given that it has SMP and other things.

I'd suggest trying to disable com_smp, maybe the issue will go away.
When SMP is on, we render previous frame while we model gameplay for the next one.
It might be a texture rendered specifically for X-ray, or some frontend data which is gathered for X-ray, etc.

In order to find the issue, I'd recommend using apitrace to capture OpenGL replay (on a smaller map).
It is not nice to use, but unlike RenderDoc, it captures every frame, so you can later find the glitchy one and see what's wrong in OpenGL calls.

After you understand what causes this issue, a proper fix would probably be adding some kind of delay to X-ray visualization, or some kind of clear when X-ray is disabled/enabled.
 

Link to comment
Share on other sites

On 9/27/2022 at 1:28 AM, stgatilov said:

I'd suggest trying to disable com_smp, maybe the issue will go away.
When SMP is on, we render previous frame while we model gameplay for the next one.
It might be a texture rendered specifically for X-ray, or some frontend data which is gathered for X-ray, etc.

Thank you for the suggestion. I tried com_smp set to 0 and the stale frame was still there.

10 hours ago, duzenko said:

OK, so to start with, play towards obtaining the x-ray glasses where you can reproduce the bug and save there.

Now upload that save somewhere for me.

Or if you feel like jumping into the C++ code, look for the GUI x-ray flag that triggers that late frame copy

Would viewpos coordinates work instead of a save?

MISSION: Written in Stone

setviewpos 270 -535 537 180

// Or, bind to a key for convenience
bind "j" "setviewpos 270 -535 537 180"

To test (always reproducible):

  1. Pick up the glasses on the desk.
  2. Enable glasses.
  3. Look at the candle on the desk.
  4. Disable glasses.
  5. Turn around and look at a dark area.
  6. Enable glasses. (The previous x-ray view of the candle will blink briefly before fading to the current x-ray view.)

I don't have much experience with graphics programming, so I'm afraid I can't help much with this one other than testing.

Thank you for working on this!

Edited by Daft Mugi
Link to comment
Share on other sites

3 hours ago, Daft Mugi said:

Thank you for the suggestion. I tried com_smp set to 0 and the stale frame was still there.

Would viewpos coordinates work instead of a save?

MISSION: Written in Stone

setviewpos 270 -535 537 180

// Or, bind to a key for convenience
bind "j" "setviewpos 270 -535 537 180"

To test (always reproducible):

  1. Pick up the glasses on the desk.
  2. Enable glasses.
  3. Look at the candle on the desk.
  4. Disable glasses.
  5. Turn around and look at a dark area.
  6. Enable glasses. (The previous x-ray view of the candle will blink briefly before fading to the current x-ray view.)

I don't have much experience with graphics programming, so I'm afraid I can't help much with this one other than testing.

Thank you for working on this!

I suppose it might be enough, now a matter of me having spare time to look into it

  • Thanks 1
Link to comment
Share on other sites

10 hours ago, duzenko said:

sorry, but it seems that your location is not correct

At least for me it moves into the sky

Well, that's quite odd. I wonder why. Is the dev build of TDM using a different coordinate system or setviewpos function?

I'm using written_a7cfb7c80ad19609.pk4.

I've attached an image of noclipping to the area that has the x-ray glasses.

It's quite easy to noclip there.

  1. Start map.
  2. noclip
  3. Fly straight and slightly upwards.
  4. You'll see a tower with a stained glass window. Fly into it.
  5. You'll be in the room with the x-ray glasses.

wis-x-ray-glasses-fly-to.webp

Edited by Daft Mugi
Link to comment
Share on other sites

1 hour ago, Daft Mugi said:

@duzenko Thank you for the candidate.

Unfortunately, I don't have a Windows machine to test this. I use Linux.

Could you please post a (text) patch here either as an attachment or code block, so I can compile my own build?

It's in svn already

 
Link to comment
Share on other sites

  • Daft Mugi changed the title to [Resolved] X-ray glasses stale first frame

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...