Page 1 of 1

Objects ripple when camera moves?

Posted: Wed Aug 20, 2014 4:16 am
by danielmccarthy
When I move my player all objects around it begin to ripple anyone else experienced this? How can I stop it

Thanks,
Dan

Re: Objects ripple when camera moves?

Posted: Wed Aug 20, 2014 5:08 am
by kklouzal
Please give more detail and/or a screenshot/video if you can please. I can't quite grasp the issue from your description.

Re: Objects ripple when camera moves?

Posted: Wed Aug 20, 2014 10:42 am
by dearingj
Graphical 'rippling' can often be caused when your program doesn't synchronize its drawing of graphics with your display's vertical retrace period. The display ends up showing different pieces of the picture from two or more different frames. The fact that you only notice the problem when your camera moves suggests that this may be the cause, as it would be unnoticeable when there's little or no movement. The fix is simple: when you call createDevice, set vsync to true.

Code: Select all

video::E_DRIVER_TYPE type = video::EDT_OPENGL;
core::dimension2d< u32 > size = core::dimension2d< u32 >(640, 480);
u32 bits = 16;
bool fullscreen = false;
bool stencilbuffer = false;
bool vsync = true;
IrrlichtDevice* device = createDevice( type, size, bits, fullscreen, stencilbuffer, vsync )
Here's a relevant Wikipedia article if you want more information: Screen tearing

Re: Objects ripple when camera moves?

Posted: Wed Aug 20, 2014 7:15 pm
by randomMesh
dearingj wrote:The fix is simple: when you call createDevice, set vsync to true.

Code: Select all

video::E_DRIVER_TYPE type = video::EDT_OPENGL;
core::dimension2d< u32 > size = core::dimension2d< u32 >(640, 480);
u32 bits = 16;
bool fullscreen = false;
bool stencilbuffer = false;
bool vsync = true;
IrrlichtDevice* device = createDevice( type, size, bits, fullscreen, stencilbuffer, vsync )
AFAIK vsync only works in fullscreen mode.

Re: Objects ripple when camera moves?

Posted: Wed Aug 20, 2014 10:46 pm
by kklouzal
I can confirm vsync works in or out of fullscreen mode.