Brake Squeal: How about that?

Discussion in 'Ideas and Suggestions' started by krallopian, May 24, 2019.

  1. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    790
    Since we are getting all these great sound additions, what would it take to get some brake squeal happenin?


    @TDK perhaps I've ruined a big surprise you guys had coming up for us all? . . . please? =D
     
    • Agree Agree x 3
    • Like Like x 1
  2. Yota

    Yota
    Expand Collapse

    Joined:
    Mar 10, 2017
    Messages:
    86
    Probably wouldn't be that hard. I remember the Manitou in Rigs of Rods had it

     
  3. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    790
    That's really just a sound played when the brakes are applied, and it drove me insane! I spent so much time in that vehicle =D

    I was referring to it being properly generated as per brake heat, speed, etc.. similar to how other sounds are generated!
     
    • Agree Agree x 3
  4. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782

    Arcanox hybrid citybus mod has sound generated by lua, all you need is to have if brake temp XX and probably also brakes applied above certain threshold sound is generated.

    At least in 1.2 version that you can get from here you can see some stuff that you can find useful for creating brake squeal:
    https://www.beamng.com/resources/citybus-hybrid-drivetrain.5502/historyImproved

    hybrid.lua line 227 to 247 especially might be interesting.

    For 1.1 version same file but start with lines 191 to 210 instead, sadly I have not had time to examine more recent versions, there might be more and better magic revealed by those.

    input.brake is what you might be able to use for how much brake is applied, haven't tested. but to my understanding that is all that is needed.



    In console, paste this into vehicle lua and you can see things:
    dump(powertrain.wheels.FL)

    For example part we are not interested is tire temp dump(powertrain.wheels.FL.treadSurfaceTemperature)
    (seriously you won't do anything with it as it just goes to thousands and stays there, not ready yet)

    What we are interested is dump(powertrain.wheels.FL.padMaterial) that gives brake pad material, which you can use for strength of squeal etc. Brake squeal might happen different temps for different pads too.

    Then brake temp is bit elusive, not sure where you get that, I know from simple brake thermals app that it is streamsList = ['wheelThermalData', 'wheelInfo'] and there is then this too:
    function generateBrakes(data) {
    brakes = [];
    for (i in data.wheelThermalData.wheels) {

    However I'm not sure how to access that in lua as that is JS side of things.

    In wheels.lua there is local wd = M.wheels
    wd.brakeSurfaceTemperature
    wd.brakeCoreTemperature

    So I would think that to get brake temps you would need wheels.??.brakeSurfaceTemperature however ?? is not FL or [0] so it can be then totally different how that is accessed.

    dump(wheels) gives same or similar to dump(powertrain.wheels)

    So definitely it is there, it is possible to do, but would need to understand bit more about how things work to get how to read brakeSurfaceTemperature.
     
    • Agree Agree x 1
  5. YellowRusty

    YellowRusty
    Expand Collapse

    Joined:
    Nov 9, 2016
    Messages:
    1,207
    This might be interesting if it could be tied into worn brake pads or brakes that wear out as the vehicle is driven hard.
     
    • Agree Agree x 5
  6. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    I have not checked if there is actual brake pad wear, but there is ismolten bit that happens when brakes are totally overheated I believe. Also there is brake efficiency that might be possible to be used to get exactly that effect?

    To get it into game, I think all one needs to do is write it and spam tdev with lua file or something like that, if it is usable they probably might save time implementing the thing.
     
    • Agree Agree x 1
  7. TDK

    TDK
    Expand Collapse
    FLIT KILLS MOTHS
    BeamNG Team

    Joined:
    Dec 17, 2017
    Messages:
    596
    I hate to sound like someone who has no plans himself, and is simply stealing ideas from here and claiming them as their own, but this is indeed on the list.

    In fact, the sound is done, in terms of a high pitched metallic whistle, and it's implemented within FMOD but not enabled - the sound is the easy part here. We're just waiting for code support on that one, and as highlighed already, there's quite a bit to think about in terms of how and why it's triggered. Can't promise when as I believe it's not a high priority for code at this time.
     
    • Informative Informative x 6
    • Like Like x 2
  8. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    790
    Yessssss! Awesome man, I had a sneaking suspicion it was in the works!
     
  9. TDK

    TDK
    Expand Collapse
    FLIT KILLS MOTHS
    BeamNG Team

    Joined:
    Dec 17, 2017
    Messages:
    596
    To be honest, many things already are on 'that' list. Not all will make it unfortunately, that's game dev whether it's an Indie studio or a large Dev/Publisher.
     
    • Like Like x 3
  10. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Difficult part for creative persons is that there is too little time in this world, need for budget means even less time.

    Cool part of this game is that users can also create more functionality and clever developers seem to create possibilities even in some cases they can't make actual thing from the list, that is another thing where this project differs a lot from most.
     
    • Agree Agree x 1
  11. ItsWgamer

    ItsWgamer
    Expand Collapse

    Joined:
    Jul 12, 2015
    Messages:
    75
    i think this would amazing for bigger vehicles like the D series and the T series, maybe the beater cars too
     
  12. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    790
    Then sports cars of course.
     
    • Agree Agree x 2
  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