Solved Weight problem causing instability and explosion.

Discussion in 'Mod Support' started by mehio, Jul 24, 2018.

  1. mehio

    mehio
    Expand Collapse

    Joined:
    Jun 20, 2018
    Messages:
    152
    Im using the miramar jbeams for my car which is half the size of the miramar.
    I lowered ALL the weights of the nodes in ALL the jbeam files by almost half including engine body transmission etc.....
    When i try to spawn the car it gives a fatal exception.
    Im looking for an explanation for WHY this is happening and HOW to fix it.
    Any help is greatly appreciated.
     

    Attached Files:

  2. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    If many beams connects to node, then node needs more weight or instability occurs.

    Less beam spring might also help.

    It is best to lower node weights one by one, little at the time, so you can tell which one has reached 'critical mass'.
     
  3. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,600
    If it really is a node/beam stability issue then sometimes reloading and watching the jbeam visualization during 100x slow motion can help. I can't download and try the zip at the moment. I don't recall whether 'stability' issues would normally result in a fatal exception though.

    EDIT: I do not get a fatal vehicle exception with the zip you uploaded. There are various other errors and problems, but the vehicle does drive.
     
    #3 torsion, Jul 24, 2018
    Last edited: Jul 24, 2018
  4. mehio

    mehio
    Expand Collapse

    Joined:
    Jun 20, 2018
    Messages:
    152
    Sorry i uploaded the wrong file ill upload the new one and post a picture of whats happening.
    And yes its instability not fatal exception.
    EDIT:
    I just saw it in 100 times slowmotion.... its like its turning itself inside out and exploding.
     

    Attached Files:

    #4 mehio, Jul 24, 2018
    Last edited: Jul 24, 2018
  5. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,600
    Jbeam creation and tuning isn't my forte, so all I can do is give you tools rather than real help. Sorry if this isn't useful to you. You can turn the timescale down to 1/1000 (eg 1/10 of the normal slowest speed) by using this command in the console:
    Code:
    bullettime.set(0.001)
    At that speed you should have a few seconds to pause the game, setup your Beam Visualization to "stress" or whatever makes sense, and turn down your Mesh Visibility. At that point you can pause and unpause repeatedly to step through the explosion. Tuning is in your future.
     

    Attached Files:

    • screenshot_00078.png
  6. mehio

    mehio
    Expand Collapse

    Joined:
    Jun 20, 2018
    Messages:
    152
    Thats fine any help is greatly appreciated.
    So far ive lowered the weight of alot of nodes except the body.jbeam, everytime i touch one value it explodes.
     
  7. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    4-5kg tends to be minimum of node value that you can reach easily, going below that is difficult, one needs to start adjusting beam spring values and going too low in beam spring will cause beams to become jelly.

    Nodes that have for example only 3 beams connected can cope with less weight than let's say nodes with 8 beams connected to them, so you might need to add new nodeWeight lines to keep more weight on those nodes that have more beams connected while lowering weigh of nodes that have less beams connected.

    It is not easy to adjust all that, especially as one has to keep weight balance of front and rear.

    Yesterday I did try to get off 100kg from 1800kg vehicle and there was plenty of room to get weight off rear, but pretty much none available at the front, things started to shake or explode right when I changed front by 1kg, had to take 0.1kg weights off from lot of places.

    So much one would like that there would be ingame app, where you set max weight, weight distribution and CG height, then app would do millions of iterations trying every possible combination to end up with result asked while maintaining stability.

    It would not be too difficult to do if one would know java and lua, I guess, but I'm not that good.
     
  8. mehio

    mehio
    Expand Collapse

    Joined:
    Jun 20, 2018
    Messages:
    152
    Yeah it would be difficult to adjust every single node and beam spring its not even worth it.
    But if i understand you correctly , the more complex your jbeam is ,the higher the minimum weight of the nodes is going to be since theyr connected to alot of beams.(not all of them ofcourse) . So considering this, if you want to design a small car,how do you achieve a good quality jbeam like the official ones while not exceeding the maximum weight of the actual car? Like in my case im using the miramar jbeam(~1000kg) in my own car honda s800(715kg).
    And yes the app you are talking about would not be too difficult i can tell since im a computer engineer myself BUT it would require time and effort.
     
    #8 mehio, Jul 25, 2018
    Last edited: Jul 25, 2018
  9. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Using nodes and beams only where they need to be and that is really difficult part, because one needs to try to visualize all the forces going around and have to have beams transferring those forces to nodes, then have just enough nodes to have reasonable shaping of the mesh, there are so many aspects one needs to balance that it makes job really difficult and tedious.

    Also it is not enough to just consider crash forces, but also suspension mounting points and chassis flex.

    So lighter the vehicle, more difficult it is to make in terms of jbeam. Something small and heavy is always going to be easier. Bigger in size and lower in weight is going to be more difficult.

    You might try to find nodes which you could remove completely to get simpler jbeam on some parts, so that you don't need so many beams connected to some nodes, but other than that it will be days and days of finetuning each one of the parameters.

    I guess that is also why so many mods die as this aspect of making mod is really boring and tedious for most.

    I'm not aware of any ways to make it easier or less tedious, would like to know if there is any.
     
  10. Goosah

    Goosah
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Aug 30, 2013
    Messages:
    790
    Most of the vehicles have the spring values very close to the max value for a given mass. When the mass is reduced the spring has to be reduced proportionally. Damping should be reduced too. If you halved the masses you will have to halve the beamSpring and beamDamp values to start with. Specific areas will need more reduction of spring or damp.
     
    • Agree Agree x 3
    • Informative Informative x 1
  11. mehio

    mehio
    Expand Collapse

    Joined:
    Jun 20, 2018
    Messages:
    152
    If you reduced the damping and spring wouldnt that make the chassis for example , kinda floppy or not as stiff as it should be?
     
  12. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    If you reduce too much, it has to be in balance with weight and then length of the beam has some effect etc. It's like juggling.
     
    • Like Like x 1
  13. Goosah

    Goosah
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Aug 30, 2013
    Messages:
    790
    Length of beam doesn't affect stability. If you scale the size of a structure up or down uniformly it will not become more/less stable. However it does become more/less stiff in relation to mass, since the beam has the same spring but is now shorter. Smaller vehicles will always have less stiffness/mass ratio in our physics engine.

    However, if you scale down the size of a vehicle and also the weight, it will not necessarily become like jello, because most of the vibration of the car is generated by the forces acting against its own masses. If you lower the mass and spring together, the car will have more or less the same vibration properties.
     
    • Like Like x 2
  14. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Yeah, with length of the beam I meant that jello issue, which is possible to deal with higher spring or denser NB structure, which again has something to with weight and stability in that sense as more nodes need to be lighter nodes.

    That leads to situation where smaller light object is easier than bigger light object.

    Like in modeling where one needs to see polyflow, in making NB structure, there are areas that can be soft, where less spring is not going to be a problem, then there are areas where one wants more stiffness, that all plays in this juggling, where to place nodes, how many nodes to place etc.



    Because how it all works, it takes lot of practice to really 'get' it and my stupid brain might never be enough good to really get it even I know basic principles how it works.

    Also worth noting is that at times you can get away with less beams by triangular shape, kinda hard to explain, but it is easy to use too many beams and also nodes, always look if you can simplify structure to something triangular, because if you need to connect node to all directions, that means node has to be heavier than one that has only 3 beams to it. Like cube below is not going to hold it's form, it would need lot more beams to each node to hold it's form, but triangle thing is simplest and strongest form.
    upload_2018-7-25_22-34-49.png

    Oh and leave suspension nodes alone, nothing good comes up when making those lighter I have found out, at least not with my lack of skills! :D
    --- Post updated ---
    From that over 1000kg body itself is 403kg, rest of the weight comes from parts, so look especially engine and transmission weights, but also other parts in addition to body.
    upload_2018-7-25_23-17-34.png
     
    • Agree Agree x 1
  15. mehio

    mehio
    Expand Collapse

    Joined:
    Jun 20, 2018
    Messages:
    152
    Is it safe to imagine it as 2 nodes connected together by a tight rubber band but the rubber band isnt strong enough to pull them together(which is good) BUT when you reduce the weight of the nodes the rubber band is strong enough to pull them together causing them to crash into each other which will in return cause instability? So if you want to reduce the weight of the nodes you have make the rubber band less tight so that its not strong enough to pull them together? Also if the rubber band is too soft (lowered spring) and the nodes are heavy, the nodes will stretch and pull on the rubber band easily which results in jello like structure?
     
  16. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    I guess it is kinda like that, but that rubber band is also kinda what holds those nodes apart from each other.

    Steel bar has spring property, rubber bar has too, but value is much different, so you can kinda beams to be rubber bars to simulate something really flexible.

    That bar shatters then when not all values are in balance.

    With too light nodes and too many beams on them, what happens is that they start to vibrate really fast and weight keeps them from vibrating.

    Then there is beam strength and beam deform, first one give point where beam just breaks and second is when beam is not original length anymore, that is permanent condition.
     
    • Like Like x 1
    • Informative Informative x 1
  17. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,600
    Again, not my forte... but I really don't think that's an accurate way to describe it. :( I'm afraid that there is no direct analogue with reality for this one... the simulation is just an arbitrary set of rules, I think that it defies analogy. I'm afraid that saying "it's like this" or "it's like that" may be more misleading than instructive.

    Instead I think fufsgfen took the correct path. Describing what actually happens inside the simulation is probably the only way to really wrap your head around it. That description matches what I've been told before: weight adds stability, more beamspring needs more weight & damp. If you get the mix/balance wrong then you get rapid vibrations/oscillations which lead to instability. Going into really slow motion can help find the problem area. In this case I guess that the whole thing is the problem area for the moment. Once you do as Goosah suggested and halve the spring and damp values you'll probably be able to see something more useful in slow motion.
     
    • Agree Agree x 1
  18. mehio

    mehio
    Expand Collapse

    Joined:
    Jun 20, 2018
    Messages:
    152
    Yeah i just re read the wiki about nodes and beams and saw how inaccurate my analogy is.

    Two more things i want to ask you guys:
    1: fufsgfen and goosah mentioned something about LENGTH. Length isnt mentioned in the wiki so do any of you mind explaining what does length of the beam affect.
    Could you please clarify more?

    2 : if its all just balancing spring ,damp and node weight, then it should be the same difficulty to design small cars as well as big heavy cars. As Goosah said:
     
  19. Goosah

    Goosah
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Aug 30, 2013
    Messages:
    790
    In real life, the stiffness of a material is actually a stiffness per unit length/area/volume. Ex. If you make 2 steel rods of the same thickness, but one is twice as long, the one twice as long will have half the stiffness.

    However in our physics engine, the beam stiffness is constant no matter what the length is chosen. If you are trying to maintain an exact match to a real material stiffness like above, you have to manually change the spring to match the change in length.

    The problem is, if you increase the spring but reduce the mass, the physics reaches a stability limit. This is essentially because the structure always wants to vibrate (like a tuning fork being struck), and at some point the pitch is too high to be calculated, and boom.

    This means is there is a practical limit to how stiff you can make smaller structures. In the case of making a small car, pretty much you want to make the stiffness as high as possible (at the edge of stable) and so you don't have to care about length at all.
     
    • Informative Informative x 2
  20. mehio

    mehio
    Expand Collapse

    Joined:
    Jun 20, 2018
    Messages:
    152
    Awsome thanks alot that really informative and clear!
     
  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