Smooth player mounted camera. OpenGL vsync problem?.
by Peterjohn Griffiths · in Torque Game Builder · 05/09/2011 (3:47 am) · 3 replies
TGB 1.7.5 on Windows XP sp3.
I have come across a problem with a mounted camera to a player.
There is a slight flicker on objects when the camera moves with the player.
This happens more with a higher speed movement.
Its like the camera is snatched mid frame from one posistion to the next without finishing the output from the prev frame.
[How to recreate this glitch]
I have tested this by creating a new game, adding a starship, mounting the camera to the ship and using the shooter controls behavior to move the ship.
I create a nice bright background in layer 31 and add 4 black squares in layer 15.
When the ship moves, the edge of the black squares flickers slightly. Seems like the frame isn't finished being rendered before the camera moves or something.
I have built the game and sent it to a friend with a high power gaming machine and he also has the problem.
Must be built in the engine I would assume.
Maybe there is a way of forcing the current frame to finish output before the camera is moved, even if this means frames are skipped, there are 300+ FPS so its not the number of frames being output.
Anyone know how to stop this?.
I have come across a problem with a mounted camera to a player.
There is a slight flicker on objects when the camera moves with the player.
This happens more with a higher speed movement.
Its like the camera is snatched mid frame from one posistion to the next without finishing the output from the prev frame.
[How to recreate this glitch]
I have tested this by creating a new game, adding a starship, mounting the camera to the ship and using the shooter controls behavior to move the ship.
I create a nice bright background in layer 31 and add 4 black squares in layer 15.
When the ship moves, the edge of the black squares flickers slightly. Seems like the frame isn't finished being rendered before the camera moves or something.
I have built the game and sent it to a friend with a high power gaming machine and he also has the problem.
Must be built in the engine I would assume.
Maybe there is a way of forcing the current frame to finish output before the camera is moved, even if this means frames are skipped, there are 300+ FPS so its not the number of frames being output.
Anyone know how to stop this?.
#2
I think this needs to be tackled in the engine to give a better result.
Anyone know where you would delay the output of a frame?.
05/09/2011 (1:23 pm)
Well, turning on ATI's version of Vsync gets rid of the edges flickering slightly, but now the frames are not even, giving an uneven scroll.I think this needs to be tackled in the engine to give a better result.
Anyone know where you would delay the output of a frame?.
#3
www.garagegames.com/community/forums/viewthread/125885/1#comment-806755
05/15/2011 (9:49 am)
Fixed in this postwww.garagegames.com/community/forums/viewthread/125885/1#comment-806755
Torque Owner Peterjohn Griffiths
Default Studio Name
'visual anomalies': image tearing.
Caused when VSYNC is not enabled and the engine produces more FPS than the monitor refreshrate can handle.