1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.35 Bug Reporting thread
    Solutions and more information may already be available.

Jbeam, couple of questions

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by ThatDude02, Nov 21, 2014.

  1. ThatDude02

    ThatDude02
    Expand Collapse

    Joined:
    Nov 11, 2014
    Messages:
    25
    Hello,

    I decided to begin with a simple examle to jbeam, but I'm having a rather difficult time with the jbeaming of wheels and suspension.
    I've read the wikis, looked at the example car, but I can't figure out what is meant here:

    ["mesh", "[group]:", "nonFlexMaterials"],
    ["BeamNG_Nodes", ["beamng_frame", "BeamNG_Lowerarm_F", "BeamNG_Upperarm_F"]],
    ["BeamNG_Beams", ["beamng_frame", "BeamNG_Lowerarm_F", "BeamNG_Upperarm_F"]],
    ["BeamNG_XBeams", ["beamng_frame", "BeamNG_Lowerarm_F", "BeamNG_Upperarm_F"]],

    //Flexbodies, the first name in the quotations is the name of the mesh from the .DAE file you created, the second name in quotations is the group it belongs to.
    //
    and in the suspension fie:
    "flexbodies": [
    ["mesh", "[group]:", "nonFlexMaterials"],
    ["BeamNG_Lowerarm_F", ["BeamNG_Lowerarm_F"]],
    ["BeamNG_Upperarm_F", ["BeamNG_Upperarm_F"]],

    ["BeamNG_Spindle_FL", ["BeamNG_Spindle_FL"]],
    ["BeamNG_Spindle_FR", ["BeamNG_Spindle_FR"]],



    Do you create new groups in the suspension file or? And do you need the spindle for the car to work?


    Also, in the example the car is split in 3 and is complete in one file, how should I do my car? Split it in different .DAE files or just one?
    For the model I use 3ds max
    Another question: How do you get your .DAE file exactly like it's supposed to be? In the example car everything has the origin 0,0,0
    how do I get it like that? I tried grouping everything and then putting 0,0,0 in but in the dae file it doesn't give me te same origin as the example car.
     

    Attached Files:

    • BEAMNGMine.png
    • BEAMNGPerfect.png
  2. Goosah

    Goosah
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Aug 30, 2013
    Messages:
    790
    These lines map the mesh objects in the .dae to certain groups of nodes. So, for the first line, it looks for an object called BeamNG_Nodes in the .dae. It maps that mesh to the nodes that are in the node groups BeamNG_Lowerarm_F and BeamNG_Upperarm_F. These nodes can be placed in the same .jbeam as the above instructions, or in another slot in another .jbeam that the game is instructed to load for the vehicle. So, you can define another .jbeam file to hold the node groups for suspension, but that new .jbeam must be instructed to be opened using slots.

    in the main jbeam:

    "slots": [
    ["type", "default", "description"]
    ["car_suspension_F","car_suspension_x", "Front Suspension"],
    ],

    This tells the game to look through the .jbeam files and load the slot called car_suspension_x that has a slotType car_suspension_F.

    The corresponding .jbeam will have this in it:

    "car_suspension_x": {
    "slotType" : "car_suspension_F",
    "nodes":[
    {"group":"BeamNG_Lowerarm_F"},
    ["abc",1,2,3],
    {"group":"BeamNG_Upperarm_F"},
    ["def",1,2,3],
    ],

    }

    For a simple vehicle there is no need for slots, and all the nodes and beams and all that jazz can be thrown in right under the flexbodies heading.

    Basically, any parts that move separately or detach from another should be separate objects within the .dae, NOT just a different element.

    Your nodes and your meshes must have the same origin. That is to say, if your wheel node is placed at x meters, your wheel mesh should be x meters from its origin. Once you have your parts in the right place in 3dsmax, you have to select all the objects, then move their pivots to 0,0,0 using "affect pivot only" in the heirarchy tab. Then alt+right click, select freeze transform, freeze rotation, transform to zero, rotation to zero. **Then go to the utilities tab and choose resetxform, reset selected.

    **NOTE: Once you resetxform it cannot be undone, so always save first, and then NEVER SAVE OVER THAT FILE ONCE RESETXFORM HAS BEEN APPLIED. NEEVVVVEERRRR. SAVE AS SOMETHING ELSE OR NOT AT ALL. After you apply resetxform, any time you try to modify your objects they will jump back to wherever they were before you had everything in the right place. Its Xtremely annoying.
     
  3. ThatDude02

    ThatDude02
    Expand Collapse

    Joined:
    Nov 11, 2014
    Messages:
    25
    Thank you for your extensive reply :)

    Oke but then how can I find the coordinates to map them into a jbeam file? Take a look at the saved model WITHOUT the resetXform?

    Thanks in advance :)
     
  4. Goosah

    Goosah
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Aug 30, 2013
    Messages:
    790
    Yes. Do all the transform stuff, then save the file, then reset xforms, then export as .dae, then reopen the saved file to inspect coordinates of vertices etc. I find the wheel hub centers are the best points to look at for aligning a car mesh and pre made jbeam. If your wheel mesh has its axle at 0.9m, and the wheel hub nodes are at 1.1m, you now know you just have to scoot your model forward 0.2m, then reset the origin 0,0,0 and it will line up. Or, you can leave your model alone and move all the points in all the jbeams back 0.2m (this takes longer lol). Make sense?
     
  5. ThatDude02

    ThatDude02
    Expand Collapse

    Joined:
    Nov 11, 2014
    Messages:
    25
    Thank you goosah, I understand it better now, it won't be long untill i've finished my very basic car, btw do you need to texture it before you export it to the game? I want to skip the texturing as it has nothing to do with the jbeam basics that I'm learning
     
  6. Goosah

    Goosah
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Aug 30, 2013
    Messages:
    790
    Give the parts standard materials with unique names. A materials.cs file will be created when you load the car in bmng, and you can change this file to use a null texture. That way you can have color and reflections. It's in the wiki somewhere
     
  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