Real Head Motion for rf2 rebooted 1.0.3

Discussion in 'Plugins' started by magicfr, Jul 5, 2014.

  1. magicfr

    magicfr Registered

    Joined:
    Jan 4, 2012
    Messages:
    301
    Likes Received:
    8
    What this Apps is doing

    Biological facts
    The feel of​ equilibrium, acceleration, gravity, and so bumps are not feel by the eye but with the inner ear. Which is made of liquid and crystals in circular tunnels.

    When the inner hear feels bumps and head motion, it instinctly moves your eyes to soften/filter/remove those bumps.

    2 experiences to demonstrate that.
    1) when put somebody on a chair, in complete dark, you film his eyes with an infrared caemras, you turn the chair, is eyes will roll too, even if he see nothing

    2) this one you can do it yourself, looks at in front of you, at your screen, now shake your head, the vision will not move.

    When there is conflicting information from inner hear and eye, you feel strange, it's difficult to focus on the road, and you can have nausea.

    What happens in a car
    When you are driving, you are looking the road, and all the bumps are filter/corrected by your inner ear, so the viewing of the track is smooth and it's the car cockpit that moving around you.

    What happens in a Sim
    Because you are sitting on a standing chair/seat, your head is not moving at all, so the inner ear is not working, the eye don't correct the bumps.
    That's make 2 issues :
    1) you can't focus on the road, the road is shaking and not smooth, it's difficult to drive
    2) you can get nausea because you have conflicting information from eyes and inner ear.

    How it should be in a Sim
    The camera should stayed focus on the track and not locked to car cockpit,that's what my App is doing by filtering bumps and slopes.



    Download
    RealHeadMotionRFactor2_1.0.zip to download on my website. File is on bottom, it's a google site, so don't click the file but the down arrow on the right.

    Instaltion
    64bit
    Just unzip archive file, then copy RealHeadMotionRFactor2_x64.dll and RealHeadMotionRFactor2.XML to rFactor2\bin64\plugins

    32bit
    Just unzip archive file, then copy RealHeadMotionRFactor2.dll and RealHeadMotionRFactor2.XML to rFactor2\bin32\plugins

    Edition JSON file
    in rFactor 2 player.JSON



    Code:
    "Car Vibration Mult1":0,
        "Car Vibration Mult1#":"Primary engine vibration multiplier affects position of cameras attached directly to the car",
        "Car Vibration Mult2":0,
        "Car Vibration Mult2#":"Secondary engine vibration multiplier affects orientation of cameras attached directly to the car",
        "Center Mirror Horiz":0,
        "Center Mirror Horiz#":"use Ctrl+Alt+Seat* controls to save by vehicle",
        "Center Mirror Size":1,
        "Center Mirror Vert":0,
        "Cockpit Vibration Freq1":31,
        "Cockpit Vibration Freq1#":"Primary rate of vibration affects eyepoint position (higher framerates allow higher rates)",
        "Cockpit Vibration Freq2":37,
        "Cockpit Vibration Freq2#":"Secondary rate of vibration affects eyepoint orientation",
        "Cockpit Vibration Mult1":0,
        "Cockpit Vibration Mult1#":"Primary aerodynamic vibration multiplier affects eyepoint position (base magnitude is in VEH or cockpit file)",
        "Cockpit Vibration Mult2":0,
        "Cockpit Vibration Mult2#":"Secondary aerodynamic vibration multiplier affects eyepoint orientation (base magnitude is in VEH or cockpit file)",
    
    Put all vibration MultX to 0



    Configuration
    Just edit RealHeadMotionRFactor2.xml

    Code:
    <RealHeadMotion><!-- Type =  Inertia / LinearRegression / LockToWorldHorizon / LockToCockpit -->
        <Filter Name="PitchFilter"    Type="Inertia"    Min="0"        Val="0.99"    Glance="0.4"    Offset="-2"    />
        <Filter Name="RollFilter"     Type="Inertia"    Min="10"    Val="0.90"    Glance="0.75"    Offset="0"      />
    </RealHeadMotion>
    
    For both head/eye angle Pitch and Roll, that will be filtered, you can choose between 4 types

    LockToCockpit : no filtering, the head will follow cockpit
    LockToWorldHorizon : the Head angle is lock to world horizon, so if , for example, you set this type for RollFilter, the head will never roll in world coordinate, the head will stay straight
    Inertia : Inertia filtering ( default ), Choose a filter Val between 0.0 and 1.0, It's my preferate choice. If you set to 0 it will be like LockToCockpit ( no filtering ) ,if you set to max 1.0 it will be like LockToWorldHorizon ( maximum filtering )
    LinearRegression : another filtering, give different result. Val filter can be above 1.0

    Min : if car angle is inferior than Min value, then the filter act like a LockToWorldHorizon.
    Val : the filter value
    Glance: the max angle glance value put same value than player.JSON ( those are default value ).
    Offset : a fixed offset

    the XML is read everytime you enter the track, so you can edit while in PIT.

    Version
    1.0.3: - DLL now load settings from same location than DLL file.
    1.0.2 : - runtime library linked as static, should not need vc_redist anymore
    1.0.1 : - added fixed offset param
    1.0 : -rebooted version, recoded from scratch because main PC is on support, I don't have access to my main source code
    - add support for 64bit version


    [​IMG]
     
    Last edited by a moderator: Oct 19, 2014
    Adylski and Gupster like this.
  2. magicfr

    magicfr Registered

    Joined:
    Jan 4, 2012
    Messages:
    301
    Likes Received:
    8
    Updated 1.0.1 : - added fixed offset param

    What's next, I'm going to implement back my own, G forces code.

    If you have request , don't hesitate, I'll study if it's fit my plug and if I can do it.

    Cheers,

    ps : latest build looks way better on my ATI, card, I must try performances in triple screen though, only tested on small windows 720p to code my plug ;)
     
  3. MMartin

    MMartin Registered

    Joined:
    Oct 30, 2010
    Messages:
    516
    Likes Received:
    3
    Many thank Seb, I'll try it later.
     
  4. magicfr

    magicfr Registered

    Joined:
    Jan 4, 2012
    Messages:
    301
    Likes Received:
    8
    You'r welcome.
    ps : tried with triple screen, get half FPS I get in AssettoCorsa with same configuration... At least now it's look as good as nvidia on ATI.
     
  5. KeiKei

    KeiKei Registered

    Joined:
    May 24, 2012
    Messages:
    805
    Likes Received:
    37
    Thanks! Will test this new plugin...
     
  6. emha76

    emha76 Registered

    Joined:
    Oct 11, 2013
    Messages:
    128
    Likes Received:
    9
    Missing msvcr120.dll. Any ideas what to do?
     
  7. MJP

    MJP Registered

    Joined:
    Oct 5, 2010
    Messages:
    988
    Likes Received:
    20
    You need to install the Microsoft Visual C++ 2013 runtimes.
     
  8. magicfr

    magicfr Registered

    Joined:
    Jan 4, 2012
    Messages:
    301
    Likes Received:
    8
    yeah, plugin is compiled with Microsoft visual 2013.
     
  9. Minibull

    Minibull Member

    Joined:
    Sep 28, 2012
    Messages:
    1,557
    Likes Received:
    18
    Ahh yes, I used this for quite a while, made a big difference when driving IMO. My only issue was when you go up or over a hill, the camera would get pushed down into the drivers chest or up to the roof, haha
     
  10. emha76

    emha76 Registered

    Joined:
    Oct 11, 2013
    Messages:
    128
    Likes Received:
    9
    Ok, i've downloaded and installed vcredist_x64.exe but dll is still missing. :/
     
  11. magicfr

    magicfr Registered

    Joined:
    Jan 4, 2012
    Messages:
    301
    Likes Received:
    8
    That's strange , did you reboot? anyone else with same problem?
    Do you use 32bit or 64bit version of rFactor 2 ?
    Did you see that there's 2 package if you have windows 32bit or 64bit ?
    vcredist_x86.exe
    vcredist_x64.exe


    If you have a car/track combination with the new plug where it's still doing it, I'll be happy to check this, any filtering implies a bit of delay , but it should only happens when slope change, if the head is watching down the whole way you climb the slope, it's a bug, I must fix.
     
    Last edited by a moderator: Jul 6, 2014
  12. gabriel666

    gabriel666 Registered

    Joined:
    Jan 15, 2012
    Messages:
    204
    Likes Received:
    0
    Hi magic, first of all thanks for the effort, and yes, same problem here, last night tried to install vcredist_x64 and x86 without result, in this moment I am reinstalling, I have W7 x64, when finished I'll be back to comment on whether it worked or not.
     
  13. emha76

    emha76 Registered

    Joined:
    Oct 11, 2013
    Messages:
    128
    Likes Received:
    9
    I have Win7 64 bit, but I run rF2 32 bit. Do I have to install vcredist_x86.exe?
     
  14. magicfr

    magicfr Registered

    Joined:
    Jan 4, 2012
    Messages:
    301
    Likes Received:
    8
    Yes.
    I know... microsoft stuff :(
     
  15. gabriel666

    gabriel666 Registered

    Joined:
    Jan 15, 2012
    Messages:
    204
    Likes Received:
    0
    Well ... in my case the solution was this:
    vcredist_x86.exe to install the magic he shared and Reboot.
    Download the file, msvcr120.dll, leave the link to just uploaded the file: https://www.mediafire.com/?v8ry38573xc8bcs
    I copy and paste in system folders: Win 7, x32 and x64 just in case:

    C:\Windows\SysWOW64 <--- x64

    C:\Windows\System32 <--- x32

    And ready, in my case was solved, I hope that works for someone else, thank you very much for the excellent plugin magic. ;)
     
  16. magicfr

    magicfr Registered

    Joined:
    Jan 4, 2012
    Messages:
    301
    Likes Received:
    8
    Your welcome, sorry about this microsoft mess... when I'll have time , I should try GCC, for simple plug like this it would be better as it doesn't need VC redist.

    I just drove 3 laps at the Ring 1.5 from PLeclerc with the Houston G4 , one of the most, up/down hill track I know, and I didn't have the head "in the chest" at any time.
     
    Last edited by a moderator: Jul 6, 2014
  17. emha76

    emha76 Registered

    Joined:
    Oct 11, 2013
    Messages:
    128
    Likes Received:
    9
    Thanks guys. Now it works!
     
  18. MMartin

    MMartin Registered

    Joined:
    Oct 30, 2010
    Messages:
    516
    Likes Received:
    3
    Thank you, it works fine!!!
    Good job!
     
  19. alpha-bravo

    alpha-bravo Registered

    Joined:
    Dec 22, 2012
    Messages:
    1,379
    Likes Received:
    31
    Thanks Seb I was truly afraid to loose this plugin which I use since my first rF2 days.
    Now I'm relaxed again :)
     
  20. Deadpedal

    Deadpedal Registered

    Joined:
    Nov 5, 2011
    Messages:
    249
    Likes Received:
    6
    The world is right again. Thank you, Seb!
     

Share This Page