Experimental T Series- cabover

Discussion in 'Content Creation' started by Szerszen, Jan 4, 2020.

  1. GDUB

    GDUB
    Expand Collapse

    Joined:
    Jul 3, 2017
    Messages:
    21
    So I couldn't help but notice, that everyone has lots of opinions to share about you, your blender file, your profile pic and trucks in general, but nobody wants to note the purpose of the thread and maybe answer your question.
    I have done a few vehicles with new body, so I'll try and help:
    I'll explain in my own dumb way, and I'm sure it could more precise or concise but at least it's an answer.
    Be warned, it takes time and effort. My first vehicle took me 1 month from starting in blender to actually working in Beamng
    What you do is
    1. take the Gavril T series, you extract its zipped folder from the game, it will be called semi if memory serves
    2. put it in the right mod folder - the devs changed the structure a year ago, and the last time I checked the tutorials of the site are showing the old location, which doesn't work
    "yourBEAMfolder\mods\repo\vehicles" - in here you put the unzipped stuff - One important thing to note here: when you unzip the semi or pickup or whichever folder from the original game vehicles, it is usually double nested, so within the unzipped folder has the following structure semi\vehicles\semi\ and then the various files, like .dae and .jbeam files.
    for this to work, you have to 'unnest' it for want of a better word, so it would be semi\ and then the files
    3. now change the name of the truck in semi.beam file - this is important, otherwise the vehicle is a redundant duplication of the original gavril T-series
    - the file originally should start with: { semi: {
    and that's what you have to change to your name, let's say cabover, so now the file will have to start
    { cabover: {

    I usually change the folder name as well, so the folder will be
    "yourBEAMfolder\mods\repo\vehicles\cabover"

    When you get to #3 start the game and see if a second identical to the original gavril truck is in your vehicle menu, if not then something is not right and needs fixing.

    4. you export the blender file as collada - might need to modify your blender for this, maybe not tho, I don't remember
    5. you need to reference the new cabover body - I assume it's body or cab or some such, but it depends on the vehicle structure - I'm not familiar with the truck jbeam structure, I've done pickup and moonhawk before.
    This is basic pickup structure (it's incomplete, but it gives you an idea)
    pickup is the main parent, which has frame, body, bed and accessories as children, the frame is a parent that would have front suspension, rear suspension and engine as children. the cab is a parent that would have hood, windscreen, left door, right door, interior etc. as children
    If I wanted to change the cab on the pickup, I'd have to go to the pickup_body.jbeam - I'd change the document name to cabover_body.jbeam (this is not necessary but it's easier to keep track of which components you have already changed) and then in there you do the following:
    {
    "pickup_body": { <------- change that to cabover
    "information":{
    "authors":"BeamNG",
    "name":"this is what the components name will be in the game",
    "value":7500,
    },
    "slotType" : "pickup_body",
    "slots": [
    ["type", "default", "description"],
    ["skin_interior","pickup_skin_interior", "Interior Color", {"coreSlot":true}],
    ["pickup_interior","pickup_interior","Dashboard", {"coreSlot":true}],
    ["gps","","Navigation Unit", {"nodeMove":{"x":0.15,"y":-0.72,"z":1.31}}],
    //bodywork

    ............................. these are the slots for the children of the pickup body


    ],
    "soundscape": [
    ["name", "src"],
    //indicator7
    {"node:":"b6l"},
    ["indicatorStart", "event:>Vehicle>Interior>Indicator>POL_On"],

    ......................... lots of stuff here that is not relevant right now
    ],
    "flexbodies": [
    ["mesh", "[group]:", "nonFlexMaterials"],
    //bodywork
    ["pickup_body", ["pickup_body"]], <-------- this is what you change to your cabover - it has to match the name of the 3d model mesh in your collada when you've saved and exported it - if the mesh is called "cabover_body", you change this to ["cabover_body", ["pickup_body"]],
    ["pickup_intmirror", ["pickup_body"]],
    ["pickup_visors", ["pickup_body"]],
    ["pickup_lamp", ["pickup_body"]],
    ],



    Now this is where things get a bit difficult:
    A) if there are children to the truck body - there will be lots - they are working together with the original truck cab. Aka. if you have moved the seats up or down, fore or aft, they might collide as you have only changed the cab at this point. None of it's children are changed yet - not the roof accessories, not the interior, not the seats, bla bla bla. You have to map the entire structure downstream from cab - there might be several layers and check if those needed any modification - luckily the children of the children to the cab will be dependent on their parent - meaning that moving the seat you would not have to then also move the headrest. However, the bits that are rotating or moving some way - like the pedals or the steering wheel or the indicator stalks would have to be changed one-by-one in a very painstaking process
    B) if you have succeded in all the above, there is the issue, that the beam structure of the body is still according to the conventional, long nose cab. The long nose cab will have it's main structural points defined by coordinates and they will determine how the truck responds to damage or any sort of input.
    The pickup body for instance has ~ 40 points defined, and beamng will treat them according to the defined physical attributes and deform the mesh in the collada when these get some sort of input. They are defined in the jbeam file under nodes:
    "nodes": [
    ["id", "posX", "posY", "posZ"],
    {"frictionCoef":0.5},
    {"nodeMaterial":"|NM_METAL"},
    {"collision":true},
    {"selfCollision":true},

    //floor
    {"nodeWeight":4.512},
    {"group":["pickup_body","pickup_dash","pickup_floor"]},
    ["b1rr", -0.82, -0.88, 0.39],
    {"chemEnergy":1000,"burnRate":0.52,"flashPoint":300,"specHeat":0.8,"smokePoint":150,"selfIgnitionCoef":false},
    ["b1r", -0.35, -0.88, 0.55],
    ["b1l", 0.35, -0.88, 0.55],
    {"chemEnergy":false,"burnRate":false,"flashPoint":false,"specHeat":false,"smokePoint":false,"selfIgnitionCoef":false},
    ["b1ll", 0.82, -0.88, 0.39],


    So to visualize this for you you might have a fully fledged working cabover body on your truck, you drive it into a wall, and the truck will hit the wall before the front of the cabover reaches it, because programatically the front of the truck will still be where the long nose of the conventional cab was. This kind of discrepancy can lead to some weird behaviour in modded cars and that's what makes the modding very time consuming if you do it right.
    I hope this helps and keep us posted with any difficulty you face in the process!
     
    #21 GDUB, Feb 17, 2021
    Last edited: Feb 17, 2021
    • Like Like x 1
  2. DuallyDrifterz

    DuallyDrifterz
    Expand Collapse

    Joined:
    Feb 26, 2021
    Messages:
    5
    It looks great! I hope you can get it working as a mod!
     
  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