1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Stuck, Having problems with creating your mod? Let us help you: Mod Support

Introduction to MultiDae

Discussion in 'Content Creation' started by Nadeox1, Sep 14, 2014.

  1. Nadeox1

    Nadeox1
    Expand Collapse
    BeamNG.Support
    Staff Member

    Joined:
    Aug 5, 2012
    Messages:
    10,714

    (imported from here)

    • What is MultiDae
    • Syntax
    • Use MultiDae to use any wheel on any car


    What you are supposed to know:


    • Modelling (Or how to check object names at least)
    • Jbeam (How to open them and edit)




    What is MultiDae?

    MultiDae is a feature introduced after the 'PreRace Update' and is currently avalaible in the latest version of BeamNG.
    It adds the possibility to use multiple DAE files to be loaded.
    That means you can mod a vehicle with having to edit the original DAE file and that you can share a parts (Contained in a DAE) between multiple vehicle easily.

    How it works?

    In MultiDae, the additional DAE files wil be loaded from Steam/Steamapps/Common/BeamNG.Drive/Vehicles/Common.
    If you use a custom DAE, all your textures should go in the common folder. It's highly suggested to make materials.cs manually if needed.




    Syntax

    MultiDae is simply defined in the flexbody section. It will look like the normal flexbody section, just that each entry have some additional text.


    Code:
             ["mesh", "[group]:", "nonFlexMaterials"],
             ["MESHNAME", ["NODEGROUP"], [], {"pos":{"x":0, "y":0, "z":0}, "rot":{"x":0, "y":0, "z":0}, "scale":{"x":1, "y":1, "z":1}}],
    
    Pos is used to define where the mesh coming from another DAE should be placed. All official vehicles already have MultiDae, so the position where the wheel should be is already defined. In case you have to define it, the position should match the position of the node at the center of the wheel.

    Rot is used to define the rotation the wheel should have. If the wheel is facing the wrong way for example, we just put 180 in the Z value.

    Scale is used to define the scaling of the mesh. It will happen you to use this if for example the rim you want to put is much bigger than the tire.
    1 means the object will have the original scaling.
    2 means the object will be double the size
    0.5 means the object will be half the size.

    You will have to fine tune that untill the Rim or the object you want to use has the size you want. More info about this at the end of the next section.
    Usually the X value is the width of the rim. Y and Z should have the same value if you want the rim to stay a perfect circle.



    Example: Placing some different wheels on the Grand Marshal.
    NOTE-In the current experimental branch, all official vehicles are placed in Steam/Steamapps/Common/BeamNG.Drive/content/vehicles in ZIP archive.

    Since we want to make our changes stay after an update (without in any case modifying any of the original files), we are going to do to so:

    1. Navigate to Steam/Steamapps/Common/BeamNG.Drive/Vehicles
    2. Create a folder for the car we are going to use (In this case Grand Marshal). The name of the folder must be the same as the ZIP (In this case, the zip is called fullsize.zip, so we are going to call the folder fullsize)
    3. Go to the car zip and copy the wheels Jbeam to the folder we created.
    JjArg5N.png > tXgsv8m.png

    4. It's better to rename the JBeam to something else

    (imported from here)
    5. Now we open one of them and will see that the Jbeam contains 2 parts (some vehicles has only 1, others have more)
    QaWrlGn.png and 9TcY20u.png

    6. We need only 1 Part, so we delete one of them (I will delete the fullsize_wheel_F_steel section). Make sure the Jbeam always end like this, or it won't work!
    B5ymxts.png a ], and two }

    7.
    Now we open our modelling program (I use Blender). We need to import a DAE file, so I will go to File > Import > Collada. Then navigate to Steam/Steamapps/Common/BeamNG.Drive/Vehicles/Common and open the Wheels.dae
    RmyH4p0.png

    8. We will see this.
    bsDPj7d.png
    All the wheels are all placed together. So we need to skim trough them until we find the one we want. I will take the Hirochi Sunburst sporty wheels.
    UWtDb6i.png
    Now I will check the name of this object
    QBu8jwa.png

    9. We go back to the JBeam file, and go to the Flexbody section
    SNnHI5u.png
    And replace the wheel name with the one we saw on Blender
    0K55RsD.png
    Now go to the first lines of the JBeams. To prevent any problems, it's better to name the Slot (2nd line) and the Name(5th line) to something different
    QHsggLp.png > yOvJrgt.png

    10. Now we fire up BeamNG, and choose the Grand Marshal. If everything went right, we shouldn' have any problem.
    In the part selector, search for the wheel part (Keep in mind we only worked on One Jbeam so far (the front wheel), so I check the front wheel part and see if the one I create is there
    vD4tgXw.png

    and Voilà

    NM5Cs6d.png

    11. We just do the same thing for the Other JBeam (Rear wheels), by changing the name in the Flexbody section to the one we see in Blender, and changing the Slot and Name lines too and it should work.
    UHaBfbT.png

    Lbwpa6s.png


    Resizing the Rim
    The rim you are using has the wrong size? We can easily fix that using the Scaling value in the Flexbody section (Also explained above, in the Syntax section).

    For example, we want to make the rim a bit smaller. This is our line:
    Code:
             ["hirochi_wheel_01a_17x8", ["wheel_RR","wheelhub_RR"], [], {"pos":{"x":-0.825, "y":1.51, "z":0.32}, "rot":{"x":0, "y":0, "z":180}, "scale":{"x":1, "y":1, "z":1}}],
    
    
    
    We just replace the scale values with something else. To make the rim smaller, I will try with 0.98.

    Code:
             ["hirochi_wheel_01a_17x8", ["wheel_RR","wheelhub_RR"], [], {"pos":{"x":-0.825, "y":1.51, "z":0.32}, "rot":{"x":0, "y":0, "z":180}, "scale":{"x":0.98, "y":0.98, "z":0.98}}],
    
    
    
    2TUzxsN.png

    You can see the rear rim is a bit smaller.
    If you want to make the rim bigger, just use values higher than1.




    That's it. MultiDae is very simple to use, and can be used for whatever thing you want, not only Rims or Tires.
    Under I will attach the files I created to make this tutorial (Front and Rear wheel Jbeam), if you need.
     

    Attached Files:

    #1 Nadeox1, Sep 14, 2014
    Last edited: Jul 14, 2015
    • Like Like x 2
  2. gabester

    gabester
    Expand Collapse
    Vehicle Artist
    Staff Member

    Joined:
    Jun 6, 2012
    Messages:
    2,668
    Nice tutorial :) Another example of multi-DAE use in the standard game is the trailer for the D15 (it resides in tsfb.DAE in vehicles\common) and the cargo box and flatbed upfits for the H-Series (they're in van_upfits.DAE).

    Also, you might not need to use the scale function for wheels and tires (and probably shouldn't, because of bolt pattern dimensions). There are lots of tires available to use - find one with the same overall diameter and wheel rim diameter, scale the width to fit your rim of choice, and voila! For example, if you're putting the 17x8 Sunburst wheels on the Grand Marshal, you might not want to use the 15x9 tires (since the tire has a smaller rim diameter). Instead, find a tire with the same overall diameter (26 inches), close enough rim diameter (17 inches), and then scale the width to fit, if needed.

    That said, the tires are all pretty much the same - if you can just find one with the desired sidewall proportions, you can use that and mess with the scale values in the .jbeam until it fits.
     
    • Like Like x 1
  3. vladmir poopin

    vladmir poopin
    Expand Collapse
    Banned

    Joined:
    Mar 17, 2013
    Messages:
    858
    i have a question for gabe,
    in the future will we able to just click and drag a wheel into a nother folder and it will work?
     
  4. tdev

    tdev
    Expand Collapse
    Developer
    Staff Member

    Joined:
    Aug 3, 2012
    Messages:
    2,714
    no, it will need some more effort i guess ;)
     
  5. Davidbc

    Davidbc
    Expand Collapse

    Joined:
    Mar 20, 2013
    Messages:
    1,345
    They are also loaded from the ''vehicles/name_of_the_vehicle'' folder.
     
  6. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 16, 2013
    Messages:
    4,118
    Possibly but not officially ;)

    Someone will probably get to this before me but I was planning on doing a wheel changer.
     
  7. vladmir poopin

    vladmir poopin
    Expand Collapse
    Banned

    Joined:
    Mar 17, 2013
    Messages:
    858
    do you ever stop making thing that work really well?
     
  8. Jujune

    Jujune
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    1,081
    Hey.
    Got some time to try out.
    Every thing worked great, for the front wheels.

    But the rear wheels screw up: When im select them they doesnt appear :/
    I done it it 3 Times for the rear wheels but it dont work...
    Help?

    BeamNG 2014-09-18 22-42-45-72.jpg
     
  9. Nadeox1

    Nadeox1
    Expand Collapse
    BeamNG.Support
    Staff Member

    Joined:
    Aug 5, 2012
    Messages:
    10,714
    Make sure the PART NAME (Just under the author name) isn't the same ;)
     
    #9 Nadeox1, Sep 18, 2014
    Last edited: Sep 18, 2014
  10. Jujune

    Jujune
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    1,081
    You mean not the same as the front? Okay thanks.
    Makes sence because it worked after renaming the rear into a different one.

    I will try out some other rims tomorrow. Thanks for the Tutorial and your help.
     
  11. stephen f

    stephen f
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    272
    Doesn't seem to work for hubcaps. I'm able to swap wheels no problem, but hubcaps never appear in the parts menu. I tried to put the sunburst hubcaps on the moonhawk.
     
  12. Nadeox1

    Nadeox1
    Expand Collapse
    BeamNG.Support
    Staff Member

    Joined:
    Aug 5, 2012
    Messages:
    10,714
    It do work, I tried yesterday with the Grand Marshal (Altough you have to edit the Wheel so it enabled hubcaps, since by default it doesn't have them).

    The sunburst doesn't have hubcaps, so I'm not sure what you are trying to put on the moonhawk.
    You better just take the moonhawk hubcap jbeam, and duplicate and do the same thing as I did for the Rim in the tutorial.
     
  13. gabester

    gabester
    Expand Collapse
    Vehicle Artist
    Staff Member

    Joined:
    Jun 6, 2012
    Messages:
    2,668
    Sunburst does have hubcaps. You need to make sure that enableHubcaps isn't set to false within the wheel (for example, you can't put hubcaps on alloys)
     
  14. TomiL88

    TomiL88
    Expand Collapse

    Joined:
    Aug 6, 2013
    Messages:
    170
    Hmm.. I dont have the common folder in Steam/Steamapps/Common/BeamNG.Drive/Vehicles Whats going on :confused:
     
  15. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    7,051
    BeamNG.Drive/content/vehicles/common, you're looking in wrong place
     
  16. TomiL88

    TomiL88
    Expand Collapse

    Joined:
    Aug 6, 2013
    Messages:
    170
    I made a fresh install and now the common folder is in Steam/Steamapps/Common/BeamNG.Drive/Vehicles
    Before it actually was in BeamNG.Drive/content/vehicles/

    Anyways now it´s all good! :eek:

    EDIT...aaaand now it is in BeamNG.Drive/content/vehicles/ again after joining the beta version.
     
  17. Nadeox1

    Nadeox1
    Expand Collapse
    BeamNG.Support
    Staff Member

    Joined:
    Aug 5, 2012
    Messages:
    10,714

    You will meet 2 common folders:

    One is Steam/Steamapps/common

    (imported from here)

    Steam will store all your games inside that folder.

    The second is BeamNG.drive/vehicles/common

    (imported from here)

    In which you put files you want to share between vehicles. As I said on the tutorial for example, the wheels.dae is placed there as it's shared between all official vehicles.
     
  18. TomiL88

    TomiL88
    Expand Collapse

    Joined:
    Aug 6, 2013
    Messages:
    170
    I have my custom rim ingame. I have made my textures (AO and normals) and they are in .dds format. How do I add the textures into game? I´ve been looking car and wheel .jbeams but cant find any material slots. And in material.cs theres no word about wheel textures.
     
  19. Nadeox1

    Nadeox1
    Expand Collapse
    BeamNG.Support
    Staff Member

    Joined:
    Aug 5, 2012
    Messages:
    10,714
    The newly created files from the game (in this case the material.cs for your rim) is placed in documents/beamng/cache/vehicles/common.

    You can also use the ingame material editor to assign the texture to your rim. In the editor just select the car, and then swap to material editor and you should see your material in the list.
     
  20. TomiL88

    TomiL88
    Expand Collapse

    Joined:
    Aug 6, 2013
    Messages:
    170
    Interesting, I dont have material.cs file in my folder. And I cant figure out the material editor. :eek:
     

    Attached Files:

    • nono.jpg