[Tutorial] - Creating your own vehicle

Discussion in 'Content Creation' started by Nadeox1, Aug 13, 2013.

  1. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Line 871


    (imported from here)

    Ok, I got it working.

    The group name wasn't corresponding

    (imported from here)

    Put the same name, and make sure that in the object name you don't miss any capital letter :)
     
  2. Wiikstreak_-

    Wiikstreak_-
    Expand Collapse

    Joined:
    Aug 11, 2013
    Messages:
    3
    Amazing thread, good job,

    i was wondering i kinda just wanna make wheels\rims, any tips on how i can make my custom wheels and get them ingame?=) i know how to model ofc, i just never done any kind of game oriented things, so i do not know what files to add and such. any tutorial/point a way for me, would be very helpfull :)
     
  3. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Can't yet unless you edit the original game files (Which I don't suggest at all). I suggest waiting till they add multiple .Dae support (if they will ever do).
     
  4. Wiikstreak_-

    Wiikstreak_-
    Expand Collapse

    Joined:
    Aug 11, 2013
    Messages:
    3
    Fast reply, thanks alot =) i guess i just have to wait then ;O hope they will implement this
     
  5. xuculate

    xuculate
    Expand Collapse

    Joined:
    Aug 10, 2013
    Messages:
    17
    can not even get the first step. When I open the cube with control + e, the program crashes

    - - - Updated - - -

    Somebody know if there is way to make the nodes and bones from 3ds?. because I do not even understand how I will make the boxes with the shape of my car assigning points in a note blog.
     

    Attached Files:

  6. physicsfreak

    physicsfreak
    Expand Collapse

    Joined:
    Aug 11, 2013
    Messages:
    15
    Nadeox1, thanks for the reply and the tutorial ofcourse!

    Moved the refNodes and flexbodies above the nodes and removed all useless comma's, but this had no effect and still produced the same error. But now I've added the beams part to the file and everything seems to work, maybe worth to put this into the tutorial, that this block is required.

    Added the files for anyone else, so you've got some starting point. All under a WTFPL license, so have fun! ;)
     

    Attached Files:

    #26 physicsfreak, Aug 14, 2013
    Last edited: Aug 14, 2013
  7. xuculate

    xuculate
    Expand Collapse

    Joined:
    Aug 10, 2013
    Messages:
    17
    I tried your box. But I still don?t understand how to do...:(
     
  8. physicsfreak

    physicsfreak
    Expand Collapse

    Joined:
    Aug 11, 2013
    Messages:
    15
    Ok I will try to break it up a little.

    When you look at my testcar.jbeam, you see that it exists of multiple sections, all with there own names, like:
    • information
    • refNodes
    • nodes
    • beams
    All contain some data that belongs to that section.

    information:
    Just a little section that contains information about the author, needs no explanation I think.

    refNodes:
    To be honest I am also not 100% sure on these ones, but they seem to be defining the orientation of the nodes, so the game engine knows whats the up/down/left/right side of your car, I think...

    flexbodies:
    Here you define which node groups are attached to the object in your .DEA file, so:
    ["name_of_the_object_in_your_dea", ["node_group", "you_can_also_add_another_node_group"]]

    nodes:
    Nodes are dots in a 3D space, so X, Y, Z coordinates, all these dots will map to the outlines of your 3D skeleton, which will be used as information for your softbody physics frame.

    beams:
    With the beams you connect all those nodes/dots you created together, to create the softbody frame, imagine them as lines that keep the dots together, but the lines themself are elastic and damping etc. so there is a possibility to move the dots from each other, when enough force is applied. (that's why stuff bends in the game)

    Just my understanding so far and I am a complete noob, only started messing with it since I found this topic, so correct me if I am wrong!

    Damn.. got a bit longer than planned sorry :)
     
  9. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    Managed to figure out where i went wrong in following this tutorial. Just so no one else makes the same mistake as i did.

    Make sure people know not to put a description of there car where it says information. I had this written down:
    Code:
    {"Raven Ravi": {
    "A small front wheel drive car":{
            "authors":"aljowen",
            "name":"Raven Ravi",
    when i should have wrote:
    Code:
    {"Raven Ravi": {
     "Description":{
            "authors":"aljowen",
            "name":"Raven Ravi",
    Derp on my side i guess. Thanks for this awesome tutorial. I am loving how much better the jbeam files are than the old truck files from rigs of rods. People new to soft body physics don't know how easy they have got it :p
     
    #29 aljowen, Aug 15, 2013
    Last edited: Aug 15, 2013
  10. TheBestOut

    TheBestOut
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    31
    Well that fixed that problem, Thank you:D. But my object still does not appear

    42VCT.jpg

    And it does say it adds it
    42VQc.png
    Any ideas?
    Also i just realized i have not yet textured it. I have only modeled it. Could that be the problem?
     
  11. physicsfreak

    physicsfreak
    Expand Collapse

    Joined:
    Aug 11, 2013
    Messages:
    15
    My little box was also without a texture, just a default material so that's not the issue I think. Does the name name of the object in your dea matches what you have in your jbeam file?
     
  12. TheBestOut

    TheBestOut
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    31

    Indeed it does. Any other idea's?
     

    Attached Files:

    • 43n69.png
  13. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,683
    i got my forza model in .dae format why won't the dae show up in gaem!? I just dragged dae into vehicle folder and nothing happen :c. This game sux modding is too hard.

    Haha kidding kidding

    Great tutorial man, Most likely will use this on my first vehicle
     
  14. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    I haven't been bale to get it to work in game. But i have fixed a few things that were wrong such as your camera references.

    [This file belongs to xuculate, it is not mine.]
     

    Attached Files:

  15. Woovie

    Woovie
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    19
    You mention to ensure model placement is correct within the editor; What is correct? Because mine is clearly not correct at all. Model is at 0,0,0 centered to the pivot point. Ingame my model is to the upper right of my collision. What exactly will give me a comparable 0,0,0 to my scene and ingame? Using 3DS Max but it should be the same more or less as Blender for this situation.
     
  16. SealedGecko

    SealedGecko
    Expand Collapse

    Joined:
    Aug 12, 2013
    Messages:
    16
    Nevermind I read my log a little better.
     
    #36 SealedGecko, Aug 18, 2013
    Last edited: Aug 18, 2013
  17. BoaMan

    BoaMan
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    35
    When I attempt to load my car in game it immediately freezes. I can view the console for ~1 minute then the window closes.

    The code I get is:
    Code:
    101.392356| === BeamNG - loading all .cs files in vehicle folder:vehicles/sunbeamstiletto/101.393057| * loading materials script file: vehicles/common/materials.cs
    101.398109| === BeamNG - loading all .cs files in vehicle folder DONE
    101.398814|BEAMNG| INFO| creating new object in slot 0 ...
    101.399890|BEAMNG| WARN| Lua tried to read env variable: LUA_PATH
    101.399944|BEAMNG| WARN| Lua tried to read env variable: LUA_CPATH
    101.417528|BEAMNG| INFO| loading vehicle directory:vehicles/sunbeamstiletto/
    101.417702|BEAMNG| INFO| * loading jbeam files:
    101.418437|BEAMNG| INFO|   * vehicles/sunbeamstiletto//sunbeamstiletto.jbeam with 1 parts
    101.418489|BEAMNG| INFO| * assembling main vehicle: SunbeamStilettto
    101.418679|BEAMNG| INFO| - Preparing vehicle: main
    101.418755|BEAMNG| INFO|  - 1 flexbodies
    101.419185|BEAMNG| INFO|  - 24 beams
    101.419455|BEAMNG| INFO|  - 8 nodes
    101.419518|BEAMNG| INFO|  - 1 refNodes
    101.419567|BEAMNG| INFO| - Vehicle Preparation done.
    101.419793|BEAMNG| INFO| link not found: from refNodes/1 to nodes/0
    101.419906|BEAMNG| INFO| - Vehicle numbering done.
    101.419988|BEAMNG| INFO| - post processing ...
    101.420039|BEAMNG| INFO|  - processed 0 of wheels(s)
    101.420086|BEAMNG| INFO|  - processed 0 of monoHubWheels(s)
    101.420132|BEAMNG| INFO|  - processed 0 of hubWheelsTSV(s)
    101.420177|BEAMNG| INFO|  - processed 0 of hubWheelsTSI(s)
    101.420228|BEAMNG| INFO|  - processed 0 of hubWheels(s)
    101.420324|BEAMNG| INFO|  - processed 0 of rotators(s)
    101.420597|BEAMNG| INFO|  - scaled 0 entries
    101.420647|BEAMNG| INFO| - post processing done.
    101.420691|BEAMNG| INFO| - Optimizing ...
    101.420772|BEAMNG| INFO| - Optimization done.
    101.420823|BEAMNG| INFO|  ** pushing vehicle to physics: main
    101.420892|BEAMNG| INFO| - added 8 nodes
    101.420975|BEAMNG| INFO| - added 24 beams
    101.421024|BEAMNG| INFO| - added 0 wheels, 0 of them are propulsed
    101.421072|BEAMNG| INFO| creating new flexbody in slot 0 ...
    101.421212|BEAMNG| INFO| - added 1 flexMeshes
    101.421287|BEAMNG| ERR | got exception: lua/vehicle/beamng.lua:2518: attempt to index a nil value
    101.422102|BEAMNG| ERR | lua/vehicle/sensors.lua:60: attempt to index a nil value
    full log here : http://pastebin.com/6bSFiirV

    The entire vehicle seems to be loaded before crashing. I honestly don't know any lua so I can't say what a "nil" value is.

    I am trying to use my own meshes from blender exported to DAE. they are not the shape of your nodes, but I don't know how to fix that.

    Edit: I know how to fix it, but I don't know how to find the location I should use for the nodes.
     
  18. Woovie

    Woovie
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    19
    I found my problem thanks to Sergy on IRC. My pivot was fine, but I had to use the "Reset Xforms" button and then it was positioned to 0,0,0 the same ingame and in my editor. :) You might want to add that information to the OP. This was in 3DS Max.

    Your error with your nodes is on line 2518. You can see that here.

    nil value is like NULL, it means there isn't a value and it's expecting one.

    As far as finding ingame X/Y/Z to model X/Y/Z, it depends on what 3D editor you use. I used 3DS Max and it has a feature to change the units. BeamNG uses meters ingame, so if you set your 3D editor to use meters, you can then go on your model and get the X/Y/Z of your vertices and use those for your node placement.
     
  19. BoaMan

    BoaMan
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    35
    I use Blender, I'll look to see what is available.

    I understand what Null, just didn't know that nil was the equivalent.

    Thanks, I'll keep looking!



    Update-


    It seems to be a problem with the reference nodes. the "back" node is returning a nil value, even though this is in my Jbeam code:

    Code:
    "refNodes":[
    ["ref:", "back:", "left:", "up:"]
    ["0", "1", "2", "3"]
    Yet again I am at a loss.
     
    #39 BoaMan, Aug 19, 2013
    Last edited: Aug 19, 2013
  20. Holland

    Holland
    Expand Collapse

    Joined:
    May 23, 2013
    Messages:
    982
    All I get is nothing. When I import the car I see nothing there? I don't get that?:confused:
     
  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