[TUTORIAL] Dummiesman's JBeam Guide - Part 7 : MultiDae

Discussion in 'Content Creation' started by Dummiesman, Apr 22, 2015.

  1. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    Hey guys! I'm going to be writing this guide for those new at Jbeams. I'll be writing it part by part so please be patient as parts are added!

    Yes I know B25Mitch has made a guide, but this will explain in depth what parameters of nodes, beams, etc. do, and various ways to make them.

    If you already know some Jbeam this may not be for you as I am taking this as slow as I can.

    Table Of Contents
    Part 1 : Setting up a new vehicle (in this post)
    Part 2 : Nodes (in this post)
    Part 3 : Beams
    Part 4 : Collision and Aero Surfaces
    Part 5 : Parts
    Part 6 : Flexbodies
    Part 7 : MultiDae



    Part 1 : Setting up a new vehicle

    So first off we have to set up a directory structure for our vehicle. Start up Windows Explorer, and navigate to Documents\BeamNG.drive\mods. If there is no folder called vehicles, then create it. Next, create the folder MyVehicle inside the vehicle folder.


    (imported from here)

    Inside this folder create a new text file, but name it MyVehicle.jbeam **make sure the extension is jbeam!!**. Open the jbeam file and add the following text

    Code:
    {
    "MyVehicle":{
            "information":{
                "name":"Vehicle Name Here",
                "authors":"Your Name Here",
            }
            "slotType":"main",
    }
    }
    
    Next, create the file info.json to make it look a little nicer in the selection screen. The content should be as follows, but you can add additional colors if you want. (just ensure there's no comma on end of the last color)

    Code:
    {
        "Name":"MyVehicle",
        "Brand":"Tutorial and Co",
        "Type":"Car",
        "default_pc":"",
        "default_color":"My Fancy Color",
        "colors":{
            "My Fancy Color": "1 0.7 0 1",
            "Unfancy Pure Black": "0 0 0 1"
        }
    
    }
    
    Now this vehicle should show up in the vehicle selector, but it won't actually do anything in the game. In the second part of this tutorial I'll be covering nodes, which is one of the base elements of beam physics.


    (imported from here)
    Part 2 : Nodes


    (imported from here)

    So now that we have our jbeam file to start off with, lets add some nodes. Nodes are infinitely small points in 3D space that everything revolves around. Each node can have the following properties (Click to expand)



    So as you can see, nodes are what you want to use to weight a vehicle. For example if you have a node that's part of a vehicle headlight you'd want it to be fairly light, but a body panel would be weighted heavier. Now that I've gotten the "annoying" part out of the way, lets move on to the actual Jbeam work. Copy this section under the information section like so (we need the beams section too or else it will not spawn!)

    Code:
    {
    "MyVehicle":{
            "information":{
                "name":"Vehicle Name Here",
                "authors":"Your Name Here",
            }
            "slotType":"main",
            "nodes":[
                ["id", "posX", "posY", "posZ"],
                {"collision":true}
                {"nodeMaterial":"|NM_METAL"},
                {"nodeWeight":10},
    
            ],
    
            "beams":[
                ["id1:","id2:"],
            ],
    }
    }
    
    I've added in the most properties we'll be tweaking for now (collision, nodeMaterial, nodeWeight) to this section for you. Now let's try adding 2 nodes! Add this code below the nodeWeight statement

    Code:
    ["firstNode",-1,0,0],
    ["secondNode",1,0,0],
    
    Now load the vehicle up in the game again (or if it's already loaded, press CTRL+R to reload), and press CTRL+N to cycle through node debug modes. Node debug has nodes such as material, name, weight, etc. You'll notice that 2 elements of text will show up on your screen, these elements are positioned at the nodes.


    (imported from here)

    Later on in the tutorial I'll introduce a naming scheme which will make it easier to locate nodes when creating other parts.

    Now here comes a couple exercises that are important to try out so you get used to tweaking properties:

    Try playing around with the node weight, you should notice a change in the weight debug once you reload the vehicle.
    Try changing the node material to one of the ones listed above, you should notice a change in the material debug once you reload the vehicle.
     
    #1 Dummiesman, Apr 22, 2015
    Last edited: Sep 9, 2017
    • Like Like x 3
  2. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,804
    Re: In depth guide to Jbeam

    This just may motivate my ass to figure out what the hell's wrong with the Moonhawk roof. Looks promising!
     
  3. AdR

    AdR
    Expand Collapse
    BeamNG Team

    Joined:
    Feb 6, 2014
    Messages:
    306
    Re: In depth guide to Jbeam

    Oh yes! finally something with practical examples of what each parameter does. Looking forward to read more, thanks for sharing!
     
  4. james614

    james614
    Expand Collapse

    Joined:
    Apr 18, 2015
    Messages:
    5
    Re: In depth guide to Jbeam

    Wow, looks like this post will answer many of the questions I was looking for/going to ask about the JBeams. Looking forward to the rest. Awesome!
     
  5. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    Part 3 : Beams (basic)

    Beams are another base element of beam physics. Beams connect nodes which hold them in place. Each individual beam can have damp, spring, and many other properties. For now we'll only be dealing with NORMAL type beams, I'll explain more types later in the tutorial

    A normal beam has the following parameters



    Additionally, beams can have a breakGroup parameter. We won't be using this for now, but a breakGroup is a group of beams where whenever one breaks the entire group will break.

    To better demonstrate beams we'll need to create a more complex structure. This is the structure we'll be using to test out beams.



    I have created this structure for you, here is the Jbeam file containing that structure (You could also try this on your own since I've showed you how to create nodes, and what X Y Z means ;)):

    Code:
    {
    "MyVehicle":{
            "information":{
                "name":"VehicleNameHere",
                "authors":"YourNameHere",
            }
            "slotType":"main",
            "nodes":[
                ["id", "posX", "posY", "posZ"],
                {"collision":true}
                {"nodeMaterial":"|NM_METAL"},
                {"nodeWeight":10},
                ["pmdl",-1,-1,0],
                ["pmdr",1,-1,0],
                ["pmdf",0,1,0],
                ["pmdt",0,0,1],
            ]
        
            "beams":[
                ["id1:","id2:"],
                {"beamSpring":4300000,"beamDamp":580},
                {"beamStrength":"FLT_MAX","beamDeform":220000},
                //bottom
                ["pmdl","pmdr"],
                ["pmdf","pmdl"],
                ["pmdf","pmdr"],
                //attach to top
                ["pmdl","pmdt"],
                ["pmdf","pmdt"],
                ["pmdr","pmdt"],
            ],
        }
    }
    
    *Notice what I mean by naming scheme? pmdf = Pyramid Front, pmdt = Pyramid Top and so on.

    Now load the vehicle up in the game again (or if it's already loaded, press CTRL+R to reload), and press CTRL+B to cycle through beam debug modes. You should see this (note I also have node debug on):


    You can hit this with another vehicle now, but not much of it will collide with another vehicle until we add collision surfaces. For now lets play with the beam properties. As you can see I've put the beam properties in the file already, these are the default values.

    First let's play around with the beamDeform property. Set this to 1 for a second, then reload the vehicle. Notice how the pyramid is flattening itself out? This is because the node pmdt is pushing with enough force to deform the beam now. In vehicles the beamDeform property is set in body panels so they deform realistically.

    beamDeform is measured in newton meters, so when you set it to 1 it deforms because pmdt is pushing on these beams with a force greater than one newton meter. Typical values for vehicles will vary based on many factors, but typically speaking, 10,000 - 100,000 should do for most metal panels.

    This concludes the introduction to beams. Here are a couple exercises that are important to try out so you get used to tweaking properties:

    Try changing the beamStrength property to a low number, then use free camera and drop the structure. You should hear breaking sounds if it's set low enough.
    Try adding or removing beams to see how it will affect physics. This will help you get a better understanding of how beam physics work.
     
    #5 Dummiesman, Apr 22, 2015
    Last edited: Sep 9, 2017
    • Like Like x 2
  6. SuperNoob05

    SuperNoob05
    Expand Collapse

    Joined:
    Jan 4, 2015
    Messages:
    1,289
    Re: In depth guide to Jbeam

    Gonna follow all of this tomorrow.
     
  7. RedBolide

    RedBolide
    Expand Collapse

    Joined:
    Apr 22, 2013
    Messages:
    362
    Re: In depth guide to Jbeam

    I love it when members of the community use their own time to try and help others. The tutorial looks great so far. Right level of detail. Keep it up! please just give him a dev badge and a seven figure paycheck already
     
    • Like Like x 1
  8. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    Part 4 : Collision Surfaces & Aero (basic)



    In Beam physics, there are things called collision triangles or, more recently, we now have collision quads.

    Both collision triangles and collision quads do the same thing, but collision quads are easier to place around square areas.

    Both triangles and quads have the following properties


    You're probably wondering the difference between quads and tris at this point. Some may think it's self explanitory but others may not get it. Here are 2 photos demonstrating the differences:



    Before we start you must remember this: The order of the nodes matters for collision surfaces. Here is a picture demonstrating order:


    The upwards side of a collision surface is the most resistant to collisions against that side. The order does not matter for aero drag.

    In this section of the tutorial we'll be combining what we've learned in the last 2 sections. Right now the structure we have is insufficient to demonstrate collision, so we're going to make a ramp!



    I have created this structure for you, here is the Jbeam file containing that structure, but without the collision surfaces (You could also try this on your own since I've showed you how to create nodes, and beams ;))

    Code:
    {
    "MyVehicle":{
            "information":{
                "name":"VehicleNameHere",
                "authors":"YourNameHere",
            }
            "slotType":"main",
            "nodes":[
                ["id", "posX", "posY", "posZ"],
                {"collision":true}
                {"nodeMaterial":"|NM_METAL"},
                {"nodeWeight":10},
                ["r0l",1,2,0],
                ["r1l",1,-2,0],
                ["r0r",-1,2,0],
                ["r1r",-1,-2,0],
                ["rt0l",1,2,0.5],
                ["rt0r",-1,2,0.5],
            ]
          
            "beams":[
                ["id1:","id2:"],
                {"beamSpring":4300000,"beamDamp":580},
                {"beamStrength":"FLT_MAX","beamDeform":220000},
                //bottom
                ["r0r","r0l"],
                ["r1r","r1l"],
                ["r1r","r0r"],
                ["r1l","r0l"],
                //bottom cross
                ["r0r","r1l"],
                ["r1r","r0l"],
                //top beam
                ["rt0l","rt0r"],
                //angled beams
                ["rt0r","r1r"],
                ["rt0l","r1l"],
                //angled crossbeams
                ["rt0r","r1l"],
                ["rt0l","r1r"],
                //ramp vertical part
                ["r0r","rt0r"],
                ["r0l","rt0l"],
                //ramp vertical cross
                ["r0r","rt0l"],
                ["r0l","rt0r"],
            ],
          
            "triangles":[
                ["id1:","id2:","id3:"],
              
            ],
          
            "quads":[
                ["id1:","id2:","id3:","id4:"],
              
            ],
        }
    }
    
    As you can see I've created the placeholder sections for the surfaces, now we just need to create them. The top, the back and the bottom of the ramp are made up of 4 nodes each, so in this case we'll add quads to them. Quads are structured like this
    Code:
    ["node 1","node 2","node 3","node 4"],
    
    From here you can try them yourself, or use my 3 lines here:
    Code:
                ["r1l","rt0l","rt0r","r1r"],
                ["r1r","r0r","r0l","r1l"],
                ["r0l","r0r", "rt0r","rt0l"],
    
    Once you have created your quads, enable collision triangle debug to view them


    You should now be seeing this. Note how red is facing down and green is facing up, like I've depicted in the above pictures. If you don't see what I have below, then experiment until you do


    Next we need the sides of the ramp, as you can probably already tell we are going to be using triangles. Try them yourself or use my lines here:
    Code:
                ["r1l","r0l","rt0l"],
                ["r1r","rt0r","r0r"],
    
    After reloading the vehicle, eyou should see this.


    If you do see this, hop in another vehicle and test out your ramp!




    Also, try exparimenting with ground models. For example, if you wanted to make a wood ramp, put
    Code:
    {"groundModel":"WOOD"},
    
    Below the id1, id2, etc. in both triangles and quads sections. Then the collision surface will act as if they are wood.

    That concludes the introduction to aero/collision surfaces. I will revisit this topic later
     
    #8 Dummiesman, Apr 24, 2015
    Last edited: Sep 9, 2017
    • Like Like x 1
  9. Goosah

    Goosah
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Aug 30, 2013
    Messages:
    790
    Re: In depth guide to Jbeam

    Quads are still composed of triangles, its just applies them 2 at a time. Physically the result is the same, it just takes less time to apply.
     
  10. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    Re: In depth guide to Jbeam

    By rotating this one node (n1 n2 n3 n0) I would be flipping the triangles. ;)

    (imported from here)
     
  11. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    In BeamNG, you can add "parts" to a JBeam object. Adding parts is easy, and makes your life easier. It will also allow more customization for your vehicle!

    Each JBeam object can have a "slotType" which defines what part slot it ends up in. For example:
    Code:
            //This is the main/default slot type.
            "slotType":"main",
    
    To define more slot types, we'll need to add a slots section. Below the "slotType":"main" in our ramp Jbeam, add this:
    Code:
            "slots":[
                ["type:","default:","description:"],
                ["myslot","myslot_test","Our First Slot"],
            ],
    
    The slots section consists of 3 components:



    Slots can be added into any parts as well, so you can structure a parts hierarchy such as:
    >Main
    >-Main_Part1
    >--Main_Part1_SubPart1
    etc. For now though, we'll only be doing one level of sub-parts to avoid confusion.

    The result should end up looking like this:


    Now, make a new Jbeam file with the following contents:
    Code:
    {
    "myslot_test":{
            "information":{
                "name":"VehicleNameHere PartOne",
                "authors":"YourNameHere",
            }
            "slotType":"myslot",
    }
    }
    
    Notice what slotType has changed to? Reloading the vehicle at this stage should make the part show up in the part selector. Press CTRL+W to check. You should get this result:


    Currently changing the part from empty to our PartOne won't do anything, so we'll have to add beam data to make something happen. A sub-part can connect to any other part on the vehicle, but it's reccomended that you do not connect to other removable parts. If you plan to do that, make the part a sub-part of that removable part. (But you probably won't be doing that at this stage anyways)

    Since you know how to create nodes and beams at this stage, you can attempt this yourself, or add the following to the myslot_test Jbeam:
    Code:
             "nodes":[
                ["id", "posX", "posY", "posZ"],
                {"collision":true}
                {"nodeMaterial":"|NM_METAL"},
                {"nodeWeight":10},
                ["partnode",1.5,0.5,0.5],
            ],
         
            "beams":[
                ["id1:","id2:"],
                ["partnode","rt0l"],
                ["partnode","r1l"],
                ["partnode","r0l"],
            ],
    
    Upon saving, reloading, and entering debug mode, you should see this:


    But when you remove the part, you should see this:


    If you've run into problems, or would just like to look for reference, here's the full Jbeams:

    "MyVehicle.jbeam":
    Code:
    {
    "MyVehicle":{
            "information":{
                "name":"VehicleNameHere",
                "authors":"YourNameHere",
            }
            "slotType":"main",
            "slots":[
                ["type:","default:","description:"],
                ["myslot","myslot_test","Our First Slot"],
            ],     
            "nodes":[
                ["id", "posX", "posY", "posZ"],
                {"collision":true}
                {"nodeMaterial":"|NM_METAL"},
                {"nodeWeight":10},
                ["r0l",1,2,0],
                ["r1l",1,-2,0],
                ["r0r",-1,2,0],
                ["r1r",-1,-2,0],
                ["rt0l",1,2,0.5],
                ["rt0r",-1,2,0.5],
            ],
         
            "beams":[
                ["id1:","id2:"],
                {"beamSpring":4300000,"beamDamp":580},
                {"beamStrength":"FLT_MAX","beamDeform":220000},
                //bottom
                ["r0r","r0l"],
                ["r1r","r1l"],
                ["r1r","r0r"],
                ["r1l","r0l"],
                //bottom cross
                ["r0r","r1l"],
                ["r1r","r0l"],
                //top beam
                ["rt0l","rt0r"],
                //angled beams
                ["rt0r","r1r"],
                ["rt0l","r1l"],
                //angled crossbeams
                ["rt0r","r1l"],
                ["rt0l","r1r"],
                //ramp vertical part
                ["r0r","rt0r"],
                ["r0l","rt0l"],
                //ramp vertical cross
                ["r0r","rt0l"],
                ["r0l","rt0r"],
            ],
         
            "triangles":[
                ["id1:","id2:","id3:"],
                ["r1l","r0l","rt0l"],
                ["r1r","rt0r","r0r"],
            ],
         
            "quads":[
                ["id1:","id2:","id3:","id4:"],
                ["r1l","rt0l","rt0r","r1r"],
                ["r1r","r0r","r0l","r1l"],
                ["r0l","r0r", "rt0r","rt0l"],
            ],
        }
    }
    
    "MyVehicle_part1.jbeam":
    Code:
    {
    "myslot_test":{
            "information":{
                "name":"VehicleNameHere PartOne",
                "authors":"YourNameHere",
            }
            "slotType":"myslot",
             "nodes":[
                ["id", "posX", "posY", "posZ"],
                {"collision":true}
                {"nodeMaterial":"|NM_METAL"},
                {"nodeWeight":10},
                ["partnode",1.5,0.5,0.5],
            ],
         
            "beams":[
                ["id1:","id2:"],
                ["partnode","rt0l"],
                ["partnode","r1l"],
                ["partnode","r0l"],
            ],
    }
    }
    

    Things to try from here:

    Test your skills by adding another slot
    Try adding a sub-part of a part, to further your part skills.





    Part 6 : Flexbodies

    In Beam physics (specifically the next generation version of the physics engine), you won't have anything nice to look at if you don't have a flexbody/flexbodies. Flexbodies are mesh components that can deform with the physics structure. First we'll need to create a mesh to use with the physics. To do so I'm going to be using Blender to create a 1x1x1 meter cube.

    When doing meshes for BeamNG, make sure your modeler is set to "meters" for scale, since that's what Torque3D and Jbeam uses.

    6a) CREATING THE MESH
    In Blender, on the bottom left of your screen, click "Add>Mesh>Cube"


    When the cube object enters the scene, you should see "Add Cube" in the bottom left show up. The only thing we need to do here is enter the radius as 1m (1 meter)


    Next, add a material to the mesh. If you don't preform this step you won't see anything in BeamNG.

    To do so, first go to the Materials tab


    Click the + sign to add a new material


    Click "New" to create a new material instance


    And finally, name the material something like "myvehicle_cubemat" by clicking in this field, typing the name, then finalizing it with ENTER


    Next : Export this model file as a DAE, and name it "MyVehicle.dae". Place it alongside MyVehicle.jbeam.

    6b) THE JBEAM.
    Open MyVehicle.jbeam , and clear it. Replace it with the base Jbeam template found at the top of this post.
    (If you don't know what I mean, it's this:)
    Code:
    {
    "MyVehicle":{
            "information":{
                "name":"Vehicle Name Here",
                "authors":"Your Name Here",
            }
            "slotType":"main",
            "nodes":[
                ["id", "posX", "posY", "posZ"],
                {"collision":true}
                {"nodeMaterial":"|NM_METAL"},
                {"nodeWeight":10},
    
            ],
    
            "beams":[
                ["id1:","id2:"],
            ],
    }
    }
    
    Next, let's add the nodes. Since JBeam is in meters, and our cube is 1m in radius, each node will be at 1.0 in one way or another. I'll be structuring the nodes with a naming style like: ct0l, ct1r (cube top 0 l, cube top 1 right), where 0 is the front and 1 is the back (or vice versa).

    Add these nodes to your nodes section, or attempt them yourself:
    Code:
    ["ct0l",-1,-1,1],
    ["ct0r",-1,1,1],
    ["ct1l",1,-1,1],
    ["ct1r",1,1,1],
    ["cb0l",-1,-1,-1],
    ["cb0r",-1,1,-1],
    ["cb1l",1,-1,-1],
    ["cb1r",1,1,-1],
    
    Once you reload, you should find this in debug mode (providing physics are paused) :

    (imported from here)

    Now we should probably add some beams to keep this thing rigid :p. Here are the beams required (or you can attempt them yourself):
    Code:
                ["id1:","id2:"],
                ["ct1r","ct1l"],
                ["ct0r","ct0l"],
                ["cb0r","cb0l"],
                ["cb1r","cb1l"],
                ["cb1r","cb0r"],
                ["cb1l","cb0l"],
                ["ct1l","ct0l"],
                ["ct1r","ct0r"],
                ["ct0r","cb0r"],
                ["ct0l","cb0l"],
                ["ct1l","cb1l"],
                ["ct1r","cb1r"],
                //crosses
                ["ct1r","ct0l"],
                ["ct0r","ct1l"],
                ["ct0r","cb0l"],
                ["cb0r","ct0l"],
                ["ct1l","cb1r"],
                ["cb1l","ct1r"],
                ["ct1r","cb0r"],
                ["ct0r","cb1r"],
                ["ct1l","cb0l"],
                ["cb1l","ct0l"],
                ["cb1l","cb0r"],
                ["cb1r","cb0l"],
    
    Reloading the vehicle and entering debug mode, should present you with this skeleton:


    Now, let's add our flexbody! :)
    Add this above the nodes section:
    Code:
    "flexbodies": [
         ["mesh", "[group]:","nonFlexMaterials"],
         //Mesh name, group it belongs to
          ["Cube", ["cubenodes"]],
    ],
    
    If you're wondering what these parameters do, I'll explain them:


    You can also assign multiple meshes per group. So for example if your body mesh is split up between "body_APILLAR", and "body_MAIN", you could do this:
    Code:
    "flexbodies": [
         ["mesh", "[group]:","nonFlexMaterials"],
         ["body_APILLAR", ["mycar_body"]],
         ["body_MAIN", ["mycar_body"]],
    ],
    
    Anyways, continuing on with our simple cube:

    Next, we need to assign the nodes to "cubenodes" group. Simply add this above the nodes (but below the id,posX, etc table)
    Code:
    {"group":"cubenodes"},
    
    Then add this below the nodes, to "reset" to no flexbody
    Code:
    {"group":""},
    
    Your nodes section should now look like this:


    Now when you reload the vehicle in BeamNG, you should be presented with this:


    Yay! Our very own cube. You can't really hit it with vehicles unless you add collision triangles/quads, which are covered above. If you don't have this result, you may have named the mesh wrong, named the group wrong, etc.


    If you run into trouble, as always, I have the Jbeam file posted:
    Code:
    {
    "MyVehicle":{
            "information":{
                "name":"Vehicle Name Here",
                "authors":"Your Name Here",
            }
            "slotType":"main",
            "flexbodies": [
                ["mesh", "[group]:","nonFlexMaterials"],
                //Mesh name, group it belongs to
                ["Cube", ["cubenodes"]],
            ],
            "nodes":[
                ["id", "posX", "posY", "posZ"],
                {"collision":true}
                {"nodeMaterial":"|NM_METAL"},
                {"nodeWeight":10},
                {"group":"cubenodes"},
                ["ct0l",-1,-1,1],
                ["ct0r",-1,1,1],
                ["ct1l",1,-1,1],
                ["ct1r",1,1,1],
                ["cb0l",-1,-1,-1],
                ["cb0r",-1,1,-1],
                ["cb1l",1,-1,-1],
                ["cb1r",1,1,-1],
                {"group":""},
            ],
    
            "beams":[
                ["id1:","id2:"],
                ["ct1r","ct1l"],
                ["ct0r","ct0l"],
                ["cb0r","cb0l"],
                ["cb1r","cb1l"],
                ["cb1r","cb0r"],
                ["cb1l","cb0l"],
                ["ct1l","ct0l"],
                ["ct1r","ct0r"],
                ["ct0r","cb0r"],
                ["ct0l","cb0l"],
                ["ct1l","cb1l"],
                ["ct1r","cb1r"],
                //crosses
                ["ct1r","ct0l"],
                ["ct0r","ct1l"],
                ["ct0r","cb0l"],
                ["cb0r","ct0l"],
                ["ct1l","cb1r"],
                ["cb1l","ct1r"],
                ["ct1r","cb0r"],
                ["ct0r","cb1r"],
                ["ct1l","cb0l"],
                ["cb1l","ct0l"],
                ["cb1l","cb0r"],
                ["cb1r","cb0l"],
            ],
    }
    }
    
    I've also attached the DAE file to this post.




    Things to try :
    Add more to the mesh, then adjust the Jbeam file to that new mesh
     

    Attached Files:

    #10 Dummiesman, May 23, 2015
    Last edited: Sep 9, 2017
    • Like Like x 2
  12. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    Part 7 : MultiDae

    In BeamNG, you can create vehicles that have multiple DAE files making up the 3D model. This is useful for multiple reasons, such as not wanting to break original smoothing groups, putting additional parts in a new DAE file, etc. For this part of the guide, we'll be adding our very own part to the Gavril D series!

    To start, create a "pickup" folder in Documents\BeamNG.drive\mods\vehicles. In this folder we will place our new part Jbeam, and our new part DAE. Our new part won't have any nodes/beams or collision meshes, since this is simply to demonstrate multi-dae.

    Next, I'll be creating a cube mesh in Blender for a new "front bumper".

    7a) Making the mesh
    In Blender, on the bottom left, click Add>Mesh>Cube


    Once the Cube is added into the scene, adjust its position on the bottom left again. Set it to 0,-4,0 (like so)


    Next, press CTRL+A and apply Location, then repeat the process and apply Rotation and Scale.


    In the top-right corner, double click the "Cube" and rename it to dseries_testpart


    Now we're just about ready to export, but first we have to add a material to the object. Use the Flexbody part of the tutorial to learn how to do that.

    Once that's done, export the DAE into Documents\mods\vehicles\pickup\pickup_testparts.dae.

    7b) The JBeam

    This is going to be a seperate part that fits in the front bumper slot of the D series, but it's flexbody group will be set to the D15 chassis, since there are no nodes/beams on this part.

    Here is the JBeam for the part we'll be using, save this into Documents\mods\vehicles\pickup\pickup_bumper_testpart.jbeam:
    Code:
    {
    "dseries_test_bumper": {
        "information":{
            "authors":"A Guide Reader",
            "name":"My D15 Part",
        }
        "slotType" : "pickup_bumper_F",
        "flexbodies": [
             ["mesh", "[group]:", "nonFlexMaterials"],
             ["dseries_testpart", ["pickup_framefront"]],
        ],
    
    }
    }
    
    Now when you load the pickup in-game, and go to the part selector, you should find this under "Front Bumper":


    Select it, and you should be presented with this:


    It's nothing much, but it's multi-dae! As always if you have run into any issues, I have attached the DAE file for you.
     

    Attached Files:

    #10 Dummiesman, May 25, 2015
    Last edited: Sep 9, 2017
    • Like Like x 1
  13. TomiL88

    TomiL88
    Expand Collapse

    Joined:
    Aug 6, 2013
    Messages:
    169
    Thanks for these well done and clear tutorials. Really helpfull :cool:
     
  14. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    No problem! Helping is what I love to do :)

    Next part I think I'll do shapes (e.g. "how would one make a car door", or "how would one make a hood")
     
    • Like Like x 1
  15. TomiL88

    TomiL88
    Expand Collapse

    Joined:
    Aug 6, 2013
    Messages:
    169
    Hey thats cool. Thank you for your efford.
    Oh and I was trying to ad my own rims but they showd up as nothing in game. I mean the car had no front wheels when selecting my own rims. Dae was right and I did everything as in your front bumper exsample plus copied the d15 front wheel code and replaced my own dae. mesh etc . Maybe it´s different when adding own rims.
    You dont have to make tutorial about rims. I´ll try to figure it out by myself. :eek: And sorry for my poor explanation. I dont really know how to explain it in English.
     
  16. SuperNoob05

    SuperNoob05
    Expand Collapse

    Joined:
    Jan 4, 2015
    Messages:
    1,289
    I have to thank you so much for making this thread.
    Without it, I would've never gotten into jbeaming.
    Actually, wihtout this thread I probably wouldn't even have had the want to do anything jbeam related.
     
  17. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    Updated a bit.
     
  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