Solved Collision Triangles

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

  1. Aaron_the_Hare

    Aaron_the_Hare
    Expand Collapse

    Joined:
    Jan 22, 2018
    Messages:
    29
    I'm going to map out collision triangles. I was wondering how to do it. I know there is the Introduction to Vehicle Creation but it is not specific. It says, "The nodes should be listed in an anti-clockwise direction in order for the coltri normal to point outward". I don't understand what this means. Thanks, Aaron
     

    Attached Files:

    • HELPMEPLZ.png
  2. Re:Z_IA

    Re:Z_IA
    Expand Collapse

    Joined:
    Nov 13, 2017
    Messages:
    538
    I believe this means that the order of the nodes for the coltri should be listed in your jbeam in counter-clockwise order.

    Screenshot331.png
    For instance, if you wanted to put coltris on this face, you would put them in the jbeam in the order of [1, 3, 4] and [4, 2, 1]. Basically, I think you just need to list the nodes in conterclockwise order, and you should be good. I may be wrong though, as I do not have very much experience with jbeam.

    Hopefully that helped! If you have any more questions, feel free to ask!
     
  3. Aaron_the_Hare

    Aaron_the_Hare
    Expand Collapse

    Joined:
    Jan 22, 2018
    Messages:
    29
    @Re:Z_IA What if it has a beam through the middle though? Also I wanted to ask if x through the middle or just a line through the middle is more sturdy? Thanks, Aaron
     
  4. Re:Z_IA

    Re:Z_IA
    Expand Collapse

    Joined:
    Nov 13, 2017
    Messages:
    538
    An 'X' should be more sturdy, I believe. And do you mean a beam going through as in a node in the middle of the face to form an 'X'? I seem to recall something similar from your jbeam yesterday. Same rule still applies, just enter the nodes counterclockwise. Also, if you notice a coltri that's facing the wrong way, you should just be able to swap the first and last nodes, and it will right itself, I believe.
     
  5. Aaron_the_Hare

    Aaron_the_Hare
    Expand Collapse

    Joined:
    Jan 22, 2018
    Messages:
    29
    I don't know what a coltri is or what it looks like. What I was saying before was My object had a line through the middle so how would I enter in the points. The line that goes through the middle has a node in the middle. I attached the nodes on one side. Could you give me an example with the nodes I provided? @Re:Z_IA
     

    Attached Files:

    • Nodes.png
  6. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    Coltris = Collision Triangle

    nl0, nl19, nl10 would be triangle, then nl0, nl10, nl1

    I'm not sure about that nl5, it looks bit odd, why it is there?

    Generally if you have nl5 there, then you should have also beams for nl1 to nl5 and nl5 to nl9, but seeing so little it is bit hard to really tell what is going on in there.


    Here is bit similar situation I believe, this is semi T75 frame from the game:
    upload_2018-1-24_2-53-1.png

    Here it is without triangles:
    upload_2018-1-24_2-53-38.png

    You can see how triangles go f20l, f20r, f10

    Then f10, f20r, f10r or f10, f10l, f20l or f10, f10r, f10l that is all four at end of the frame.

    It does not matter really which one you begin, but try to follow similar logic all the time as that saves time when later you need to change something.
     
    #6 fufsgfen, Jan 24, 2018
    Last edited: Jan 24, 2018
  7. Re:Z_IA

    Re:Z_IA
    Expand Collapse

    Joined:
    Nov 13, 2017
    Messages:
    538
    Oh, sorry. Coltri means collision triangle. I guess I should have typed the whole word, I'm just being lazy. (´꒳`∗)

    I believe you could do:
    [nl0, nl5, nl1]
    [nl9, nl5, nl0]
    [nl9, nl10, nl5]
    [nl1, nl5, nl10]

    But I think you should also make a beam connecting nl1 to nl9 to make an 'X,' since you have nl5 in the middle.
     
  8. Aaron_the_Hare

    Aaron_the_Hare
    Expand Collapse

    Joined:
    Jan 22, 2018
    Messages:
    29
    I fixed that now. The nodes in the middle flex/wiggle alot now. Untitled-1.gif I understand more and could you make an example of this one? Untitled-1.png Also does it matter the order you go around the object? Also what is the order of the nodes? Is it counter clockwise or like bottom to top? Thanks, Aaron @Re:Z_IA @fufsgfen
     
    #8 Aaron_the_Hare, Jan 24, 2018
    Last edited: Jan 24, 2018
  9. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    You need to connect those middle nodes to opposite side corner nodes, so they will be rigid, also connect opposite side corners together.

    I guess node in middle is not really needed there, because if you want node to middle that can be used for lifting, you could add that as separate node, which would have then beams to all four corners of that side.

    However I'm not expert at making good beam structure, I'm still learning myself.
     
  10. Aaron_the_Hare

    Aaron_the_Hare
    Expand Collapse

    Joined:
    Jan 22, 2018
    Messages:
    29
    So your saying no beams in the middle like this? @fufsgfen
     

    Attached Files:

    • Untitled-1.png
  11. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    Middle nodes might not be necessary, beam would run from corner to corner, it does not need to have node in the middle, you would make kind of X from corner to corner, then connect opposite corners to each other with beams that run inside the cube.

    To have stable node you usually need to have beams to 3 directions from the node, you use beams to anchor those nodes on place so they can't move.

    Nodes are then actual thing, while beams just hold nodes on place.

    Way collision works is that it checks if node comes to contact with collision triangle, so that is why you need to make those collision triangles, beams can't make collision and collision triangle is kind of sensor that senses if node comes to contact of your shape of nodes.


    Update, then amount of nodes change also how deformation works, now if you wish to have cube's side crumple inwards, then that middle node would be needed, it really depends a bit from what you want to achieve, but just for normal box that should stay in shape, those middle nodes are not necessary, but if you use middle nodes, then you need to support them from some other direction too.
     
  12. Aaron_the_Hare

    Aaron_the_Hare
    Expand Collapse

    Joined:
    Jan 22, 2018
    Messages:
    29
    How would I connect them to other corners or support them. I don’t understand what you mean by “corner to corner, it does not need to have node in the middle, you would make kind of X from corner to corner, then connect opposite corners to each other with beams that run inside the cube.” I need those middle nodes for refrende nodes or else I would have none. How would I do this, “To have stable node you usually need to have beams to 3 directions from the node, you use beams to anchor those nodes on place so they can't move.” How would I connect them on the inside also? Thanks, Aaron @fufsgfen
     
  13. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    It's long time since I made box, but look at this, you can make node to be at center of your box and then have it supported by those corner nodes:
    upload_2018-1-24_16-11-25.png

    Bottom node is one which I made to be same way as your center node, which is then supported by placing those beams from every bottom corner to that middle node.

    This version lacks some beams that should be added for rigidity. 3 directions is 3 axes, X, Y, Z, if you have node supported only by two directions it will flex. With my box I did attempt to use very small amount of beams, but it was flexing a bit, by adding supports from corner to corner, that is for example from top back left to bottom top left, rigidity would be improved.

    Instead of triangles, I did use quads with my box, can't remember why, maybe because I wanted to be different?

    Open attached jbeam with BN editor, which can be found from Steam\steamapps\common\BeamNG.drive\utils\editor\BNEditor.exe in case you haven't used it with your project, it might help to understand it bit more.

    About ref nodes, I have set them like this in my box as I had similar thought pattern like you back then (about 1 year ago):
    ["ref:", "back:", "left:", "up:"]
    ["box_bottom_center", "box_bottom_back_left", "box_top_back_left", "box_center"]

    However setting them like this would be perfectly fine too and there would be no need to have middle nodes or bottom nodes:
    ["ref:", "back:", "left:", "up:"]
    ["box_bottom_front_right", "box_bottom_back_right", "box_bottom_front_left", "box_bottom_front_right"]

    I found out that naming nodes with long clear names did really help me to understand node beam structure much better than using short names.

    Update:
    I did attach better box which from you can see easily how there is no need for nodes in middle. I did leave old lines there, but those are commented out. Also ingame shot with beam debug so you can see beams:
    upload_2018-1-24_17-8-20.png upload_2018-1-24_17-11-4.png
     

    Attached Files:

    #13 fufsgfen, Jan 24, 2018
    Last edited: Jan 24, 2018
  14. Aaron_the_Hare

    Aaron_the_Hare
    Expand Collapse

    Joined:
    Jan 22, 2018
    Messages:
    29
    I understand this. How would you put nodes inside? Also how do you connect them to the inside? Can you do it in the editor? Will the JBeam in the editor automatically update when you edit it? I can’t respond quick because I’m at school. Thanks, Aaron
     
  15. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    It is manual work, just write coordinates of the node where you want it to be, and then click refresh to see where it appears to. There is some function that should add nodes or move nodes automatically etc. but that never has worked for me, far easier to write everything manually than fight with the software.
     
  16. Aaron_the_Hare

    Aaron_the_Hare
    Expand Collapse

    Joined:
    Jan 22, 2018
    Messages:
    29
    I mapped out the triangles but they keep falling through each other. Help me please! I attached the mod so you guys could take a look at it. Thanks, Aaron @fufsgfen @Re:Z_IA
     

    Attached Files:

    #16 Aaron_the_Hare, Jan 24, 2018
    Last edited: Jan 24, 2018
  17. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    There are few problems that I could see of.

    At line 109 you had "," last closing bracket don't need comma, that was reason why BNEditor could not show anything.

    You are missing one triangle as you can see here:
    upload_2018-1-25_1-51-23.png

    Also your nodes are not starting from the ground level, you can see how in above image triangles, beams and nodes are floating up in in the air, same goes for your model, this can cause lot of issues.

    Box spawns underground as your reference nodes are not correct, what you have written to refrerence nodes is:
    ["nl0", "nr3", "nl2", "nr5"]

    From those, nl2 and nr5 don't exists, those haven't been defined in your nodes section:
    Code:
            ["nl0",0.363,-0.363,0.637],
           ["nl1",0.363,-0.363,1.363],
           ["n2",0.0,-0.363,1.0],
           ["nr3",-0.363,-0.363,0.637],
           ["nr4",-0.363,-0.363,1.363],
           ["nl5",0.363,0.0,1.0],
           ["n6",0.0,0.0,0.637],
           ["n7",0.0,0.0,1.363],
           ["nr8",-0.363,0.0,1.0],
           ["nl9",0.363,0.363,0.637],
           ["nl10",0.363,0.363,1.363],
           ["n11",0.0,0.363,1.0],
           ["nr12",-0.363,0.363,0.637],
           ["nr13",-0.363,0.363,1.363],
    
    Lastly your middle nodes don't have enough supporting beams, that is reason sides flex/shake so much.

    So first of all, I would recommend you to use comments which help you to know better which node is which when working on notepad++

    list at above would be like this with the comments:
    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
    
    That should help you to figure out bit better how to fix the issues, use BNEditor to see your nodes and triangles, it helps to visualize your nodes, beams and coltris, even it does not make job automatic.
     
  18. Aaron_the_Hare

    Aaron_the_Hare
    Expand Collapse

    Joined:
    Jan 22, 2018
    Messages:
    29
    I fixed the issue of the non existing triangle and it still does the same thing. How did you import it into the editor. When I do it just comes up with nothing in the 3D view. How do I put a node in the middle also to stop shaking or how do I just stop the shaking? Thanks, Aaron
     
  19. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    As I wrote, you have extra comma on line 109 in file you attached to earlier post that needs to be removed so that file loads into editor, you can see it in screenshot I took from the editor.

    Nodes don't stop shaking, beams do, if you want to have middle nodes, then you have to have beam from the middle node to corner node, preferably to two corner nodes.

    You need to fix your reference nodes to get your box to work properly, look very closely to see that you have wrong nodes in ref nodes section.
     
  20. Aaron_the_Hare

    Aaron_the_Hare
    Expand Collapse

    Joined:
    Jan 22, 2018
    Messages:
    29
    I had @Re:Z_IA do the reference nodes for me. I don't want a middle node if it is going to shake. How do I get rid of middle nodes? Do I re export the jBeam from blender after I get rid of the middle node and then put that in? How would I do reference nodes then since it needs ones in front and back? Please explain it more or could you Discord me at [DELETED_TEXT] to chat so i can figure it out? Thanks, Aaron
     
    #20 Aaron_the_Hare, Jan 25, 2018
    Last edited: Jan 25, 2018
  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