Jump to content

[Bug] X-ray glasses stale first frame


 Share

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

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

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

Posted (edited)
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

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.

 Share

  • Recent Status Updates

    • STiFU

      Anyone here played Inscryption? At first, I was like "no, I am not going to play a stupid card game", but this game is so much more than that. It is so meta, full of 4th wall breaks, and feels so damn spooky and weird because of it. Absolutely recommended, if you can stand the visuals. I recommend not reading up too much on it, as that could easily spoil half the incredible surprises. Just know that what you see in the beginning is by far not everything.
      · 1 reply
    • freyk

      Tried to make a tdm advertisement commentpost at one of civvie11 youtube videos about T2. Post got marked as spam. His problem (to not discover TDM for himself),..not my problem.
      But some help of some fellow TDM yt-videocomment posters would be nice. To ask him and others, to play TDM. To get more players/creators. 
      · 2 replies
    • datiswous

      Currently Profile Information has 3 fields, these are shown in forum posts under your avatar:
      1. Gender
      2. Location
      3. Interests
      I think that it could be useful to have an extra field called "Operating system" (under location). It can be useful for tech support and to see what people use.
      Alternatively it could be a more general term, like PC system, so that you can for example state that you use an AMD gpu.
      · 2 replies
    • OrbWeaver

      Greetings fellow kids.
      · 11 replies
    • Crafty_Creeper

      Keep on Creeping on...
       
      · 3 replies
×
×
  • Create New...