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?
|