Solved Collision Triangles

Discussion in 'Mod Support' started by Aaron_the_Hare, Jan 24, 2018.

  1. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    I don't understand what is this discord people keep talking about?

    It's perhaps best to forget about blender and doing jbeam with it, open the file in notepad or notepad++, remove that last comma, save the file and then open the file in BNEditor.

    Then you can start fixing the issues, look what your reference nodes are:
    ["nl0", "nr3", "nl2", "nr5"]

    Then compare that to your list of nodes:
    Code:
    //front   
          ["nl0",0.363,-0.363,0.637], //left bottom
           ["nl1",0.363,-0.363,1.363], //left top
           ["nr3",-0.363,-0.363,0.637], //right bottom
           ["nr4",-0.363,-0.363,1.363], //right top
    //back
           ["nl9",0.363,0.363,0.637], //left bottom
           ["nl10",0.363,0.363,1.363], //left top
           ["nr12",-0.363,0.363,0.637], //right bottom
           ["nr13",-0.363,0.363,1.363], //right top
    //middle
    ["n2",0.0,-0.363,1.0], //front
    ["nl5",0.363,0.0,1.0], //left
    ["n6",0.0,0.0,0.637], //bottom
    ["n7",0.0,0.0,1.363], //top
    ["nr8",-0.363,0.0,1.0], //left
    ["n11",0.0,0.363,1.0], //back 
    I will not make changes for you because it will not help you to learn how to find problems and fix them as that is one of the important things you need to learn in order to be able to create beams and there really is no automatic way of doing those that works, at least what I know of. Exporting jbeam from blender is not really going to work, you will end up doing it manually all over again anyway to get it to work.

    So your first task here is to fix your file by removing that extra comma.

    Next task is to open file in BNEditor.

    Third task is to use BNEditor's view to see which node is which, then type manually correct reference nodes in. That will help you to start understand what nodes are for and what beams are for.

    After that you can start looking into removing middle nodes and creating good structure, beam by beam, typing them.
     
  2. Aaron_the_Hare

    Aaron_the_Hare
    Expand Collapse

    Joined:
    Jan 22, 2018
    Messages:
    29
    I took out the middle nodes. How do I do the reference nodes? I'm not lazy and trying to get out of work but I genuinely don't understand. There are more than 4. This is what the BeamNG Wiki says:
    Name Type Optional Default Value Description
    ref string required n/a A node near the center and lowest point of the vehicle body (it doesn't need to be in the 0,0,0 node position, but usually is close to it)
    back string required n/a A node directly behind the ref node (y axis)
    left string required n/a A node directly left of the ref node (x axis)
    up string required n/a A node directly above the ref node (z axis)
    leftCorner string required n/a A node at the front left corner of the vehicle Used to trigger checkpoints.
    rightCorner string required n/a A node at the front right corner of the vehicle. Used to trigger checkpoints.
    I have no idea what to put and where. Thanks, Aaron
     
  3. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    Well, reference nodes are not extra nodes, they are existing nodes your beam structure already has, but you just decide that few of them will be your reference nodes.

    For example here, nr3 is the reference node, while nr12 is back (it is behind of nr3), then nl0 is left (it is left of nr3) and nr4 is up (it is up from nr3):
    "refNodes":[
    ["ref:", "back:", "left:", "up:"]
    ["nr3", "nr12", "nl0", "nr4"]
    ],
    upload_2018-1-25_4-43-31.png

    You can name nodes whatever you wish really, that is why in better box file I have them long names at it makes it a LOT easier to understand than short names.

    So all the work is done here and you can see how I have written comments on your nodes to tell what they really are, where they are, that makes it easier to understand what node nl0 if for example, which direction nr3 is from nl0 etc.:
    upload_2018-1-25_4-47-39.png

    Just write that stuff there and hit refresh to see it in 3d view, remember you can comment out lines with // so you can comment out nodes too to see better area you are working with for example.

    Oh and one thing about boxes ending up inside of each other, nodes are only things that collide with coltris, coltris can't collide with coltris, so if there is no node touching coltris it will go trough. Think it as a cloud of dots (nodes) if dot does not touch coltris then cloud will go trough.

    Beams are there only to hold nodes in position and coltris is only sensor that is sensing if node is touching the sensor, but coltris and beams as well as mesh are nothing when it comes to collision, they are ghosts that go trough everything.
     
  4. Aaron_the_Hare

    Aaron_the_Hare
    Expand Collapse

    Joined:
    Jan 22, 2018
    Messages:
    29
    Why would it be nr3? I think I know why because nr3 has one behind, above, and to the left. But why can’t it be any other one? The reference one on the wiki says that the one that is lowest and most centered. Also are you meaning to put tons of nodes on the beams to make it crash better and cross them? Thanks, Aaron
     
  5. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    Yeah, that is the node where you can get all those directions, now there is not much nodes that are closer to center that can be used so unless nodes are added it has to be that node which happens to be at edge as well as closest to center.

    That simple box stuff is really just to get familiar of the way things work, it becomes far more complex when starting to think about how object will collide and deform. It is not just because of deforming, but as I mentioned eariler, only nodes can collide, so you need somewhat dense web of nodes, but then again those eat computing power really fast, so you would like to keep them also quite low amount as possible, it is a compromise and how well one learns to do that compromise by creative structures is how good jbeam maker one is, I believe (I'm really terrible).

    To make your box to be something you can pile up with a good jbeam, that will take a lot of effort and time, you can spy some beam structure from ingame objects like metal box and wood crate, they have kind of cob web pattern at the surface:
    upload_2018-1-25_16-58-38.png upload_2018-1-25_17-2-50.png

    File of woodcrate is located in:
    %yoursteamdir%\steamapps\common\BeamNG.drive\content\vehicles\woodcrate.zip\vehicles\woodcrate\woodcrate.jbeam

    Extract that to some temp folder and open it in BNEditor so you can examine how it is made, also make sure to use ingame debug functions, above shot is with beam debug 'simple' so you can see beams in game.

    There is some key commands and info how to see beams and nodes ingame:
    https://wiki.beamng.com/JBeam_Introduction

    When you can make very simple structures and understand why certain beams are needed, why some beams are not needed (just takes little practice building different shapes), then it is worth to start looking into denser node density, deformation and all that as things start to get complex really fast when doing that. For example try to figure out all those beams in woodcrate, hard to even see them all from that picture.

    This is also why there is not new cars coming out every week, to build a car with nodes and to be able to keep those nodes in place with beams while maintaining good crashing and still somehow staying on weight target, that is not going to be fast, it is joggling with several things trying to find best compromise and really many hours of work that player never really sees, except in how vehicle deforms, not many understand what it takes and appreciation for making good structure might not always be given by players, but that is how Beams work.
     
  6. Aaron_the_Hare

    Aaron_the_Hare
    Expand Collapse

    Joined:
    Jan 22, 2018
    Messages:
    29
    So if there are 4 at the bottom equally away, which one would I choose? Thanks, Aaron
     
  7. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    If you have only four, then you choose one that has node on it's left, node on it's behind and node above it, there is not many nodes that has that with only four nodes available.
     
  8. Aaron_the_Hare

    Aaron_the_Hare
    Expand Collapse

    Joined:
    Jan 22, 2018
    Messages:
    29
    I fixed it and its good! Thanks! I will put you in the description of my mod! Thanks again, Aaron
     
  9. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    Great! Keep making little things and soon you are much better than what I can dream of becoming with nodes and beams.
     
  10. Aaron_the_Hare

    Aaron_the_Hare
    Expand Collapse

    Joined:
    Jan 22, 2018
    Messages:
    29
    I made a private conversation so could you answer my question there please? Thanks, Aaron
     
  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