Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Problem with 2D polygon animation

  1. #1
    Junior Member Newbie
    Join Date
    May 2007
    Posts
    7

    Problem with 2D polygon animation

    Hi,
    I have animated a square polygon , but what I've found is that the outer edges of the square I'm animating is "fuzzy". However, when the animation stops, it's smooth. The problem only affects the outer most pixels on the edge of the object.
    Does anyone have any idea on what the problem is and how I can fix it? I was thinking that it might be related to subpixel accuracy, but if that was the case, wouldn't the problem exist after the object stops moving? Also, can sub pixel accuracy problems even occur on an edge is perfectly vertical? I made sure the double buffering is working correctly.

    Any help is greatly appreciated.

    Thanks!
    George

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Problem with 2D polygon animation

    If your display is LCD-based, I would say the response time of the screen is too slow.

    Do you have a screenshot ?

  3. #3
    Junior Member Newbie
    Join Date
    May 2007
    Posts
    7

    Re: Problem with 2D polygon animation

    Hi ZbufferR,

    I wasn't able to capture any images that illustrate the problem. This seems to point to something related to the actual process of refreshing/displaying the image and not the image itself. My display is an LCD. How could I tell if the response time is too slow? What could I do to fix the problem?

    Thanks!
    George

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    3,574

    Re: Problem with 2D polygon animation

    How could I tell if the response time is too slow? What could I do to fix the problem?
    You're on an LCD. Unless you bought one with an especially fast response time, it's probably slow. It's one of the drawbacks of LCDs, and one of the advantages of CRTs.

    There's really nothing you can do about it outside of buying a monitor with a fast response time. At best, you can play with the foreground and background colors to find one that still provides good color separation, but isn't as bad on your monitor.

  5. #5
    Junior Member Newbie
    Join Date
    May 2007
    Posts
    7

    Re: Problem with 2D polygon animation

    I was searching the internet and came across the following piece of code:

    long sync = 1;
    CGLSetParameter(CGLGetCurrentContext(), kCGLCPSwapInterval, &sync);

    I don't fully understand how it works but I think it ties the context refresh to the display's refresh rate. Would this code help my problem?

  6. #6
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Problem with 2D polygon animation

    no.
    vsync /*SwapInterval only help reduce the "tearing", that is, horizontal cuts due to difference between display refresh rate and drawing refresh rate.

    I wasn't able to capture any images that illustrate the problem
    So you can't fix that by code. As korval said, try using similar colors (gray/lightgray). Try faster or slower animation.

    Are you coding on a Mac ?

  7. #7
    Senior Member Regular Contributor
    Join Date
    Jun 2006
    Location
    Edinburgh - Scotland
    Posts
    146

    Re: Problem with 2D polygon animation

    Originally posted by whippet0:
    How could I tell if the response time is too slow?
    Google the make of monitor and see the refresh time. LCDs for a quite a while have actually been good enough for games (16ms was around a couple of years ago and was acceptable). However if it's not a full screen render like most FPS games then the effect will be more noticeable e.g. the worse case scenario is probably something like a white square moving across a black background.

    Watch that sometimes they give stupids values like 1ms refresh when they are talking about changing a grey pixel to black. If it's a popular monitor you should find lots of info on it or at least on refresh times and how they affect the display.

    --Stuart.

  8. #8
    Member Contributor
    Join Date
    Mar 2006
    Posts
    53

    Re: Problem with 2D polygon animation

    That's for sure!

    White lines on a black background really looks bad, lots of flicker, even on my Samsung SyncMaster 204B, which has a reported response time of 5ms. The way they measure response time can vary, so sometimes the numbers can be a little misleading.

    While the worst case is kind of nasty, I hardly ever notice ghosting in games or anything else for that matter, just the wireframe stuff mostly.

    Think of it as free motion blur

  9. #9
    Junior Member Newbie
    Join Date
    May 2007
    Posts
    7

    Re: Problem with 2D polygon animation

    Are you coding on a Mac ?
    Yes, I'm using an iMac (17" G5). Does using a Mac make any difference?

  10. #10
    Junior Member Newbie
    Join Date
    May 2007
    Posts
    7

    Re: Problem with 2D polygon animation

    Originally posted by Stuart McDonald:
    However if it's not a full screen render like most FPS games then the effect will be more noticeable e.g. the worse case scenario is probably something like a white square moving across a black background.
    That's exactly what I was trying to do! I was moving a square across a black background.

    Is the problem worse when it is not in full screen mode? Do you know why that might be?

Page 1 of 2 12 LastLast

Similar Threads

  1. 3D Animation Problem
    By imported_Rodrigo in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 08-02-2010, 08:55 AM
  2. animation problem
    By taztoooz in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 04-29-2009, 02:29 AM
  3. animation problem
    By vhn2000 in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 02-22-2005, 05:44 AM
  4. Animation problem
    By in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 01-12-2005, 10:07 AM
  5. Animation problem, again...
    By The_V|k|ng in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 03-01-2002, 08:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean