Solved How to attach an imported mesh to an existing vehicle

Discussion in 'Mod Support' started by ffzero58, Nov 19, 2018.

  1. ffzero58

    ffzero58
    Expand Collapse

    Joined:
    Nov 18, 2018
    Messages:
    54
    So I've been able to import meshes with some degree of success into BeamNG World Editor. However, I cannot find how I can "attach" the imported mesh onto an existing vehicle. I just started looking into jbeam editing but I just want a simple static mesh to be part of a vehicle of my choosing. Am I missing a setting here? My mesh is just a straight collada .dae mesh with no nodes (i.e. jbeam).

    Currently, the mesh just "floats" there and I have not found any functionality that would natively "attach: it to the vehicle.
     
  2. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,774
    Only way to do that is to bind it to some nodes.

    So for example here you have name of the mesh pigeon_600_engine and then a group pigeon_engine.
    "flexbodies": [
    ["mesh", "[group]:", "nonFlexMaterials"],
    ["pigeon_600_engine", "pigeon_engine"],
    ]

    Group there is what binds mesh to certain nodes. Group name is a node group defined in nodes section, so you need to find name of the group those nodes belong to, or create a new group for some existing nodes.

    At the bottom of this page there is also way to add node to several groups:
    https://wiki.beamng.com/Nodes


    It is best to use nodes that are closest to what you wish to add or just put to main body group.
     
  3. ffzero58

    ffzero58
    Expand Collapse

    Joined:
    Nov 18, 2018
    Messages:
    54
    Thanks for the response!

    Now that I have added this line to include my new mesh, it now seems to rotate around the car everytime I make a turn (using burnside_frame as the group with burnside_frame.jbeam. How do I just make it static but still follow the motion of the car?
    --- Post updated ---
    This is what I mean when the model is "bound" via jbeam, it orbits around the vehicle. How do I make the mode just sit tight on the seat while the car is in motion?



    Also, the actual seat model was done via a different method by editing the burnside collada file but I would rather avoid that if I can.

    If you or someone can provide another sample jbeam snippet, it would be greatly appreciated. Thanks!
     
  4. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,774
    In blender your mesh selected:
    ctrl-A > apply location
    ctrl-A > apply rotation and scale
     
  5. ffzero58

    ffzero58
    Expand Collapse

    Joined:
    Nov 18, 2018
    Messages:
    54
    Thanks so much for your help. I've been able to modify the passenger mod to accept a donor mesh (a random MikuMikuDance model). It's not perfect but it gets the job done.

     
    • Like Like 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