[REL] rFactor 2 automated camera plugin

Discussion in 'Other' started by HorCsa, Jul 23, 2015.

  1. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    This may be related to a change (not announced, possibly not intentional) where collisions are reported with some sort of calculated severity/impulse instead of 0.0-1.0.

    I've seen values in the order of 1000 or 1500 when this was reported, so maybe try much higher values than 15 or 20.
     
  2. JuanP006

    JuanP006 Registered

    Joined:
    Apr 24, 2014
    Messages:
    119
    Likes Received:
    61
    Sorry for the late reply. Have not been in the forum for awhile. Here are my settings. I do not get any replays with this.

    [AUTOCAM]
    auto=1
    autokey=0x60
    waitsec=30
    interest=12
    interestdiff=1.2
    onboarddiff=0.4
    onboardcam=1
    rearview=0
    rearviewcam=6
    camtest=no
    walkthrough=0
    showinpit=interestdiff
    lowinc=15.0
    highinc=25.0

    Cheers
     
    wrxxy likes this.
  3. HorCsa

    HorCsa Registered

    Joined:
    Jun 13, 2015
    Messages:
    28
    Likes Received:
    10
    Hi,
    I haven't been here for a while. :)
    I'm glad to see that the plugin is still working and useful to the community. I'm very happy to have created something memorable.

    @Javibeza sent me a private message, and the forum sent me an e-mail notification about it. I searched my backups and got lucky. \o/
    So I uploaded the source code to github.
    https://github.com/h0rcs4/rF2AutoCamPlugin
    I'm not a programmer and not so familiar with Visual Studio and github. I hope I did it right.
    The source code contains comments in English (and sometimes in Hungarian), I hope that helps.

    I updated the links in the first post.

    Use it, improve it.
     
    Last edited: Sep 8, 2022
    Javibeza, lagg, Corti and 1 other person like this.
  4. Javibeza

    Javibeza Registered

    Joined:
    Oct 5, 2010
    Messages:
    88
    Likes Received:
    72
    Thank you very much!!

    Let's see what we can do.
    Any volunteer to improve? I'm very noob programming but can try:D
     
  5. EmperorOfFinland

    EmperorOfFinland Registered

    Joined:
    Jan 26, 2021
    Messages:
    502
    Likes Received:
    1,098
    i had fun using the plugin when i hosted a league. good to see we can now improve it so everyone can enjoy nice automatic camera :D
     
  6. JuanP006

    JuanP006 Registered

    Joined:
    Apr 24, 2014
    Messages:
    119
    Likes Received:
    61
    Thank you for all the work you did. It is a great tool. Being used in our league for two seasons now and it works very well.
     
  7. Justifier

    Justifier Registered

    Joined:
    Apr 23, 2018
    Messages:
    44
    Likes Received:
    22
    Hi, unfortunately these settings don't seem to help with the persistent replays when there is contact with an immovable object (might be working with vehicle contact). I have also tried lowinc and highinc with 1000 and 1500 figures and still no luck :-(
     
    JuanP006 likes this.
  8. Justifier

    Justifier Registered

    Joined:
    Apr 23, 2018
    Messages:
    44
    Likes Received:
    22
    Many thanks @HorCsa for sharing this. @HorCsa is there any chance you can shed some light on the issue where we can't seem to stop automatic repetitive replays of "lowinc" and "highinc" regardless of the settings we try in there? Cheers
     
  9. JuanP006

    JuanP006 Registered

    Joined:
    Apr 24, 2014
    Messages:
    119
    Likes Received:
    61
    That is too bad. It works perfectly for us.
     
  10. Ferrari312

    Ferrari312 Registered

    Joined:
    Jul 20, 2015
    Messages:
    51
    Likes Received:
    50
    Are there install files for this anywhere? I see in the instructions on Git to "unzip" the dll but I don't see the dll anywhere in Git and I'm not a programmer so don't know how to compile it to get a dll. Also somewhat unrelated, an additional awesome feature would be to auto cycle through a specific list of drivers at the same time changing cameras. Would be totally hands off for people that don't have a dedicated person to be a broadcaster.

    *Edit disregard the "can't find file". I misread the first post and thought it was only rF1. Any thoughts about the auto-change between drivers anyone?
     
  11. HorCsa

    HorCsa Registered

    Joined:
    Jun 13, 2015
    Messages:
    28
    Likes Received:
    10
    Hi,
    This plugin is for rfactor2.
    You can find last release in right side on github page (direkt link: https://github.com/h0rcs4/rF2AutoCamPlugin/releases/tag/last ). There is the zip file which includes the dll.
    The plugin cycle camera throught drivers in formation, and end of the race. Depends on settings.
    The drivers selected randomly if nothing interrest hapening on the race. You can priorize top x place with parameters. This plugin much more than auto cycle throught drivers.
     
  12. HorCsa

    HorCsa Registered

    Joined:
    Jun 13, 2015
    Messages:
    28
    Likes Received:
    10
    I'm sorry, but I have not following the rfactor developments for many years. I think something changed in mResultsStream.
    Another possibility for incident detection failure is in the mod or track if cars always touch the ground or some immovable.
    You can log realtime any of the variables into SCOUT.txt for debugging if you uncommenting the /* LOG */ section in the code.
     
  13. HorCsa

    HorCsa Registered

    Joined:
    Jun 13, 2015
    Messages:
    28
    Likes Received:
    10
    another good starting point if you remove "Immovable" condition from incident detections. So it only reacts to car-car incidents.
    upload_2022-11-17_18-39-12.png
     
  14. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    720
    Likes Received:
    220
    Hello i tried the plugin and one time i was driving and it modified the camera while i was driving. Didn't know what happened i had to quit and disable fully the plugin.
    Do i need to disable the plugin when not using it ?
    I tried disabling it by default in the plugins config but i noticed that CTRL-A doesn't re-enable it ...
    What am i doing wrong ?
     
  15. Ferrari312

    Ferrari312 Registered

    Joined:
    Jul 20, 2015
    Messages:
    51
    Likes Received:
    50
    Thanks for the response @HorCsa .
     
  16. Ferrari312

    Ferrari312 Registered

    Joined:
    Jul 20, 2015
    Messages:
    51
    Likes Received:
    50
    @HorCsa any thoughts on how easy it would be to make it ignore AI? Sometimes we fill out the field with AI and I'd rather not have the camera on them.
     
  17. HorCsa

    HorCsa Registered

    Joined:
    Jun 13, 2015
    Messages:
    28
    Likes Received:
    10
    I don't know. As I say I'm not active in rFactor2 for many years. I don't know what is changed/updated in rFactor2 internals or telemetry data.
    You can find actually rfactor2 internals plugin and documentation here: https://www.studio-397.com/modding-resources/
    My plugin could be a starting point, and/or you can download an official example also.
    I just uploaded the source code to github for the community but i don't follow rFactor2 anymore. Now it's up to you what will happen this plugin.
     
    Corti and lagg like this.
  18. Ferrari312

    Ferrari312 Registered

    Joined:
    Jul 20, 2015
    Messages:
    51
    Likes Received:
    50
    Thanks for the information @HorCsa !
     
  19. Rujasu

    Rujasu Registered

    Joined:
    Feb 2, 2018
    Messages:
    88
    Likes Received:
    101
    I went ahead and attempted to build a version where I removed the replays with immovable objects with the change suggested above, and also removed the insufferable slowmo from replays. It's still a bit overzealous with the replays in crowded starts, but that'll smooth out as the field spreads.
    I don't know why it's like less than a tenth of the size of the original DLL, but it seems to be working?
    https://www.dropbox.com/s/wabb7swttdlx5yl/rF2autocam2.dll?dl=0

    Quick sample of it in action. The stutters are my PC being suboptimal.
    lowinc = 15, highinc = 40


    EDIT:
    So I couldn't help but notice, that the replay first jumps to the exact moment of the incident, and then five seconds before it, which causes quite a bit of CPU strain.
    These two editions fix that, with and without wall collision, but the downside is that multiple replay-worth collisions happening close together don't get show properly - the next replay just picks up from where the previous left off. I also shortened the length of the replays to almost half. Would want to reduce it further but that seems to take some extra work.

    https://www.dropbox.com/s/9nrlvbudzjexnze/rF2autocamFastWall.dll?dl=0
    https://www.dropbox.com/s/af7ormnu4d2cyib/rF2autocamFastNoWall.dll?dl=0

    Some Brands Hatch action with the very accident prone F1 1979 mod, low and high inc at 25 and 50, respectively. You can see the issue with the stacked incidents, but otherwise it seems to handle the situation quite well, even when half the field decides to have a picnic on track.
     
    Last edited: May 12, 2023
    DanRZ and Corti like this.
  20. F3n3k

    F3n3k Registered

    Joined:
    Feb 18, 2012
    Messages:
    87
    Likes Received:
    6
    Awesome plugin, i love it !
    It's work very well (version 2015) but in solo mode it try to change my cam everytime in race, can it's possible to add a button in assigniation custom plugin to deativate/active it ?

    Thanks a lot
     

Share This Page