1. Stuck or having problems creating your mod?
  2. GPU Fatal Error? Intel HD Graphics 620/630 Crashes? Help us solve them!
    Dismiss Notice

Released "LookAhead" Interior Camera 2.0

Never drive into your blind spot anymore

  1. Mr_StickShift

    Mr_StickShift
    Expand Collapse

    Joined:
    May 11, 2019
    Messages:
    41
    I use quite a lot of mods, but my PC is lower spec - With only 4 cores, but ill try it in safe mode with just your mod enabled. And I'll post a video.
    --- Post updated ---
    Here is a video of me driving on "Nardo Ring" Watch the trees and lines on the road for the slow down, as it wasn't doing it so badly when I recorded it.
     

    Attached Files:

  2. Jeppoer

    Jeppoer
    Expand Collapse

    Joined:
    Jul 27, 2017
    Messages:
    24
    I'm also encountering the problem Mr_Stickshift has.
    When I switch from the normal 'Driver' can to 'DriveAhead' the fps decrease with about 20-30%
    I can't spot any errors related to this mod either sadly :/

    My specs:
    i7-7700K
    RTX 2060 Super
    32GB DDR4 - 2400MHz
     
  3. Neo

    Neo
    Expand Collapse

    Joined:
    Oct 31, 2015
    Messages:
    235
    @Mr_StickShift @Jeppoer
    Thanks for your reports. I looked at the performance in more detail and noticed a 20% fps decrease at my side as well. After further investigation i noticed a 8240% execution time increase of the "luaGC" process.
    @meywue or @synsol Is that the garbage collector of lua?
     

    Attached Files:

    • 20191114194556_1.jpg
    • Like Like x 2
  4. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    7,078
    Yeah, that is Garbage collector, my guess is that script uses something that is very expensive in GC or triggers some bug, idk really much of that side of things, but I know that some ways to code things can get surprisingly expensive and alternative way that appears more expensive at first glance can sometimes work better, programming for me is bit odd art.

    I did notice that I was getting only 56-58fps (happened only once, usually there is about 20% CPU load increase without drop below 60fps, but I have computing power to spare), CPU or GPU load was not maxed out, that was with ahead camera active, I think it was drive ahead, switching to driver cam fixed that.

    Also I need to read instructions more carefully as I have not noticed change to amount of camera movement with slider adjustment, I'm getting very little camera turn in, but as I haven't had time to read instructions properly it is my own fault :D
     
    • Like Like x 1
  5. Neo

    Neo
    Expand Collapse

    Joined:
    Oct 31, 2015
    Messages:
    235
    I might know why it uses so much more time to execute (or more precise, what an overhead gets generated which needs to clean up afterwards):
    Code:
    --lua\common\extensions.lua
    M.use = function(key)
      load(key)
      --log("W", logTag, "use(extName) is deprecated. Please use the following syntax: core_extensions.<modulename>.doSomething()")
      return rawget(M, key)
    end
    I used the "extension" module in my camera script in the render function. Every time I used "extension.use(...)" it triggers a not so light execution stack with a lot of different variables, tables. And these I think got collected from the GC. And that multiplyed by 5 :rolleyes:

    Afterall it works now as performant as the build-in driver camera. @fufsgfen, you can test it and compare it with the old code if you want to understand more whats changed ;) And thanks for your help on this.
     

    Attached Files:

    • Like Like x 1
  6. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    7,078
    It works perfectly now in terms of performance, lua is bit mystery to me, but slowly I learn bits here and there, chance to learn is always well appreciated! :D
     
    • Agree Agree x 1
  7. Neo

    Neo
    Expand Collapse

    Joined:
    Oct 31, 2015
    Messages:
    235
    • Like Like x 1
  8. Neo

    Neo
    Expand Collapse

    Joined:
    Oct 31, 2015
    Messages:
    235
    • Like Like x 1
  9. Jeppoer

    Jeppoer
    Expand Collapse

    Joined:
    Jul 27, 2017
    Messages:
    24
    Nice! Before I could even bother you with another bug report, you already fixed it!
    You are amazing ;)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice