PDA

View Full Version : annoying vibrating lines!



robert_s
11-12-2001, 11:48 PM
Hi all!!
Here I have a bit funny problem in my flight sim engine and I don't know if I can explain properly!! Imagine you see in front of you a horizontal line across the window you looking at.
say its about 1000 units on -Z so its quite far in my case but still clearly visible!
now when I move the planes nose up slowly looking all the time at the vertical line in front of me I can see on the window that the line obviously doesn't move it stays at the same position only plane moves. so on the window I can see the line moving down when you reverse physics ie. line moves plane doesn't. when I move the plane nose up slowly the line moves smoothly down the window but when I do same thing quickly then the line appears to vibrate ie. slightly going one unit up and down. It does that quickly so all you can see is a blured double line. When I slow down again it becomes more visible and I can see just one line.
I know it might be funny but its quite annoying!! May be you guys had same thing and can help me!!
Do you think this is caused coz of my plane movements?

[This message has been edited by robert_s (edited 11-13-2001).]

chowe6685
11-13-2001, 04:23 PM
Your problem might be depth buffer accuracy. Since you have the far clipping plane out past 1000 and probably want to keep it there, you should try moving the near clipping plane away from the viewer.

dorbie
11-13-2001, 05:48 PM
There could be many problems. It might be that you aren't rendering at full video refresh speed and see a double line, or that you haven't got swapbuffers sync'ed to video vertical retrace.

It could be that your drawing is not 'real-time' but varies in performance because you use some windows GUI callback timer to trigger your draw loop.

It could be that you are using a timer for your update but that there is too much noise in the values it is producing.

There are other potential issues like precision but I think these are less likely based on your post.

robert_s
11-14-2001, 12:05 AM
DORBIE! Yes you're right!! I am using a timer to determine how far to move. (velocitiy)
I thought about it coz when the velocity is low I can't see any distortion to the whole image but as soon as I increase the velocity then eveything becomes distorted. It looks very similar to the effect of a single buffer ie. you can see drawing in action.
Also I forgot to add when I hold eg. bottom arrow key to lift the planes nose up or down then almost every second the whole animation freezes for a short moment and then continues. The quicker you want to turn the more often this happens!! I am sure its something wrong with my timer!!! arghhhhhh.....
I am using almost the same approach as described in this book example. which you can download from here with source code http://homepage.ntlworld.com/robert.stuliglowa/projects/GL-Flightor/temp/demo.zip there is same problem as I have.. click/hold and move mouse quickly up and down! you'll c the horizon line and the rest rendered as in single buffer even though its double buffer! why is that????????? thx all for help!

pATChes11
11-14-2001, 10:33 AM
You should use the performance counter for games and such. Not the milliseconds counter (gets inaccurate over time), not a timer (I think it uses the millisecond counter, which would give it its inaccuracy... but I'm not sure), but rather, use the perf counter. VERY accurate counter. I get all 6 decimal places of a floating point number when I use it to count the frametime in my app, which gets around 500 FPS currently (should be much faster on my 750 MHz TBird... need a new mobo) E-mail me for an example of how to use it; I've forgotten (I'm writing an OpenGL app for a potentially commercial game, and I'm more worried about the UI than I am the timer, sicne it's already working) and I'm currectly at school.

robert_s
11-14-2001, 11:14 AM
hmm..... may be this is the problem but still not sure!
you said your app achives about 500FPS! interesting as its very high perfromance!! could I know waht is that? is it some GL app? would be cool to know something more about it!! http://www.opengl.org/discussion_boards/ubb/smile.gif
BTW I think your email is out of date as I got the message sent to u back from a Mail Admin. Please send it to my address rob1609@hotmail.com if you can?!
Thanks very much for your help!