How to create Jbeam files

Discussion in 'Programming' started by Motovader72, Apr 30, 2014.

  1. Motovader72

    Motovader72
    Expand Collapse

    Joined:
    Feb 9, 2014
    Messages:
    351
    Are we all under the assumption that in order to create a Jbeam file, the devs
    and mods simply stare at a 3D model in Blender or 3ds Max and open Notepad++
    and start randomly writing code a line at a time? I don't think so.

    The model has to be in an environment where it can be measured...
    How else would you know at what X,Y,Z points to place center of the wheels?
    What X,Y,Z point to place the bottom node for the A-pillar?
    What are the angles from the bottom of the A-pillar to the roof?
    There has to be a "home" coordinate for all the X,Y,Z's to originate from,
    where is it? The origin under the vehicle in Blender?? How do you measure
    from that point to the points on the vehicle to get the measurements?

    I was a CNC Programmer/Machinist for 8 years.
    I've stared at lines of 3,4, and 5 axis code in Notepad for hours and hours.
    I understand what these files do. They define everything about the vehicle
    within the 3 dimensional space of the game. But...

    Please, someone that actually knows:
    What program do you have the 3d model open in to measure and analyze
    the vehicle to create the jbeam files?
     
  2. logoster

    logoster
    Expand Collapse

    Joined:
    Sep 5, 2012
    Messages:
    2,083
    blender with the mesh centered, as blender will give you exact coordinates of vehicle parts (and beamng doesn't change anything in that, so all coordinates are the same in-game as they are in blender)
     
  3. Motovader72

    Motovader72
    Expand Collapse

    Joined:
    Feb 9, 2014
    Messages:
    351
    Can you post a screen shot of where the coordinates are displayed?
     
  4. logoster

    logoster
    Expand Collapse

    Joined:
    Sep 5, 2012
    Messages:
    2,083
    sure, just tab into the vertex mode for the part you want, then press the "N" key to get a new menu that includes the coordinates, right click on the vertex you want, and it should show up where i circled:

    Screenshot (43).png

    a more experienced user could give more info though
     
  5. Motovader72

    Motovader72
    Expand Collapse

    Joined:
    Feb 9, 2014
    Messages:
    351
    That's exactly what I was looking for in this thread...
     
  6. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,960
    also control-R reloads the entire JBeam, so if you are just guessing and your guess is off, simply tweak and hit control-R to see the change in game
     
  7. logoster

    logoster
    Expand Collapse

    Joined:
    Sep 5, 2012
    Messages:
    2,083

    did my picture help at all though?
     
  8. Motovader72

    Motovader72
    Expand Collapse

    Joined:
    Feb 9, 2014
    Messages:
    351
    This much I knew, thanks. I used that to change the wheelbase several times.

    Yes, thank you. I will try that.
    That should work perfect for raising jbeam rooflines and wheelbases.
     
  9. ThreeDTech21

    ThreeDTech21
    Expand Collapse

    Joined:
    Sep 27, 2013
    Messages:
    1,616
    Does anyone know how to create the support beams properly? That is what's killing me. I can create an outer jbeam but the diagonals and A-pillar and support beams is just brutal. How do I know what connections are the best?


    Sent from my iPhone using Tapatalk
     
  10. dkutch

    dkutch
    Expand Collapse

    Joined:
    Mar 24, 2013
    Messages:
    818
    This is very simple. 3d curser in blender.
     
  11. ThreeDTech21

    ThreeDTech21
    Expand Collapse

    Joined:
    Sep 27, 2013
    Messages:
    1,616
    I think I understand it, is there a central node that all/most parts of the whole jbeam connect to? At least for the body?


    Sent from my iPhone using Tapatalk
     
  12. Bakasan

    Bakasan
    Expand Collapse

    Joined:
    Dec 3, 2013
    Messages:
    1,438
    Generally when I start a fresh jbeam (only a few so far), I basically make a low resolution "collision" model over the top of the 3d model, so all of the points are exactly correct with the model (this part I do in Setchup). Essentially, every vert is where a node will be placed. I export this low resolution model to blender, remove doubled vertices and delete all the faces and edges. Using the jbeam export script for blender, the vertices are converted to nodes. Open the jbeam with the vehicle editor, add some beams and bam! one jbeam:D

    - - - Updated - - -

    You don't have to have a central node at 0,0,0 but I like to use one for the camera rotation and whatever else it may come in handy for. I then join it with about 8 or so beams to the surrounding chassis.
     
  13. ThreeDTech21

    ThreeDTech21
    Expand Collapse

    Joined:
    Sep 27, 2013
    Messages:
    1,616
    I've been looking for this for months! Can you post a link to that script? Also how do you create a low resolution collision mesh in blender? This is just what I needed


    Sent from my iPhone using Tapatalk
     
  14. Bakasan

    Bakasan
    Expand Collapse

    Joined:
    Dec 3, 2013
    Messages:
    1,438
    Here is the node export script. I think it's best that you delete the edges and faces, so only nodes export, and then you can add beams in the vehicle editor of your choice.

    As for making the model, just place verts and connect them over your existing model. You just have to make a "low poly" version of your model (for a car bodyshell, a bit over 110 vertices (nodes) is quite fine)
     
  15. ThreeDTech21

    ThreeDTech21
    Expand Collapse

    Joined:
    Sep 27, 2013
    Messages:
    1,616
    should i use vertex snapping?
     
  16. Bakasan

    Bakasan
    Expand Collapse

    Joined:
    Dec 3, 2013
    Messages:
    1,438
    That would probably help :)
     
  17. Motovader72

    Motovader72
    Expand Collapse

    Joined:
    Feb 9, 2014
    Messages:
    351
    logoster posted the same info except with much greater detail, thanks...

    Thank you so much for this!!

    As already posted, here is the link to the Jbeam Export Script thread: Blender-Script-to-Export-Nodes-and-Beams
    and here is the link to the Real Time Vehicle Editor thread: Real-Time-Vehicle-Editor-Alpha-12
     
  18. Mythbuster

    Mythbuster
    Expand Collapse

    Joined:
    Aug 11, 2012
    Messages:
    782
    Yes, the center of the grid in your modeling program is 0,0,0 in world space.

    Maya has the same trick as Blender: the 3d cursor thing, except it's called a Locator in Maya... Basically it's ... well.. a 3d cursor really... It's a big + in 3d, you can snap it to vertices on your model, and it'll read out the coordinates of where your Locator is positioned in world space.

    Except for one thing:
    Normally in Maya, +Y = up, +Z = forwards. In BeamNG, +Z = up, +Y = backwards... So you have to change some settings to make Maya have the same coordinate system as BeamNG.

    On top of that, Maya measures in... erm.. I think centimeters when you first open it, and you have to change it to meters or something... I can't be bothered to math, but before I changed the settings, I had to scale it by 100 or 1000 or something when I exported to BeamNG.
     
  19. Motovader72

    Motovader72
    Expand Collapse

    Joined:
    Feb 9, 2014
    Messages:
    351
    I've never used Maya, I'm using Blender.

    I know how to scale the model, but scale in Blender
    is based on the current dimensions of the model.

    Is there no way to create a plane or line and make
    it 6ft. long by 2ft. wide?
     
  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