WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   Vsync prevents using fresh motion capture data in physics simulations? (

performlabrit 10-28-2013 06:51 AM

Vsync prevents using fresh motion capture data in physics simulations?
I'm seeking advice on a limitation that I believe is imposed by the coupling of the viz.go() loop speed to the vertical refresh rate. This limitation seems to prevent the use of peripherals with a high data rate in the physics engine (e.g. a motion capture system).

The issue is that, although one can update the physics engine rate faster than the V-Sync, this is done independently of any other updates, which may only occur at the speed of the mainloop, which is locked to the vertical refresh rate. In the case that one is using an HMD, this refresh is often restricted (60 hz, in many cases).

This is going to be a huge obstacle if one wants physics to be dependent upon a high-rate data-stream, such as motion capture. Take, for example, my own work, in which I am developing an immersive virtual environment in which the user hits a moving ball using a real-world racquet that is motion-tracked and represented in the virtual world. Because of restrictions placed upon the main loop, the sensed location of the racquet can only be refreshed at 60 hz - a rate that is VERY slow when tracking extremely fast, yet extremely spatially precise human movements. If racquet location is updated at only 60 hz, movement of the racquet will be heavily aliased, no matter the speed at which the physics engine updates. Swings will be inaccurate, and ball-to-racquet interactions even more-so.

You might suggest that movement of the racquet between frames could be predicted using the physics engine. I've tried this before, and have found it to be very inaccurate.

The ideal situation is one in which subroutines could be run at different rates, or the main-loop could be run at a rate faster than vertical sync.

Any solutions or advice?

farshizzo 10-31-2013 08:28 AM

Having the physics simulation run asynchronously from the main loop is not currently supported.

If you don't mind the tearing, you can disable vsync to have the main loop run as fast as possible:

If you would like to disable vsync, but still set a limit on the frame rate, you can use the viz.max_frame_rate option:

#Set max framerate to 120

performlabrit 11-05-2013 10:48 AM

then accurate real-time immersive interaction is not possible!
Thank you for the reply farshizzo. Unfortunately, the answer is a bit disappointing. The NVIS line of helmets requires a 60 hz input, and will not function if vsync is turned off, or >60hz. I study human visual-motor behavior, and cannot allow visual tearing in the stimulus.

Until this issue is addressed, accurate real-time immersive interaction is not possible. This is a huge impediment to my own research. I will workaround this issue for as long as I can, but forsee having to switch away from Vizard if this is not eventually addressed.

Please keep me updated!

Thanks again.

All times are GMT -7. The time now is 02:40 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC