PiBoSo Official Forum

GP Bikes => Suggestions and wishlist => Topic started by: h106frp on July 12, 2015, 11:32:41 AM

Title: Force feedback of track surface
Post by: h106frp on July 12, 2015, 11:32:41 AM
Would it be possible too add force feedback rumble to reflect the 'feel' of the track surface?.

Having done a lot of laps it feels like it would be nice to have a bit of feedback when you hit bumps or rumble strips on track. I suppose it would be an indication of the vertical accelerations experienced by the rider.

Had a quick look and it seems straight forward to send the rumble signal using Xinput for left motor/right motor, if the sim sensed a sudden change in acceleration it could trigger a rumble signal of suitable magnitude and frequency
Title: Re: Force feedback of track surface
Post by: CapeDoctor on July 13, 2015, 04:23:15 PM
a big + 1 from me - this could/should help riders who use it to 'feel' the grip a bit more, i hope - currently it's a little vague, at least for me, and i often end up losing the front simply from a lack of feel (or track knowledge, lol)
it's the only area that i can see where GP500 still has a slight edge - you can 'feel' the front end grip much better, and can save a front end/low side a little easier than with GPB.
in most all other aspects, GPB is way ahead of GP500, but i do feel it's lacking a bit in front end feel.
that said, practise makes perfect, and so i'm still practising  8)
Title: Re: Force feedback of track surface
Post by: HornetMaX on July 13, 2015, 07:12:11 PM
To me it's mostly gimmick: it shouldn't be too hard to have something related to the vertical bike acceleration, but what for ?
To tell you you're on a curb maybe. Not much else this could do in terms of "feeling" ...

MaX.

P.S.
As I've been playing with XInput for the MaxHUD plugin (the combined triggers were too ugly to stare at, so I had to go down the XInput path, it will be in the next release), it should be relatively easy to do a test of this rumble stuff within the plugin. Of course, if the feature is useful (which I doubt), it should be integrated in GPB.
Title: Re: Force feedback of track surface
Post by: h106frp on July 13, 2015, 07:38:25 PM
Quote from: HornetMaX on July 13, 2015, 07:12:11 PM
To me it's mostly gimmick: it shouldn't be too hard to have something related to the vertical bike acceleration, but what for ?
To tell you you're on a curb maybe. Not much else this could do in terms of "feeling" ...

MaX.

P.S.
As I've been playing with XInput for the MaxHUD plugin (the combined triggers were too ugly to stare at, so I had to go down the XInput path, it will be in the next release), it should be relatively easy to do a test of this rumble stuff within the plugin. Of course, if the feature is useful (which I doubt), it should be integrated in GPB.

I was thinking along similar lines that the telemetry plugin velocity could be linked to the xinput plugin to give the option of rumble. I think rumble is just one of those things people expect to see implemented these days and maybe something that helps to sell a racing sim to a wider (console) audience.

Its more of an immersion thing - shakes on screen driving the rumble motors but then immersion = more simulation. They seem to be programmable for amplitude and 2 frequency ranges so it seems possible to give a decent sensible sensation of rider vibration. It is not a force feedback device but it would be a bit of fun  ;D.

I still have my variable frequency (speed) shaker to wire up to the RPM signal for a bit of engine vibration feel  :) I bet i have the only 0-16000 rpm rumble shaker

(https://lh6.googleusercontent.com/-O8CCTYG7_Fc/VaQRucPJxzI/AAAAAAAAAYk/u4gtgnyQ7w8/w1512-h849-no/WP_20150713_001.jpg)

It would be fun to feed the accelerations to some decent linear transducers though  ;) maybe a tri-axial arrangement of buttkickers.

Title: Re: Force feedback of track surface
Post by: HornetMaX on July 13, 2015, 09:09:48 PM
Quote from: h106frp on July 13, 2015, 07:38:25 PM
I was thinking along similar lines that the telemetry plugin velocity could be linked to the xinput plugin to give the option of rumble.
It's much easier than that: an output plugin has all the telemetry data, so you can pick on which value(s) you want to make your rumble depend on. First sight, I'd say CoG acceleration is a good candidate.

After that, you just need the plugin to use the xinput API (windows standard) and you're all done. You don't even need the (GPB) xinput plugin (which makes GPB able to read input from an xinput device).

It sounds like a 15min coding job, except the time one would need to tune it properly. I'll try to play with that and report back.

MaX.
Title: Re: Force feedback of track surface
Post by: h106frp on July 13, 2015, 09:33:43 PM
Exciting stuff  ;D

Might be nice to do a simple release with a gain slider for each axis acceleration into a mixer for each motor to experiment with the tuning.

I think a lot of people would appreciate this mod  8)

Are the accelerations relative to the bike axis or absolute relative to the world?

Title: Re: Force feedback of track surface
Post by: HornetMaX on July 14, 2015, 11:02:08 AM
If the wifey falls asleep this afternoon I'll give it a shot.

Likely there won't be fancy sliders (the plugin is only allowed to draw ... rectangles), but that won't be an issue.

MaX.
Title: Re: Force feedback of track surface
Post by: HornetMaX on July 14, 2015, 01:15:27 PM
Hmmm ... I can make the pad vibrate, that's easy. The hard part is: when and how should I make it vibrate ?

@h106frp: with the telemetry plugin activate full logging (dump_all=True in the MaXTM.ini), record 1-2 laps and have a look at the graphs of the X, Y and Z accelerations (with respect to the bike, X is lateral, Y is vertical and Z is longitudinal).

MaX.
Title: Re: Force feedback of track surface
Post by: h106frp on July 14, 2015, 01:41:19 PM
Work all day  :( but i will have a look this evening  :)

What is is like if you just feed the scaled values constantly to the vibration output?

The available range 0 to 65,535 might suggest an exponential non linear scaling could work best to give more output for more severe bumps. This would mean the small stuff is barely felt in the background running of the rumble motor.

Not sure how the 2 different motors 'feel' as i have not had a good game that used them effectively yet. From the description it would seem you would need to have a 'running' filter if you have to decide which motor due to event frequency  :(

I would guess the vertical acceleration would be the most useful for representing the vibrations felt through the bars and pegs.

Looking forward to giving this a try  :) Is the plugin a standalone or is it part of the telemetry plugin?
Title: Re: Force feedback of track surface
Post by: HornetMaX on July 14, 2015, 04:09:44 PM
Most likely it will be part of the HUD plugin as it has all the "infrastructure" for the menu, options etc and it makes more sense than in the telemetry plugin.

I'll see if I can come up with something like: convert the accelerations provided by GPB (X, Y, Z in bike's chassis frame) to world frame and have a look at the evolution of the Z acceleration (Z meaning vertical). Maybe some simple dependency on that would do it.

I'm tempted to have a vibration each time there's a gear shift: it's extra easy and could be funky :)

MaX.
Title: Re: Force feedback of track surface
Post by: h106frp on July 14, 2015, 05:35:20 PM
I like the idea of a bit of a bump from shifting gears and as you mention easy to detect in the telemetry. Rider off bike would be another easy one to trigger :)

I was wondering if you could separate the two motor  frequency ranges using a simple rolling average filter on the acceleration data stream, maybe with a kernel (cut off) equal to 1/4 or 1/2 a second worth of samples. The low passed output value going to the low frequency motor and the difference between this mean value and the peak in the kernel sample length going to the high frequency motor, a very simple but low overhead low/high pass filter.
Title: Re: Force feedback of track surface
Post by: BOBR6 84 on July 14, 2015, 11:08:20 PM
Maybe a little vibration when the rear wheel lifts slightly and touches the track again when braking hard  8)

Sounds great nice work!
Title: Re: Force feedback of track surface
Post by: HornetMaX on July 15, 2015, 07:12:33 AM
Still pondering the options ...

I think I'll do the "rumble on gear shift" anyway, that seems cool to me :)

For the rest, probably I'll start with the bike acceleration magnitude signal, send it through a digital bandpass filter and use the output do decide when and how to rumble.

MaX.
Title: Re: Force feedback of track surface
Post by: SKD on July 16, 2015, 12:11:30 PM
Happy to here you're working on this. I think the main problem with bike sims at the moment is that no matter how realistic it is, it still doesn't feel that way because you only have visual feedback. Feeling when you're near the limit could be a useful and fun feature.
Does Force Feedback with gamepads only feature vibration? Or also forces against the controll sticks? Just recently bought a force feedback gamepad but only played gp bikes so far, so I don't know. The force feedback for driving wheels is a very cool and useful feature!
Title: Re: Force feedback of track surface
Post by: Ian on July 16, 2015, 12:36:38 PM
Rumble when the front locks would help or when the rear locks
Title: Re: Force feedback of track surface
Post by: h106frp on July 16, 2015, 01:27:44 PM
Quote from: SKD on July 16, 2015, 12:11:30 PM
Happy to here you're working on this. I think the main problem with bike sims at the moment is that no matter how realistic it is, it still doesn't feel that way because you only have visual feedback. Feeling when you're near the limit could be a useful and fun feature.
Does Force Feedback with gamepads only feature vibration? Or also forces against the controll sticks? Just recently bought a force feedback gamepad but only played gp bikes so far, so I don't know. The force feedback for driving wheels is a very cool and useful feature!

Gamepads only tend to be rumble and we only have the data normally output to the plug in to work with but hopefully some meaningful vibration effects can be added in  :). Using the bike local accelerations hopefully some of the vibrations acting on the bike model will be reflected in the rumble signal,

I might finally get to see the 'rumble lighting' on my new GPX lightback controller working   ;D
Title: Re: Force feedback of track surface
Post by: HornetMaX on July 16, 2015, 03:18:31 PM
Quote from: SKD on July 16, 2015, 12:11:30 PM
Happy to here you're working on this. I think the main problem with bike sims at the moment is that no matter how realistic it is, it still doesn't feel that way because you only have visual feedback.
Right, but the rumble on the pad will not change that.

Quote from: SKD on July 16, 2015, 12:11:30 PM
Feeling when you're near the limit could be a useful and fun feature.
I don't think it is possible to detect "being near the limit" with the data we have at hand.

Quote from: SKD on July 16, 2015, 12:11:30 PM
Does Force Feedback with gamepads only feature vibration?
Only vibration.

Quote from: Ian on July 16, 2015, 12:36:38 PM
Rumble when the front locks would help or when the rear locks
Hmm, but both front and rear are already sliding way before they are completely locked.
To do this properly I'd have to have access to some internal data (velocity vector of the contact patch of each wheel), which I haven't.

I'm still thinking this won't give anything good but I'll give it a try.
The "rumble on gear shift" is already implemented: it's is kind of useless in terms of feedback but some may consider it nice to have.

MaX.
Title: Re: Force feedback of track surface
Post by: Ian on July 16, 2015, 04:42:33 PM
keep up the good work ;)
Title: Re: Force feedback of track surface
Post by: SKD on July 17, 2015, 05:56:16 AM
Ok, I'm no developer and  don't know which data the game gives you and how to interpret it. Still I think it's worth a try. Yes It might be that it's a useless feature, but I think the rumble when shifting or maybe when going over curbs or bumps could still be a fun feature.
Title: Re: Force feedback of track surface
Post by: CapeDoctor on July 17, 2015, 06:21:29 AM
agreed. as someone mentioned earlier, it adds to the all-important immersion factor, which is great for any sim :D
Title: Re: Force feedback of track surface
Post by: HornetMaX on July 17, 2015, 07:38:31 AM
Quote from: SKD on July 17, 2015, 05:56:16 AM
Yes It might be that it's a useless feature, but I think the rumble when shifting or maybe when going over curbs or bumps could still be a fun feature.
Rumble when shifting is done, that was trivial.

Rumble when on curbs: not sure I can detect that. Curbs in GPB tends to be either pretty flat or totally unusable (when not flat).

Rumble on bumps: which bumps ?! In GPB I can't think of a single track where there's a bump I'd like to have rumble on. Any examples ?

MaX.
Title: Re: Force feedback of track surface
Post by: Napalm Nick on July 17, 2015, 07:57:38 AM
How about rumble triggered only by fast changes in front suspension travel, capturing bumps, wheelie drops, initial brake dive and the like. Rumble magnitude could even reflect amount of compression.

Full of good ideas, me.  :D
Title: Re: Force feedback of track surface
Post by: Hawk on July 17, 2015, 10:44:40 AM
As far as I know, and I'm sure if I remember rightly, Piboso has also stated this in a past post, that FF(rumble) is directly related to the 3D mesh model of the track surface(including kerbs).

I suppose this makes sense, as the collision detection model is directly based on the 3D mesh model too.  :)

Hawk.
PS: So God help us if a track is built with BTB. LOL  :P ;D
Title: Re: Force feedback of track surface
Post by: HornetMaX on July 17, 2015, 12:48:30 PM
Quote from: Hawk UK on July 17, 2015, 10:44:40 AM
As far as I know, and I'm sure if I remember rightly, Piboso has also stated this in a past post, that FF(rumble) is directly related to the 3D mesh model of the track surface(including kerbs).
You're mixing FFB and rumble, they are separate things.

GPB (and all the other piboso games) do not have rumble but they have FFB: it is the steering torque applied by the environment.

MaX.
Title: Re: Force feedback of track surface
Post by: h106frp on July 17, 2015, 04:35:35 PM
Quote from: HornetMaX on July 17, 2015, 07:38:31 AM
Quote from: SKD on July 17, 2015, 05:56:16 AM
Yes It might be that it's a useless feature, but I think the rumble when shifting or maybe when going over curbs or bumps could still be a fun feature.
Rumble when shifting is done, that was trivial.

Rumble when on curbs: not sure I can detect that. Curbs in GPB tends to be either pretty flat or totally unusable (when not flat).

Rumble on bumps: which bumps ?! In GPB I can't think of a single track where there's a bump I'd like to have rumble on. Any examples ?

MaX.

For a lovely bumpy track try Donnington national - not for everyone but i think its great fun, reminds me a lot of old GP500 tracks for some reason  ;D

When i started the thread i was hoping that most of the vibrations would be described by the accelerations acting on the model as you see it on the screen -  do you think this is probably not the case?
Title: Re: Force feedback of track surface
Post by: HornetMaX on July 17, 2015, 06:49:17 PM
Will give Donington a try.

I didn't have a lot of time these last days: took a quick look at the telemetry from a lap on victoria with the 990.
The most promising signal seemed to be the VelY one (Y velocity of a point on the frame, expressed in bike's rotated frame).

So I coded a 2nd order high-pass bessel, filtered VelY with it and put a threshold + linear dependency on the result : the first quick test seems to be better than I thought.

MaX.
Title: Re: Force feedback of track surface
Post by: h106frp on July 17, 2015, 07:22:34 PM
Sounds promising, looking forward to giving it a try.