Independent rear Suspension: D-series, H-series, Roamer, Pickup, Van, SUV

Discussion in 'Ideas and Suggestions' started by Divepunk, Feb 8, 2021.

  1. Spython

    Spython
    Expand Collapse

    Joined:
    Oct 16, 2017
    Messages:
    93
    Most likely there is still some part in the suspension's code calling for something meant for the front. I could take a look at the script and see if I can help with locating the issue.
     
  2. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,710
    Usually when you end up with an issue like this it can be one of several things (or a combination)

    hub nodes are too light
    hub spring rate is too high
    hub damping rate is too high
    parking brake force is too high (try spawning the truck with your foot on the floor to immediately disengage the parking brake... might keep them from exploding if this is the cause)
    gear ratios are too low
    duplicate beams accidently doubling your spring rate and damping on a node
    too many connections to a single node (they don't like that especially with high spring and damping rates used in suspension)

    So take some of those in mind when you go to look at it... my guess is its one of those things that is causing your issue. One thing to keep in mind is that while beams stock vehicles look very stable, a lot of time it is because they are tuned to perfection and are right on the edge of what is possible... so if you are connecting things to the frame in an area that doesn't normally have connections, you may have to adjust the parameters in that location to simulate the suspension connections at the front (more than likely this is not the case... but keep it in mind)
     
    • Agree Agree x 4
    • Like Like x 1
  3. VENOMOUS 2

    VENOMOUS 2
    Expand Collapse

    Joined:
    Oct 17, 2018
    Messages:
    380
    very cool cannot wait!
     
  4. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,058
    Finally someone experienced on the thread, this is really useful info for everyone
     
    • Like Like x 1
  5. Lucas Mess

    Lucas Mess
    Expand Collapse

    Joined:
    Feb 14, 2021
    Messages:
    41
    Spython: I will attach the file when I get a moment, married with 3 kids keeps my play time limited.

    Agent_y: thanks for the suggestion, I have been full zombie mode trying to compare working suspension with mine in hopes of the aaaha moment. None yet.

    ATV_123: thank you for the info. I am, as I previously stated, very new to this coding and spend more than half my time trying to reverse engineer official game vehicles. The concept of nodes and beams is easy but trying to figure out why this beam works and that one explodes on contact. A lot of the info out there is outdated and not used in the current format. Also if you have the answer; in game when you press "ctl b" a couple times you get colored beams. I know about the combustible ones around the fuel tank but how do you define the hub beams like the stock vehicles do?
     
  6. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,710
    Yeah... a LOT of the information out there is very VERY out of date... which is to be expected from the game continually evolving over the years I suppose, but still, you are totally correct.

    And yes, finding out why one beam is fine while another will just explode can be a bit of a hassle. One thing I recommend is to make sure you have "Advanced Functions" enabled (it sounds like you already do if you can see the Beam structures by hitting ctrl+b) and then hitting escape and looking for the bug shaped icon at the bottom of the menu on the left. When you click that bug, you will be presented with the debugging menu. I suggest getting very familiar with it and all of its functionality... Mostly just the vehicle debug section on top.

    Here you can select how all your information shall be displayed. A useful one is setting the JBeam structure to show stress, setting the nodes visual to simple, then hitting Alt+Left Arrow Key until you hit 100 times slow motion. Finally hit Shift+C to enter free camera mode, and then fly around hitting reset on your vehicle watching what happens and where its going wrong. Once you have pinned down where your issue is, you can then change your node information to display the node names so you know what to go and mess with inside your files.

    As for hub beams, I am assuming you are talking about the stock, in game rims and tires?

    I have loads of information to give. Just tag me in a post with a question and I can come back and answer it.
     
  7. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,058
    Modding without using the stuff you just described is practically impossible, I do this all the time and I'm pretty sure all other modders do, this should be in some Jbeam tutorial for absolute beginners
     
  8. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,710
    Well, one of these days I do plan on making one... like beginning to end, "how to make your first mod" kinda series were I cover absolutely everything under the sun that I know how to do. (No LUA unfortunately... that's kinda black magic to me) But I have to finish the B1 first. Once I do that, I will start making a tutorial.
     
  9. SuperShep1

    SuperShep1
    Expand Collapse

    Joined:
    Apr 14, 2019
    Messages:
    2,682
    there is an irs mod for the grand marshal, maybe you can ask the mod author to use that
     
  10. Lucas Mess

    Lucas Mess
    Expand Collapse

    Joined:
    Feb 14, 2021
    Messages:
    41

    This is what I have so far. I looked at the beams in slow motion as you suggested and it looks like the hubs are breaking from spawning inside the wheels. I don't know how to relocate the wheels to proper position. I tried to make a hub file but it crashes every time I tried.
     

    Attached Files:

  11. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,710
    Alright, well, to answer your question about relocating the rear wheels... for the D Series, that is located in a file called something like pickup_hubs_R.jbeam or something similar (I am sitting bored at work right now so this is just from memory). It is located under the common.zip>vehicle>pickup folder and should contain all the hubs for the rear end of the D Series. I recommend actually grabbing it and making a duplicate as you probably want to set up everything in the rear similar to the front. Well, that means the powertrain will need a bit of tweaking.

    In that bad boy you will see that there are 4 nodes defined, and all of them are basically the nodes that the rear wheels will be created around...

    then you have this
    Code:
            ["wheel_R_6","steelwheel_02a_16x7_R","Rear Wheels", {"nodeOffset":{"x":"$= $trackoffset_R+0.31", "y":1.487, "z":0.4101}}],
    Which basically spawns the wheels into existence. Notice that it also has its position marked out... that is because in the wheel files, those same 4 nodes are redefined again... that is how you can change parameters about the wheel in game (like the trackwidth as you can see there) and still have the nodes appear in the correct places.

    These are what I eventually came up with.
    Code:
        "slots": [
            ["type", "default", "description"],
            ["pickup_brake_R","pickup_brake_R","Rear Brakes", {"nodeOffset":{"x":0.0, "y":0.0, "z":0.0}}],
            //The case() is for backwards compatibility for old configs that use "trackwidth_R" variable.
            //To change the base track width, edit the trackoffset_R offset in the expression.
            ["wheel_R_6","steelwheel_02a_16x7_R","Rear Wheels", {"nodeOffset":{"x":"$= $trackoffset_R+0.31", "y":1.465, "z":0.515}}],
            ["pickup_wheeldata_R","pickup_wheeldata_R", "Rear Spindles", {"coreSlot":true}],
        ],
        "flexbodies": [
            ["mesh", "[group]:", "nonFlexMaterials"],
            ["brake_hub_6l", ["wheel_RR","wheelhub_RR"], [], {"pos":{"x":-0.88,"y":1.465, "z":0.515}, "scale":{"x":1.0,"y":1.0,"z":1.0}, "rot":{"x":0,"y":0,"z":0}}],
            ["brake_hub_6l", ["wheel_RL","wheelhub_RL"], [], {"pos":{"x":0.88,"y":1.465, "z":0.515}, "scale":{"x":1.0,"y":1.0,"z":1.0}, "rot":{"x":0,"y":0,"z":180}}],
        ],
        "nodes": [
             ["id", "posX", "posY", "posZ"],
             {"frictionCoef":0.5},
             {"nodeMaterial":"|NM_METAL"},
             {"collision":true},
             {"selfCollision":true},
             {"nodeWeight":6.58},
             {"group":"wheelhub_RR"},
             ["rw1r", -0.82, 1.465, 0.515],
             ["rw1rr", -0.96, 1.465, 0.515],
             {"group":"wheelhub_RL"},
             ["rw1l", 0.82, 1.465, 0.515],
             ["rw1ll", 0.96, 1.465, 0.515],
             {"group":""},
        ],
    As you can see... I did move them a little over stock... but not much.

    This made them stable... well, more stable... your initial one using the stock hubs from the D Series put one of the rear wheel nodes so close to a suspension node that the game just couldn't deal with the super short distance and would become unstable.

    Now its exploding when it hits the ground, so lets see whats up with that.

    Well, for starters there seems to be this chunk of code in there that connects the suspension to the firewall... that is not needed any longer.
    Code:
              //firewall collide
              {"beamPrecompression":0.8},
              ["fh3r_1", "b1rr"],
              ["fh3r_1", "b1r"],
              ["fh3l_1", "b1ll"],
              ["fh3l_1", "b1l"],
    
              ["rw1rr_1", "b1rr", {"beamPrecompression":0.65}],
              ["rw1rr_1", "b5rr"],
              ["rw1rr_1", "b6rr"],
    
              ["rw1ll", "b1ll", {"beamPrecompression":0.65}],
              ["rw1ll", "b5ll"],
              ["rw1ll", "b6ll"],
              {"optional":false},
    Next, there is no connection from the hubs to the wheel nodes... So I'll add this.

    Code:
              {"optional":true},
              {"beamSpring":8460940,"beamDamp":94},
              {"beamDeform":84000,"beamStrength":227500},
              //wheel mounts to hub
              //left outer
              ["rw1ll", "fh1l_1"],
              ["rw1ll", "fh2l_1"],
              ["rw1ll", "fh3l_1"],
              ["rw1ll", "fh4l_1"],
              ["rw1ll", "fh5l_1"],
              //left inner
              ["rw1l", "fh1l_1"],
              ["rw1l", "fh2l_1"],
              ["rw1l", "fh3l_1"],
              ["rw1l", "fh4l_1"],
              ["rw1l", "fh5l_1"],
              
              //right outer
              ["rw1rr", "fh1r_1"],
              ["rw1rr", "fh2r_1"],
              ["rw1rr", "fh3r_1"],
              ["rw1rr", "fh4r_1"],
              ["rw1rr", "fh5r_1"],
              //right inner
              ["rw1r", "fh1r_1"],
              ["rw1r", "fh2r_1"],
              ["rw1r", "fh3r_1"],
              ["rw1r", "fh4r_1"],
              ["rw1r", "fh5r_1"],
              {"optional":false},
    Now that it doesn't explode, it does flop about a bit... so I added these temporarily just to make it drive streight.

    Code:
    "pickup_tierods_IRS": {
        "information":{
            "authors":"BeamNG",
            "name":"Tie Rods",
            "value":200,
        },
        "slotType" : "pickup_tierods_IRS",
        "beams": [
              ["id1:", "id2:"],
              //front springs
                {"beamPrecompression":1.0, "beamType":"|NORMAL", "beamLongBound":1, "beamShortBound":1},
                {"beamSpring":11001000,"beamDamp":60,"beamDeform":"FLT_MAX","beamStrength":105000},
                //left
                ["fh5l_1","fx2l_1"],
                //right
                ["fh5r_1","fx2r_1"],
                {"beamPrecompression":1.0, "beamType":"|NORMAL", "beamLongBound":1, "beamShortBound":1},
        ],
    },
    And that's basically all I did so far... So at the very least its drivable and doesn't explode. Keep going! I like what you have done so far! Its simple but high quality at the same time!
     

    Attached Files:

    • Like Like x 4
  12. Lucas Mess

    Lucas Mess
    Expand Collapse

    Joined:
    Feb 14, 2021
    Messages:
    41

    Thank you for fixing this and for explaining how you did it. Now I can put my focus to the smaller details. Quick question, when you loaded the suspension did it bottom out like the springs were missing?
     
  13. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,710
    The springs are missing, there are no upper nodes defined for the springs to attach to in the files. They are named in the Shock/Spring JBeam, but they don't seem to exist in the IRS JBeam. So just make a couple shock mount nodes, place them where you already have the mesh's at (in a similar location and mounting procedure to the front suspension) and your good to go.
     
  14. Lucas Mess

    Lucas Mess
    Expand Collapse

    Joined:
    Feb 14, 2021
    Messages:
    41
    Ok, cool. I was searching for the origins of the fs1 nodes at the top of the shock so I could mimic the beams again.

    In the past I made a lowered suspension mod for the truck which is the original reason for this IRS mod. The front IFS would almost put the frame on the ground and the rear solid axle would drop only a little before axle hit frame. Just to see how it looked I put that dropped IFS on with the new IRS (no shock) and it holds the frame perfectly level just off the ground. I'll put up some pictures when I can. Again thanks to everyone for the positive feedback and help.
     
    • Like Like x 1
  15. Lucas Mess

    Lucas Mess
    Expand Collapse

    Joined:
    Feb 14, 2021
    Messages:
    41
    FS1 nodes were in the pickup_frame jbeam. Got them added to the suspension mod, I now have visual and functioning struts. Tonight I will be setting TorqueArm, TorqueCoupling, NodeArm, NodeCoupling for the brakes and drive line so all visuals will be correct with driveshaft and half shafts along with ability to break them.
     
    • Like Like x 2
  16. Lucas Mess

    Lucas Mess
    Expand Collapse

    Joined:
    Feb 14, 2021
    Messages:
    41
    @Divepunk Here it is, independent rear suspension for the D-series. load it up and let me know how you feel about it.

    @atv_123 thank you again for the help. If you have time check it out and let me know if anything doesn't work.

    Share this at will.
    --- Post updated ---
    here are some screenshots. screenshot_2021-03-13_13-51-51.png screenshot_2021-03-13_13-51-51.png screenshot_2021-03-13_14-12-00.png screenshot_2021-03-13_14-12-39.png screenshot_2021-03-13_14-13-06.png screenshot_2021-03-13_14-14-36.png screenshot_2021-03-13_14-21-34.png screenshot_2021-03-13_14-15-00.png
     

    Attached Files:

    • Like Like x 3
  17. Divepunk

    Divepunk
    Expand Collapse

    Joined:
    Dec 2, 2016
    Messages:
    70
    My word, sorry been lax on the forums. Ain't been able to play BeamNG lately (and been playing allot of World of Warcraft too), as a result I've also been lax on the forums.

    That suspension is more pretty damn cool. I honestly wasn't sure what to expect when I started this whole thread. Lol I held onto hope someone would take off with it, still perhaps a major part of me just thought it would proc up allot of discussion at best.

    That suspension looks really good IDC if it looks exactly like what one might find if IRS was applied to a full-size pickups or not. Looks good to me i looks like a real independent suspension. So long as it functions like one I'm happy with it Nice work.

    I'll be sure to test it out and give feedback!


    EDIT: Dono if I'm missing something, but I put it in the right place for mods in my folders, and it ain't showing up in game. Any idea(s) as to why?
     
    #37 Divepunk, Mar 16, 2021
    Last edited: Mar 16, 2021
  18. Xupaun

    Xupaun
    Expand Collapse

    Joined:
    Aug 18, 2020
    Messages:
    762
    The packing is not right. That's why it does not show up.
     
  19. Lucas Mess

    Lucas Mess
    Expand Collapse

    Joined:
    Feb 14, 2021
    Messages:
    41
    Can you explain what you mean the packing isn't right? I personally just add my mod files directly into the unpacked file so making it a zip is new to me. I will fix change whatever I need to.
    --- Post updated ---
    @Xupaun did you get it to work?
     
  20. ThatCarGuyDownTheStreet

    ThatCarGuyDownTheStreet
    Expand Collapse

    Joined:
    Mar 30, 2017
    Messages:
    3,253
    the folders should go something like pickupirs>vehicles>common>the files or something
     
  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