Real Head Motion Plugin 0.1beta

Discussion in 'Plugins' started by magicfr, Jan 19, 2012.

  1. Velo Wringer

    Velo Wringer Registered

    Joined:
    Jan 17, 2012
    Messages:
    7
    Likes Received:
    0
    Yeah it's hard to find the right words, to say what you see ...


    Simply said, I wanted to keep the head (=view =camera) horizontal at all times.
    So the landscape stays horizontal ;) and the car aligns to whatever the angle of the road - bumps, up/down banking etc.

    This is the point that is always the most difficult, and the most subjective: you always perceive (see, feel, want), that the horizon is level, even if you tilt your head. Think of motorcyclists, they keep their heads horizontal.
    (fun but true detail: even each eye tries to stay horizontal - take a close look in the mirror and tilt your head :) )

    ---------------

    Now what you tell me about your NASCAR ride (cool! and jealous) throws everything upside down so to speak haha! ;)
    So you say after a short while your head aligns with the gravity and you see the track flat again?
    If that is how it is in real life then your plugin is spot on and I am happy with it. After all we want realism in our sims.



    some sidenotes:
    True, can't remember seeing nascar drivers with their neck angled at 45 degrees. Motorcyclists probably keep their heads level to avoid seasickness with the rapid changing angles. On ovals no change of direction of course. F1 drivers lean their heads into corners but still perceive the horizon flat.

    It's a difficult subject :confused:
     
  2. magicfr

    magicfr Registered

    Joined:
    Jan 4, 2012
    Messages:
    332
    Likes Received:
    27
    For Nascar, when you are in the banking, the lat G are greatly reduced by the banking.
    F1 drivers lean into the corner to compensate the enormous G's they take,true, and that's true that the brain still trying to move eye ball to have flat vision.
    I did some track day on motorcycle too :) I more a fan of motorcycle than race car actually. I never miss a MotoGP race at TV.
    If you look some you will se that the motorcyclist , at the begining of turn, when the motorbike start to lean, they instinctly compensate, but in the turn their head is compensating compare to the lateral G's.
    Look at this slowmotion video http://www.youtube.com/watch?v=Z4snkUUolJ0 , you don't see their head vertical, or even trying.

    Still, if you want to have my plugin to be always horizontal, put

    PitchFactor = 0
    PitchFactorNeutral = 0
    HighPitchFactor = 0


    RollFactor = 0
    RollFactorNeutral = 0
    HighRollFactor = 0


    I just tried it, it works, that's mean that in high climbing you look at the dashboard ( extrem exemple ).

    anyway... have to post for new version ;)
     
  3. magicfr

    magicfr Registered

    Joined:
    Jan 4, 2012
    Messages:
    332
    Likes Received:
    27
    Version 0.3

    Hi guys,

    New version :)

    1) Change some stuff in the Inner Ear simulation.. I remove the deltaPichFactor, it's too complicated.
    Now It is HighPitchFactor, so you can control the speed of the head/eye for High angle.
    So if you set HighPitchFactor = 5, the Eye/Head move 5time faster at max Angle than neutral ( compare to Car )

    2) Added G Force simulation ;)

    3) Added variable to enabled/disabled each part.
    Code:
    UsePitchFactor		=	1
    UseRollFactor		=	1
    UsePitchGForce		=	1
    UseRollGForce		=	1
    
    4) Added a defaultPitch so you can choose the Neutral pitch in the cockpit.
    Code:
    PitchDefault		=	-5
    





    ZIP archive updated V6 at my dev web site ;)

    I set GForce quite low , because I like it subtle ;)

    Here a copy paste of INI file for explanation.
    Code:
    //**************************************************************************************************************
    //**                           G force acting on Head simulation
    //**************************************************************************************************************
    HeadMass                =    15        //---- Head mass, the bigger, the slower the motion will be
    
    
    PitchNeckForce            =    1000    //---- Neck force, higher mean the neck will act stronger against G, back to                                   //---- neutral faster
    PitchNeckDamping        =    100        //---- Neck damping
    
    
    RollNeckForce            =    1000
    RollNeckDamping            =    100
    
    
    UsePitchGForce            =    1            //--- Do G Force simulation for pitch
    
    
    PitchAccelMin            =    2.0            //--- Min G Force beforce forcing on the neck
    PitchAccelMax            =    10.0        //--- Max G Force  ( Clamping Value )
    PitchAccelFactor        =    1.0            //--- Factor for Acceleration
    PitchBrakeFactor        =    1.0            //--- For braking
    
    
    //-------------- Delta accel is the Speed of how the G Force is changing
    //-------------- this factor is a multiplicator the the Normal Factor above.
    PitchAccelDeltaMin        =    0.0    
    PitchAccelDeltaMax        =    2.5    
    PitchAccelDeltaFactor    =    3.0
    PitchBrakeDeltaFactor    =    3.0
    
    
    UseRollGForce            =    1            //--- Same for Roll
    
    
    RollLatAccelMin            =    2.0
    RollLatAccelMax            =    8.0
    RollLatAccelFactor        =    0.5
    RollLatAccelDeltaMin    =    0.0
    RollLatAccelDeltaMax    =    3.0
    RollLatAccelDeltaFactor    =    2.0
    
     
  4. Velo Wringer

    Velo Wringer Registered

    Joined:
    Jan 17, 2012
    Messages:
    7
    Likes Received:
    0
    Thanks for v.6, trying it out now.

    Great vid, right it seems it is a balancing act between Gforces and something else, the Will To Live probably ;)
    (I got my motorcycle license years before my car license btw. I spent many years on 2 wheels :) :) )
     
  5. magicfr

    magicfr Registered

    Joined:
    Jan 4, 2012
    Messages:
    332
    Likes Received:
    27
    my Ducati 696 is my every day ride to go to work :D
    Well, except for 2 month in a year, hard to ride on snow :p
     
  6. Velo Wringer

    Velo Wringer Registered

    Joined:
    Jan 17, 2012
    Messages:
    7
    Likes Received:
    0
    Sweet ride!
    Italian bikes are something special. I had a Laverda 750SF
    (this thread is going to derail ;))
     
  7. SLuisHamilton

    SLuisHamilton Banned

    Joined:
    Jan 22, 2012
    Messages:
    860
    Likes Received:
    20
    Little bit strange when at 0: 38 and 0:47 on video the head of driver seems to look up or still looking up when the car go reverse. Could you upload a video in split screen wich one side appears default effect of rF2 and the other the effect of head motion plugin?
    At 0:31 another strange thing: the head try to compesate the body movement caused by car inclination, remaining in the position when the car is on track. If this happened for real, pilots on f-indy or nascar would have some serious problems with their necks when leave the cars. It will be very funny interviewing one of then with their right ears close to their shoulders after so many time in this position.

    off: are you driving with a keyboard?

    edit- this is the video i´m talking about (has to put in this post because the original was edited. maybe the guy who posted doesn´t know when editing some post make discussions about the original post pointless):
     
    Last edited by a moderator: Jan 27, 2012
  8. magicfr

    magicfr Registered

    Joined:
    Jan 4, 2012
    Messages:
    332
    Likes Received:
    27
    SLuis: everything is tunable in the INI file, For the video I setup for exagerated effect so people can see really what happens, also in this old video G-Force was not simulated yet, and finaly for the video I was playing with X360 pad, the purpose was not to make hot laps.
     
  9. GTrFreak

    GTrFreak Registered

    Joined:
    Dec 7, 2010
    Messages:
    376
    Likes Received:
    7
    Is there maybe some sort of video showing the latest version..?
     
  10. SLuisHamilton

    SLuisHamilton Banned

    Joined:
    Jan 22, 2012
    Messages:
    860
    Likes Received:
    20
    Thanks for the answer and sorry for my english.

    I am always hesitant with these types of plugins that try to simulate the movement of the head (like TrackIR) because in the end I'm always with my head still in front of the screen and what happens on screen compatible with the natural state of my body. I understand that a difficulty has to be added to the simulator for it to fulfill his function to simulate what happens to a pilot in these situations but it always becomes a problem.
    I would suggest you to make a new video with gforces and using a wheel, not for hot laps but for smoother moviments. With this kind controller you use seems you are in a train track.
    Anyway, you´re doing a great job. Thanks to people like you and the job you´re done here we have great simracing games available in the market.
     
  11. GauchoRS

    GauchoRS Registered

    Joined:
    Nov 23, 2011
    Messages:
    471
    Likes Received:
    9
    well done, magicfr !! I love the G-Force Simulation. Gets really amazing in a F1 at Eau Rouge.

    [​IMG]
     
  12. magicfr

    magicfr Registered

    Joined:
    Jan 4, 2012
    Messages:
    332
    Likes Received:
    27
    Added 2 video that show latest version V0.6
     
  13. SeKa

    SeKa Registered

    Joined:
    Oct 5, 2010
    Messages:
    162
    Likes Received:
    1
    Thank you for this great work magicfr. This is a defining step forward.

    Greetings from a Honda rider. ;)
     
  14. taufikp

    taufikp Registered

    Joined:
    Nov 14, 2010
    Messages:
    609
    Likes Received:
    16
    @magicfr I made a "comparison" video between standard motion and RealHeadMotion. IMO, the difference is too minimal to be seen in a video. I can feel it though while driving. I think the default value for RealHeadMotion is too subtle. Maybe you need to pump up the value so people can see right away and, naturally, they will find a way to tone it down. Thanks for the great plugin! :D

     
  15. Carbonfibre

    Carbonfibre Registered

    Joined:
    Oct 5, 2010
    Messages:
    70
    Likes Received:
    0
    It's fascinating watching this develop. I'm so glad we've got a mod like this, and THIS early too. :)

    I was just wondering, you're currently calibrating your plugin to be subtle and realistic at the moment... But would it be possible to show us how to have a very exaggerated head-tilt INTO the corners, just for fun?

    I remember modding head tilt in rF1 but having to compromise by binding it too steering input, and not actually g-forces. But it seems binding head-tilt correctly to g-forces is now possible with your plugin? I would like to see the result of that if I may. ;)
     
  16. magicfr

    magicfr Registered

    Joined:
    Jan 4, 2012
    Messages:
    332
    Likes Received:
    27
    Thanks, and Yep, on a small mosaic screens it's even harder to see ;)
    I will do a "DemoShow" video this evening.
     
  17. taufikp

    taufikp Registered

    Joined:
    Nov 14, 2010
    Messages:
    609
    Likes Received:
    16
    @magifr No problem. By the way, do you have any plan to do a tutorial of 'how to make rF2 plugin'? I just feel lost after reading the code from ISI, without proper tutorial or document.
     
  18. MaXyM

    MaXyM Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,774
    Likes Received:
    29
    first you have to know C++
    After this you will have no problem to read code from ISI.

    plugin itself provides a few methods periodicaly called by game engine. you just have to write body of these functions using data passed to them via argument (if any). all data structures and available methods are described in header files. there is nothing left to know supposing you know how to write data into file or so.
     
    Last edited by a moderator: Jan 27, 2012
  19. magicfr

    magicfr Registered

    Joined:
    Jan 4, 2012
    Messages:
    332
    Likes Received:
    27
    The ISI internal plugin sample is very simple and straight forward. It contains few errors, for example the deltaTime is float deltaTime and it must be double deltaTime, but If you look at this thread http://isiforums.net/f/showthread.php/2908-Does-Hardware-Input-is-working, I already post about it.
    Do you have any C++ programmer expérience? If not, even the best tutorial will not help you.
     
  20. taufikp

    taufikp Registered

    Joined:
    Nov 14, 2010
    Messages:
    609
    Likes Received:
    16
    Yes, I do have basic knowledge of C++ and I understand the codes in the example given. But without documented API or tutorial makes me rather uncomfortable, since I hadn't write any C++ code for a long time (PHP and JavaScript really spoiled me!).

    So what I need to build a plugin is (at least) the example.cpp and other three files in the 'include' directory, am I correct? If so, I just need to find myself a free C/C++ compiler then.

    Sorry for being off topic. :D
     

Share This Page