Wikis > Visual Pinball Knowledge Base > Nudge filter and nudge gain

 

The location of nudge settings varies by the version of Visual Pinball that you are using.  These are the nudge settings in Visual Pinball 10.2.  They are accessed from the menu: ‘Preferences’ -> ‘Keys, Nudge and DOF…’

Gain Settings (X-Gain and Y-Gain)

The Gain settings are just multipliers for the raw input from the accelerometer.  If you double the gain, you’ll double the amount of acceleration applied to the ball in the simulation for a given amount of physical acceleration read on the accelerometer.

The reason the Gain settings exist is that raw input from the accelerometer is in arbitrary units that vary by device, so we need some way to normalize the scale so that it produces sensible results in the simulation.

By mjr.  Source: http://www.vpforums.org/index.php?showtopic=37547&p=375618


Nudge Filter

The nudge filtering artificially injects a counter-acceleration of the type you’re seeing. If you think about it, the counter-acceleration is physically necessary: the basic Newtonian mechanics of the situation are such that a single acceleration in one direction would make the machine keep moving in that direction.  Now, we know that in reality the machine doesn’t actually fly off sideways never to return; it stays where it started, brought back to its resting position by spring-like forces in the legs. The accelerometer reads this reversal just like it reads the original nudge. So what’s the filter for?  It’s there because even though the accelerometer sees the reversal, Visual Pinball often misses it, due to sample timing in the input stream.

There are several contributors to the data loss – it’s a combination of the accelerometer’s ADC sampling frequency, the frequency of device-side USB report generation, the frequency of Windows-side USB report polling, and the frequency of Visual Pinball’s input polling.  In my testing, the net result is that Visual Pinball only receives from 30% to 60% of high-frequency fluctuations in raw accelerometer readings.

The filtering is there to correct for the data loss by artificially reconstructing what must have happened based on an internal model, essentially supplying the simulation with accelerations that keep the simulated machine from flying off sideways even when the real readings of those forces get lost in the input stream.

Based on the experimenting I did that led to the filter in the first place, I’m afraid I’m not very optimistic that putting in some kind of anti-filtering that intentionally ignores real readings would be beneficial.  If anything I think it would magnify the problems that the filter was meant to reduce, namely excessive asymmetrical accelerations on the simulated ball in response to nudges.

By mjr. Source:  http://www.vpforums.org/index.php?showtopic=37547&p=375632

©2017 VPinBall.com

Facebook Auto Publish Powered By : XYZScripts.com

Log in with your credentials

or    

Forgot your details?

Create Account