Best way to learn jbeam?

Discussion in 'Programming' started by ThreeDTech21, Nov 10, 2014.

  1. ThreeDTech21

    ThreeDTech21
    Expand Collapse

    Joined:
    Sep 27, 2013
    Messages:
    1,616
    I want to learn jbeam but i think im learning it the hard way. I'm studying the jbeam of the cars and doing a sort of trial and error. Is there a better way to learn jbeam? I have no background in programming so it is harder, What I do right now is slap my cars onto an existing jbeam that sort of fits the car type. I read the wiki but I am no good at written learning, I am an Kinesthetic Learner.

    IF you are expert at jbeam how did you learn it? Background in programming? reading the wiki? or studying the cars?
     
  2. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,960
    You'll find JBeaming and actual programming are 2 very different fields :p

    I for one have no issue programming, strong background there. JBeaming, eh, not so good.
     
  3. ThreeDTech21

    ThreeDTech21
    Expand Collapse

    Joined:
    Sep 27, 2013
    Messages:
    1,616
    So i can learn jbeam apart from C+ programing, thats good to know :rolleyes:

    It seems the hardest part of Jbeam is understand each class and what it does, If there was a video explaining each thing in a jbeam it would be much easier!
     
  4. Goosah

    Goosah
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Aug 30, 2013
    Messages:
    790
    The best way to learn is to examine props, experiment with changing values, adding nodes and beams to modify them, then try making one of your own. If you have no interest in props, you can modify vehicles too, but they are quite a bit more complicated. There are quite a few hurdles and leaps of logic to make. Do plenty of searching on the forums, most problems have been discussed, but not condensed very well yet.

    In my mind there are 3 hurdles to the newb trying to Jbeam: Syntax and naming, Shape of the Jbeam structure, and Managing physics instability. Here, have some tips:

    Syntax and Naming:

    Use Notepad++ with Javascript Language selected in the dropdown menu, and things will look be a lot more manageable.

    Syntax and naming structure has to be right. If you miss a character the game will just freeze, and you have to find the problem. If your names are iconsistent, the game will not find the things it is looking for. Looking in the game console usually gives the line of the error, but not always depending on the type of error, so as you make changes you should have the object loaded in BNG and ctrl+r frequently to update changes and backtrack if something goes wrong.

    Shape of the Structures:
    What's important is understanding of physics and strengths of materials. The jbeam "mesh" is not there to look like the real structure, it's there to behave like the real structure.

    For example:

    Say you want to make a flag pole. Well, the real pole is a single element, a piece of pipe sticking up. The connection to the base is rigid, not a pivot, so the pole stays upright. But a single Jbeam beam has pivots at each end (node), so it will just fall over. You need to make the Jbeam structure look more like a radio tower, which is a truss, to simulate that rigidity. A truss is a structure made of elements with free (or nearly) pivoting ends that come together to create a rigid object. Certain types of bridges, radio towers, transmission towers, building cranes, and tubular race car frames are examples of trusses.

    Another example of how jbeam differs from real life:

    The hood of a car is a flat sheet essentially. It is strong in shear, ie, you cant easily take a square sheet and pull on one side make it into a parallelogram. It's also difficult to stretch or compress. But you can easily bend or buckle it in either direction, because it is thin. A Jbeam mesh that is totally flat in shape like the hood, with strong beams, will be hard to shear, stretch or compress, like a real hood, but it will be completely floppy, because at the ends of each beam there is a pivot. To solve this you need some truss action. Check out the doors and panels of the current cars and you will see an extra node sticking out to turn the flat hood shape into a bit of a pyramid, adding rigidity and strength in bending. The chassis of cars is a structure that is a composite of these two ideas, sheets and beams simlulated with trusses.

    Physics Instability:

    When you have two masses (nodes), and a beam (spring) between them, you have a system that will always vibrate. Take a system with a heavy mass and a weak spring, and it will oscillate really slowly, like a slinky. Take a small mass, attach it to a really stiff spring, and it will vibrate at a high frequency, like a tuning fork. The problem with an iterative physics model is that if the system wants to vibrate at frequency higher than the time step of the sim, instability happens and things blow up! So, what you need to know is that if your Jbeam structure starts shaking, explodes, implodes, or the physics engine freezes on loading, is that either your masses are too low or the beam stiffness is too high. Damping also has to be in the right range. Its best to look at existing vehicles and props to get a feel for what good numbers are for node mass, stiffness, and damping should be. Since the structures we are making have more than one mass and one beam, things get complicated, so a stable mesh can become unstable just by moving the nodes around, or adding/subtracting nodes. Its best practice to build the structure with the stiffness artificially low, then once the shape is fleshed out well and the masses accurate, bring up the stiffness until it blows up, then backtrack to a slightly lower value.
     
    • Like Like x 1
  5. ThreeDTech21

    ThreeDTech21
    Expand Collapse

    Joined:
    Sep 27, 2013
    Messages:
    1,616
    Thanks for the info! I definitely keep this in mind going forward, ill start by messing around with the Cone and the concrete barrier to get an understanding of how things work.
     
  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