GMS 2 Unwanted motion blur

Discussion in 'Programming' started by Shazard Bansraj, Oct 10, 2018.

  1. Shazard Bansraj

    Shazard Bansraj Member

    Joined:
    Jul 4, 2016
    Posts:
    45
    I need help with unwanted motion blur. When my character's speed is high, he blurs while moving. On normal speed (phy_position_x+=1) there is no blur; however he moves too slowly across the screen. How do I get my character to move across the screen faster without blurring? I tried adjusting the screen resolution, scaling and frame rate.
     
  2. Evan Malinowski

    Evan Malinowski Member

    Joined:
    Apr 17, 2018
    Posts:
    128
    There should be an option in Global game settings > (The platform your using) > Graphics > and make sure [Interpolate colors between pixels] is unchecked. That should fix your problem. Note that it will make your sprites look Sharper.
     
  3. flyingsaucerinvasion

    flyingsaucerinvasion Member

    Joined:
    Jun 20, 2016
    Posts:
    1,706
    It sounds to me like you are talking about a probelm caused by your monitor. Are you able to take screenshots of this problem?
     
  4. TheouAegis

    TheouAegis Member

    Joined:
    Jul 3, 2016
    Posts:
    5,230
    You said his speed is greater than 1. What is the speed values you're using? If you're using fractions, then you have pixel rounding. If you're using whole numbers, then you have monitor ghosting.
     
  5. Shazard Bansraj

    Shazard Bansraj Member

    Joined:
    Jul 4, 2016
    Posts:
    45
  6. Shazard Bansraj

    Shazard Bansraj Member

    Joined:
    Jul 4, 2016
    Posts:
    45
    It's already off. I only get the blurring during movement.
    It's not my monitor because other similar games do not have the same blur.
    In the video the first move speed is 1 and the animation barely has any blurring, if any at all. In the second part of the video, I set his move speed as 5. The faster he moves, the more he blurs.
     
    Last edited: Oct 10, 2018
    Evan Malinowski likes this.
  7. flyingsaucerinvasion

    flyingsaucerinvasion Member

    Joined:
    Jun 20, 2016
    Posts:
    1,706
    are you using any surfaces?
     
  8. Shazard Bansraj

    Shazard Bansraj Member

    Joined:
    Jul 4, 2016
    Posts:
    45
    I'm not even aware of what these are so most likely not.
     
  9. flyingsaucerinvasion

    flyingsaucerinvasion Member

    Joined:
    Jun 20, 2016
    Posts:
    1,706
    are you drawing a partially transparent background?
     
  10. Shazard Bansraj

    Shazard Bansraj Member

    Joined:
    Jul 4, 2016
    Posts:
    45
    Nope
     
  11. BaBiA Game Studio

    BaBiA Game Studio Member

    Joined:
    Jun 20, 2016
    Posts:
    567
    Have you tried moving your character without using the physics variables?
    Found this in the manual about the phy_position_x:
    If you are manually changing the physics locations, then perhaps you should just be using the non-physics methods of movement by just setting x and y rather than phy_position_x and phy_position_y.

    Do you absolutely have to use physics? And if so, do you need to override the phy_position_x or phy_position_y rather than just letting the physics do it's own thing?
     
  12. Shazard Bansraj

    Shazard Bansraj Member

    Joined:
    Jul 4, 2016
    Posts:
    45
    I just tried it. It's the same, unfortunately.
     
  13. flyingsaucerinvasion

    flyingsaucerinvasion Member

    Joined:
    Jun 20, 2016
    Posts:
    1,706
    You would have told us if you were trying to draw some kind of a trail, wouldn't you? So I presume it has nothing to do with that.

    This is an odd one, it's not the usual suspects.
     
  14. Shazard Bansraj

    Shazard Bansraj Member

    Joined:
    Jul 4, 2016
    Posts:
    45
    Definitely not trying to get a trail. I'm comparing my game with Wizard of Legend. In WoL, the character sprite is perfectly clear even while sprinting. However, my character blurs if he moves too fast. I'll see if I can get some better images to explain.
     
  15. flyingsaucerinvasion

    flyingsaucerinvasion Member

    Joined:
    Jun 20, 2016
    Posts:
    1,706
    are you able to get just a regular old screenshot (not video) of the problem? I want to make sure what we see in the video isn't some kind of artifact in the video itself. But if you are also seeing it with your own eyes, that seems unlikely.

    It's not your shadow malfunctioning somehow, is it?
     
  16. Shazard Bansraj

    Shazard Bansraj Member

    Joined:
    Jul 4, 2016
    Posts:
    45
    Screenshots while moving do not show the blur apparently...

    https://twitter.com/ShootOwl/status/1049853260327243777
     
  17. flyingsaucerinvasion

    flyingsaucerinvasion Member

    Joined:
    Jun 20, 2016
    Posts:
    1,706
    Hmm... well now we have to distinguish between whether it is an illusion or monitor defect and coincidental video artifact, or a real drawing problem that for some reason wont show up in a screenshot.

    If you slow down the room speed dramatically, do you still see the "blur"?

    By the way, I just noticed that you recorded your video on a phone or camera. So if the problem is your monitor, it would show up in the video as well.
     
  18. TheouAegis

    TheouAegis Member

    Joined:
    Jul 3, 2016
    Posts:
    5,230
    have you tried actually adding a background picture? The video you showed seems like it has just the character on a white background.
     
  19. Shazard Bansraj

    Shazard Bansraj Member

    Joined:
    Jul 4, 2016
    Posts:
    45
    Movement in general is always blurry no matter how much I adjust frame rate. I'm not sure if it is an optical illusion because of the speed of the character's movement but I know that other games don't have this same off-putting blur.

    That's a bg image (a sprite on an object). It looks white because of the screen brightness.

    Thanks to everyone for all your input. I hope we can solve this. Maybe I'm doing something wrong.
     
  20. Relic

    Relic Member

    Joined:
    Jun 27, 2017
    Posts:
    257
    What graphics card are you using? It may be implementing some motion blur effects.
     
  21. TheouAegis

    TheouAegis Member

    Joined:
    Jul 3, 2016
    Posts:
    5,230
    What brand of computer are you using? What brand and model of monitor are you using? Maybe it's inverse ghosting.
     
  22. kupo15

    kupo15 Member

    Joined:
    Jun 20, 2016
    Posts:
    645
    My thought is that Theou is on the right track with the background. I've experienced ghosting at mid-higher speeds as well but I think its an optical illusion. That is why its not showing up in your screenshots.

    It mostly occurs when the background is solid and most of your background is solid and I notice it when I'm prototyping things in classic programmer art, a box on a gray background but it goes away when I add some background to it. I would guess that if you had more going on in your background than it mostly being the default gray you won't be seeing it.

    If its not an illusion then perhaps maybe the monitor exacerbates that effect if its not of the best quality, I'm not sure. I know my monitor isn't the most high end but when I add an actual background it goes away. Try adding a more varied design to your background and see if it still happens. Anything will do, even scribbling a solid pattern and tiling it as a test.

    Googled ghosting:
    "When describing an LCD or flat-panel display, ghosting is used to describe an artifact caused by a slow response time. As the screen refreshes, the human eye still perceives the image previously displayed; causing a smearing or blurring visual effect."

    I think your lack of background is making this more pronounced
     
    Last edited: Oct 10, 2018
  23. Shazard Bansraj

    Shazard Bansraj Member

    Joined:
    Jul 4, 2016
    Posts:
    45
  24. RangerX

    RangerX Member

    Joined:
    Jun 20, 2016
    Posts:
    2,527
    Your problem is pure logic.
    You took at screenshot with the character moving and its not blurred. This means the blur doesn't come from the game. Its your monitor that is ghosting.
    As simple as that my friend.
     
  25. TheouAegis

    TheouAegis Member

    Joined:
    Jul 3, 2016
    Posts:
    5,230
    As I said too, consider inverse ghosting. Certain monitors or video drivers or something have what is essentially motion blur correction. With ASUS monitors/drivers, it's called trace free. ...It's basically a threshold setting that attempts to compensate for ghosting, but sometimes it can overcompensate. It'll typically be either 40 or 60. If you can find it, tweak it little by little until the ghosting goes away.

    If the shadow/trail is roughly the same color and only a wee bit darker than the sprite, it's probably normal motion blur/ghosting. If the shadow/trail is significantly darker like drop-shadowing, then it's probably inverse ghosting.
     
  26. Shazard Bansraj

    Shazard Bansraj Member

    Joined:
    Jul 4, 2016
    Posts:
    45
  27. flyingsaucerinvasion

    flyingsaucerinvasion Member

    Joined:
    Jun 20, 2016
    Posts:
    1,706
    I can't see any blur on my monitor, although the quality of the video is not good.
     
  28. TheouAegis

    TheouAegis Member

    Joined:
    Jul 3, 2016
    Posts:
    5,230
    The background in WoL blurs horribly for me in that video.
     
  29. RefresherTowel

    RefresherTowel Member

    Joined:
    Jul 13, 2016
    Posts:
    499
    The WoL video is not blurring the character because he is always centred on the screen, meaning he is literally not moving, the background is moving around him (hence why the background blurs in WoL for Theou). Your character moves while the background remains static, thus your character 'seems' blurry. Either center him on the screen and have the camera follow him pixel perfect, or put up with the extremely mild 'blur' that you're talking about.
     
  30. Shazard Bansraj

    Shazard Bansraj Member

    Joined:
    Jul 4, 2016
    Posts:
    45
    I didn't expect Twitter to lower the quality so much. My character's movement speed wasn't too high so the blur is limited. You can still see it in the glasses. Perhaps your monitor is superior.

    I also noticed the background blur. However, I feel like it's more aesthetically pleasing to blur the background than the character.

    I think this is the conclusion. Even though the blur is mild at this movement speed, I believe that these small things can add to whether a player finds the game appealing.

    Thank you all for your input! If you have any further suggestions, please let me know!
     
  31. muki

    muki Member

    Joined:
    Mar 5, 2017
    Posts:
    187
    Try rounding your object/view positions with round(). See if that helps.
     
  32. RefresherTowel

    RefresherTowel Member

    Joined:
    Jul 13, 2016
    Posts:
    499
    That's true and if it's bugging you, obviously it's worth it to look for a fix. Sometimes, though, I like to lean into things like this. As they say "That's not a bug, it's a feature". Something like this could inspire you to create a cool visual style that counteracts the blurring of the character (maybe with your own custom programmed motion blur or a unique art style that looks good regardless of whether it blurs or something).
     
  33. Shazard Bansraj

    Shazard Bansraj Member

    Joined:
    Jul 4, 2016
    Posts:
    45
    Indeed. Thanks everyone!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice