Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

fast moving objects in 2d - horrbile ghosting, blurring

Discussion in '2D' started by iwindows, Nov 20, 2014.

  1. iwindows

    iwindows

    Joined:
    Nov 20, 2014
    Posts:
    6
    together with my son we are building a simple physics based game similar to the classic Pang game. All is going well, but we have serious issues with ghosting/blurring of the sprites. If we just take a single sprite and bounce it off the bounds of a screen we see horrible results. If we use Construct we don't see the ghosting. I don't even really consider this to be fast just a sprite with a gravity scale of 1 or 2 and we see poor results. Increase this to 5 and its pretty awful

    We have read a lot of documentation and forum posts and whatever we attempt, eg set interpolation, fix camera size to match our resolution etc etc we cannot get any good results. Could anyone help us out, or maybe point us in the direction of some examples
     
    Last edited: Nov 20, 2014
  2. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,441
    Can you make a video showing the ghosting effect? I guess you mean there is some kind of visible trail directly behind the moving object.
     
  3. iwindows

    iwindows

    Joined:
    Nov 20, 2014
    Posts:
    6
    hopefully this link works! http://1drv.ms/1tm5UH4

    I get this effect on 3 different monitors and 2 different laptops
     
    Last edited: Nov 20, 2014
  4. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,441
    The video says it cannot play here. and also there is another video showing up at the bottom of the page with kids in it. You may want to remove that one or edit your post to remove the link. Unless you are fine with the other video being there too.
     
  5. vakabaka

    vakabaka

    Joined:
    Jul 21, 2014
    Posts:
    1,153
    google chrom can open video, but i dont know what to do against ghosting. Maybe camera Clear Flag set to Skybox (if it is not)
     
    Last edited: Nov 21, 2014
  6. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    To me it looks like your monitor has a slow response time. There's nothing in Unity that does this inherently and I've never seen anything similar personally.

    --Eric
     
  7. iwindows

    iwindows

    Joined:
    Nov 20, 2014
    Posts:
    6
    ok thanks for the feedback. But its odd we don't see the same behavior in Construct2 with similar moving objects, and it happens on 2 different laptop displays and 4 different monitors. Oh well maybe we will just add trails to the balls to mask the effect.

    thanks for that, don't know how that got there!!
     
    Last edited: Nov 21, 2014
  8. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Unfortunately many monitors/display have a slow response time... even if the refresh rate is supposed to be 60z for example, instead of taking 16.7 milliseconds to completely remove a pixel color and replace it with another color, it can actually take several frames before `residue` from an earlier frame is completely eradicated. For pixels especially that are transitioning from high contrast, i.e. the value has to go from high red to no red, or a bright color on a black background for example, you can see several frames of ghosting. As you've found, it especially applies to fast moving objects, which makes it SUCK for fast 2D games. That blur can look like a motion blur, but unfortunately it also washes out all the smaller details of an object when it moves fast. I almost had to stop working on a game I was making because the blur was so horrible on my tv screen. If you go with a lighter/mid-tone background that can help some. It's especially bad with high-contrast colors.

    I'm curious if you truly get zero ghosting from Construct2... are you absolutely sure it's exactly the same experiment, framerate, etc? If there is a way to get rid of this blurring I'd like to know about it. But I fear it's mainly the result of poorly responding display hardware, which unfortunately was not in the manufacturer's considerations when they decided to come out with all these flat panel things.
     
  9. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    This is ghosting and if you're using the same images in construct, then it means that construct is either running at a lower framerate or its some sort of vsync thing.
     
  10. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    With sync on or off I see the same effect. One way to diminish it a bit is to run at 30fps instead of 60fps... it `holds` the frame twice as long so doesn't streak as much, but then you notice the slight stuttering of the playback.
     
  11. iwindows

    iwindows

    Joined:
    Nov 20, 2014
    Posts:
    6
    We've run the simulation again in Construct and in Unity and it seems like Construct is slightly better. we will change the graphics and see how we get on with that. Construct is quite nice but I like to write code :)
     
  12. dragonfang_89

    dragonfang_89

    Joined:
    Jan 14, 2014
    Posts:
    1
    Does anyone have a solution to this? I have the exact same problem and I can't figure out how to fix it.
     
  13. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Get a faster monitor. Not being flippant; it's a hardware problem and needs a hardware solution. (Alternately, some monitors have an overdrive mode which makes pixels change brightness faster, at the cost of overshooting, which causes a different kind of artifact, but may look better in some cases.)

    --Eric
     
  14. Deep_Ak

    Deep_Ak

    Joined:
    Jun 24, 2015
    Posts:
    29
    I'm having a very similar issue. I'm making a mobile game, I imported the game to my samsung s3 and there seems to be no ghosting effect on the moving ball. I imported literally the same game on an iPhone 6 (expecting it to have a MUCH smoother play), it has a continuous ghosting effect somehow and the ball isn't even moving that fast. I don't understand how to fix it. Any help would be appreciated.

    Thanks in advance.
     
  15. johnnyGr

    johnnyGr

    Joined:
    Mar 18, 2015
    Posts:
    6
    Hi
    I have similar problem but for me it's 100% not hardware related problem as mowing sprites seems to burn into the background. They are blurring when mowing but also leaves permanent almost invisible trace of it. I can see it looking for different angles.
    All shadows disappear when I stop the game.
     

    Attached Files:

    • game.png
      game.png
      File size:
      93.4 KB
      Views:
      1,370
  16. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    If you're able to capture that from the screen pixels themselves (ie not a photo of the screen) then its definitely not your monitor. Could be the buffer isn't getting cleared properly?
     
  17. Jhsosa

    Jhsosa

    Joined:
    Oct 8, 2017
    Posts:
    5
    I know this is an older thread but for anyone who stumbles onto this issue I can suggest something that made it far less an issue for me. At the beginning of your game set the target framerate to 60. (Application.targetFramerate = 60; On a DontDestroyOnLoad object.) Hopefully this helps some of you!
     
    KTB_Ratatata likes this.
  18. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    That's not really a good idea, considering that 120Hz and greater screens exist, and will only become more popular. Don't hard-code framerates into a game; anyone who's expecting 120+ fps will be understandably annoyed if you force it down to 60.

    --Eric
     
  19. Jhsosa

    Jhsosa

    Joined:
    Oct 8, 2017
    Posts:
    5
    Sorry, the frame rate is set by default to 30 for iOS from what I understood. My issue was that setting was too low and it was playing at high rates on other platforms. It would be rather annoying if the platform could perform better and it didn't. Thanks for the input. I'll adjust it so it only happens on iOS.
     
  20. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    iOS does 120fps, on the iPad Pro models.

    --Eric
     
  21. WRDeadman10

    WRDeadman10

    Joined:
    Oct 29, 2017
    Posts:
    5
    Anyone Got Solution?
     
  22. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Get a screen with a faster response time. It's not anything caused by Unity.

    --Eric
     
  23. eriknastesjo

    eriknastesjo

    Joined:
    Aug 16, 2018
    Posts:
    13
    Got the same problem 2020. It's weird because I haven't noticed this in other games apart from Terraria when the player runs fast... But I guess it must caused by high color contrasts together with screen with low response time (although my screen is very new and wasn't cheap).
     
  24. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    This was just discussed in another topic and it was established that Unity does not in fact somehow magically add a blur effect. That would take a specific effort and can't happen on its own. If you take a screenshot (rather than taking a picture of the screen with your phone), you won't see any ghosting. It's an inherent problem with most LCD panels, expensive or otherwise.

    --Eric
     
    MelvMay likes this.
  25. sHassan-XansrTech

    sHassan-XansrTech

    Joined:
    May 15, 2023
    Posts:
    16
    This is same think happening in my project, when a 2d ball moves in a speed above 12. I tried lots of ways to but neither of them is fixing my issue. Help Me if anyone one can.
    20230522_182824.jpg 20230522_182825.jpg 20230522_182824.jpg
     

    Attached Files:

  26. Chris-Trueman

    Chris-Trueman

    Joined:
    Oct 10, 2014
    Posts:
    1,260
    Stop reviving old threads. Create your own please with more information than pictures.
     
    ModLunar likes this.
  27. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,316
    As above, do not hijack and duplicate posts. The ghosting effect is your monitor, your camera (etc) not Unity. Look at the number at the top, you can see multiple digits.

    If you cannot capture this effect without taking a picture then it's your monitor only.

    Read the threads you've had hijacked; you'd see this information.

    Thanks.
     
    ModLunar likes this.