What are Flexbodies?

Discussion in 'Programming' started by ScottL, Feb 5, 2014.

  1. ScottL

    ScottL
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    27
    So I'm trying to figure out the Jbeam files and I've ran into a snag with the flexbodies.

    So far I understand that flexbodies are what BeamNG uses to attach jBeam shapes to meshes in the game.

    I'm confused by the section that follows this:

    Code:
    ["mesh", "[group]:", "nonFlexMaterials"],
    For example, we can look at the super.jbeam file and find this:

    Code:
    ["super_chassis", ["super_chassis","super_shocktop_R","super_shocktop_F","super_uppermounts_F","super_lowermounts_a_F","super_lowermounts_b_F","super_uppermounts_R","super_lowermounts_R"]],
    super_chassis is a mesh in the DAE file, I get that.

    What I don't get is why it's here twice. And even further, why are there meshes in the DAE file now listed in the "group" section?

    Is the super_chassis mesh inside the super_chassis mesh? Is the first instance of "super_chassis" just an arbitrary name that could be anything?

    Then it gets worse.

    Code:
    ["super_engbaycrap", ["super_chassis","super_shocktop_R","super_uppermounts_R","super_lowermounts_R"]],
    Why is the chassis mesh INSIDE the engine bay crap group/mesh?

    This makes absolutely zero sense to me.:confused:
     
  2. gabester

    gabester
    Expand Collapse
    Vehicle Director
    BeamNG Team

    Joined:
    Jun 6, 2012
    Messages:
    2,653
    The first thing in quotes is the name of the mesh inside the .DAE. The next list of things inside brackets is all the node groups to map the mesh to (they are just "group" in a nodes section). "nonFlexMaterials" is deprecated and does nothing.
     
  3. DrowsySam

    DrowsySam
    Expand Collapse

    Joined:
    Jul 30, 2013
    Messages:
    996
    Hopefully this picture should clarify it.

    Here's the Barrier JBeam.
    Basically as you see under the flexbodies, the barrier mesh (underlined blue), belongs to the "barrier" group(Highlighted yellow), and all the nodes marked in the red area, are the nodes for the "barrier" group.

    Makes sense?


    (imported from here)
     
  4. ScottL

    ScottL
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    27
    Alright! Now it makes perfect sense. Thanks so much guys for the quick and clear responses!
     
  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