WIP Beta released MayaToJbeam - Visual Jbeam Editor - near zero typing

Discussion in 'Utilities and programming' started by ivankio, Aug 25, 2013.

?

Would this be usefull for you?

  1. Yes, I have Maya too.

    44 vote(s)
    14.2%
  2. Yes. I may adopt, but I wish it was in Blender.

    145 vote(s)
    46.9%
  3. Yes. I may adopt, but I wish it was in MAX.

    46 vote(s)
    14.9%
  4. Yes. I may adopt, but I wish it was in another software.

    18 vote(s)
    5.8%
  5. No. Maya as plataform would defeat the purpose of an easier way to generate Jbeam.

    10 vote(s)
    3.2%
  6. No. It doesn't seem much easier than the alternative.

    1 vote(s)
    0.3%
  7. No. I'm not creating vehicles.

    33 vote(s)
    10.7%
  8. Other opinion.

    12 vote(s)
    3.9%
  1. ivankio

    ivankio
    Expand Collapse

    Joined:
    Aug 18, 2013
    Messages:
    37
    Update 4 (21/Sep)

    Alfa 0.4 contains a minor fix to previous version.
    - Deleted springs are now properly deleted when exporting the jbeam.

    Thanks to user "hummiliation" for testing and spotting it. If anyone else is using it and could send me feedback, it would accelerate the development.

    I'll note here that I'm still testing two different approaches to make the whole vehicle creation more intuitive inside Maya.

    -------------------------------------------------------------------------------------------------------------------

    Update 3 (03/Sep)

    (video upload in progress)


    Attached is now Maya to jbeam alfa 03. Open the script editor in Maya and open or paste the script contend in a MEL tab. Select all and drag and drop into a shelf. Just click the new icon to run. (or press crtl+enter on the script editor).

    Please excuse the vastly incomplete tutorial at this moment as I must focus on the development instead of a tutorial that is bound to be obsolete soon. As the script is a WIP, whoever wants to use it now shall be a little bit adventurous (and Maya knowledge is a big plus). Please read this post, watch the videos (update 1 and 3 at least) and I'll be happy to give some help at any moment. Please drop some feedback if you try it.

    -------------------------------------------------------------------------------------------------------------------
    Update 2 (02/Sep


    -------------------------------------------------------------------------------------------------------------------
    Update 1 (28/Aug):

    All my problems were because I was using Jbeam instead of jbeam :eek:. So here it is working, from Maya to BeamNG Drive, for reals.



    Excuse me for the long video as I wanted to reinforce why I chose maya springs, while touching the surface of how structure needs to be treated differently from polygons (for the pure artists out there).

    -------------------------------------------------------------------------------------------------------------------
    Original (24/Aug/2013)

    Create Jbeam definitions visually in Maya and export it to BeamNG Drive. No coding required.

    [MEDIA=youtube]http://youtu.be/898vWP6qxKI[/MEDIA]

    Maya has some legacy tools for dynamic soft bodies that seems very fit to produce Jbeam structures. Forgot to mention in the video that you can also create springs (aka beams) between different objects, accounting for suspension and other joints. Custom and per component attributes are possible too. There is more potential to it I'll expose when the tutorial time comes.

    The script at the moment cover almost everything I could understand from BeamNG documentation available to date (aug 2013), with further attributes like pre-compression easily added later when some stuff is sorted.

    I'm having trouble with the header or the folder system. My problems are not with the MEL script or any incompatibility, but with the basics of the Jbeam structure as I couldn't even duplicate a working vehicle and get it working script aside.
    As I'm not able to test it fully yet, default values are mimicking existing vehicles from the game. I would greatly appreciate if someone could help me here: Tutorial-Creating-your-own-vehicle
     

    Attached Files:

    #1 ivankio, Aug 25, 2013
    Last edited by a moderator: Oct 21, 2015
  2. eletricmano

    eletricmano
    Expand Collapse

    Joined:
    Mar 30, 2013
    Messages:
    408
    Se eu soubesse programar, eu ate te ajudava. Quem oficialmente modela carros para esse jogo, que eh o "Gabester" talvez pode te ajudar. Eh voce quem fez esse programa? (Nao posso por acento nas palavras, porque as letras com acento aparecem como ponto de interrogacao.)

    English:
    If I knew how to program, I would help you. The person who officially models cars for this game, which is "Gabester" could maybe help you. Did you make this program? (I can't use accents on the words, because the letters with accents show up as interrogation points.)
     
  3. ivankio

    ivankio
    Expand Collapse

    Joined:
    Aug 18, 2013
    Messages:
    37
    Paranauê, paranau-á paraná - hahahaha.
    Nice to see someone close. I've worked with people from FourX in Maringá and Cartoon Pro in Londrina, are you into CG? I'm no programmer either, just a technical artist that can fiddle with scripting.

    Back to topic, yes, I did the script to translate native particles and springs from Maya to Jbeam nodes and beams. But there's some BeamNG specifications that I am off yet. BeamNG Drive is in alpha and of course I understand the documentation and support is far from a priority. But maybe this can be worthy to make work. Hopefully Gabester will put me out of my misery and I'll finally be able to crash test flintstones cars around Bedrock :)

    As far as I could tell, Maya particles and springs are very analogous to Jbeam requirements. I have yet to study the other components like tires, engines and hinges, but I guess I can come up with something to deal with them and the multiple parts that makes a vehicle.
     
  4. eletricmano

    eletricmano
    Expand Collapse

    Joined:
    Mar 30, 2013
    Messages:
    408
    I can't wait! I'm learning how to model, and maybe I'll make vehicles for BeamNG, but I don't know Jbeam much, so it'll be a useful tool. Você manja nos paranauê então? :p
     
  5. Johnny-HH

    Johnny-HH
    Expand Collapse

    Joined:
    Aug 9, 2013
    Messages:
    22
    Nice Script! Seems to be very helpful and timesaving.

    Please try to make a 3dsmax version of that script too, cause I think there are many 3dsmax users which could need that script too.

    Thanks!
     
  6. gabester

    gabester
    Expand Collapse
    Vehicle Director
    BeamNG Team

    Joined:
    Jun 6, 2012
    Messages:
    2,653
    If you can produce a basic .jbeam with your script and attach it I might be able to look at it and see what's wrong.
     
  7. estama

    estama
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 7, 2012
    Messages:
    267
    Very nice work. I'm impressed.
     
  8. ivankio

    ivankio
    Expand Collapse

    Joined:
    Aug 18, 2013
    Messages:
    37
    Here is the fluffyCube.Jbeam of the video.

    But the script aside, I'm having problems with the basics. I could not even replicate the already working cones vehicle inside BeamNG as I said in: Tutorial-Creating-your-own-vehicle.
    There are a folder where I tried to follow Nadeox1's tutorial in the minimalistic way I could imagine, and a folder with a myCone clone. I would rather that you take a look at them (I've already noticed that I overlooked the beam definition in this, but in those tests I did stare them a lot without finding a problem)

    I feel so silly going ahead while failing at the basics. :eek:


    Code:
    {    "fluffyCube": {
    
    
            "information":{
                "authors":"Andre Ivankio - with MayaToJbeam by Andre Ivankio",
                "name":"Super Fluffy Cube",
            },
    
    
            "slotType" : "main",
    
    
            "refNodes":[
                ["ref:", "back:", "left:", "up:"]
                ["pt1", "pt2", "pt3", "pt4"]
            ],
            "nodes": [
                ["id", "posX", "posY", "posZ"]
                {"collision":1},
                {"selfCollision":0},
                {"frictionCoef":0.7},
                {"nodeWeight":4},
                {"nodeMaterial":"|NM_METAL"},
                {"group":"Cube_HD_DYN"}
    
                ["pt1" -100 -100 100]
                ["pt2" -33.33333588 -100 100]
    ...
                ["pt55" -100 33.33332825 -33.33333588]
                ["pt56" -100 33.33332825 33.33332825]
            ],
    
    
                {"beamSpring":801000,"beamDamp":500},
                {"beamDeform":10000,"beamStrength":"FLT_MAX"},
                ["pt1","pt0"]
                ["pt2","pt0"]
    ....
                ["pt55","pt53"]
                ["pt55","pt54"]
    
    
    
    
            "flexbodies": [
                ["mesh", "[group]:"],
                ["Cube_HD", "[Cube_HD_DYN]:"],
        }
    }
    About porting it to another software, Blender is showing more popularity than MAX in the community (good). But honestly I can't even tumble the camera in Blender at the moment :) Although it does use python for scripting.
    Does Blender has something in the likes of springs where you can connect crossing beams without the constrain of a surface continuity? I would have yet to investigate if components are accessible with scripting, but that's a consideration after the Maya script is working and if I would have the time.
     

    Attached Files:

    #8 ivankio, Aug 26, 2013
    Last edited: Aug 26, 2013
  9. gabester

    gabester
    Expand Collapse
    Vehicle Director
    BeamNG Team

    Joined:
    Jun 6, 2012
    Messages:
    2,653
    You're missing commas between every item in each node line (name, x, y, z). Estama says this shouldn't matter but I think it does.

    Also you're not making a beams section, you're just listing beams after closing the nodes section. You need:

    "beams": [
    ["id1:", "id2:"],


    and then

    ], to close it
     
  10. NkosiKarbul

    NkosiKarbul
    Expand Collapse

    Joined:
    Aug 8, 2013
    Messages:
    438
    This is more than amazing and of some indescribable Value for the Community and creation of Vehicles or dynamic/deformable Objects!
    I love You, Sir Ivankio! XD



    Sadly i dont own Autodesk Maya, may i allow myself to hope for a Blender Version, at some unknown Time in the Future, if the Poll shows a majority on that Choice? ;)
    Thank You for this splendid Idea and good Luck with the further Development!
     
  11. ivankio

    ivankio
    Expand Collapse

    Joined:
    Aug 18, 2013
    Messages:
    37
    As I was trying to say, even before the script, I can't manage to get a vehicle to work by regular means (typing in).

    Please, take look at the folder attached. "myCone" should be a replica of the working "cones" just changing the name. Yet this does not work. There was no reference to the string "cones" inside the dae or jbeam, so I don't see why just changing the folder and files name would prevent it from working.

    myVAR is a minimalistic theoretical test.

    - - - Updated - - -

    I have been stalking Blender, but never touching it too much. It uses python which is no ancient Greek. But I'm relying a lot on Maya particles and spring tools. A quick look in Blender documentation says it solves soft bodies with modern surface only solution. I guess it could be countered if you can create edges without faces. Can blender do it?

    Worst case scenario, I wouldn't mind passing some geometries through it in maya for you. You welcomed me here with help. I'm in debt.
     

    Attached Files:

  12. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,683
    Really cool idea! I am thinking of making a MaxScript for this :)
     
  13. NkosiKarbul

    NkosiKarbul
    Expand Collapse

    Joined:
    Aug 8, 2013
    Messages:
    438
    As far as i know you can delete only the Faces , while keeping Vertices/Points and Edges of a former complete Mesh in Blender.
    Sadly im not using Blender very much at the Moment so i can't advise much, will talk to a friend laters.
    Furthermore i thought about a similair Spring System in Blender but just found something like this, maybe you can get an Idea for a Solution, dunno.
    http://myinventions.pl/021/BlenderSpringsAndDampersEN.pdf
    As i did not engage the Blender Game Engine and it's Scripts at all yet i can't tell if that will even offer something to you, thought to throw it in anway.

    Last but not least! You are in no Debt here whatsoever. Considering how much the Community can gain from such a Tool, it's the Community who is in Your Debt and so the least it can and should do, is supporting You!

    Regards, Nkosi.
     
  14. ivankio

    ivankio
    Expand Collapse

    Joined:
    Aug 18, 2013
    Messages:
    37
    Updated the first post.

    Shows the nodes, beams and basic settings going from maya to running in the game, never opening notepad.
    Next step, I need to study how the multi-part system works and start thinking on the collision triangles. Later the special categories like HubWheels and Hydros.

    - - - Updated - - -

    Yup, it is needed. We could share experiences. Are you familiar with BeamNG car's anatomy?
     
    #14 ivankio, Aug 28, 2013
    Last edited: Aug 28, 2013
  15. FastestClassic

    FastestClassic
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    514
    Wow, perfect timing! I just started modeling my car in Maya, and had no idea how to work with jbeams. Thanks so much! :eek:

    Hopefully you'll release this one before you work on a Blender version, though. I know so many people use Blender, but it's too complicated for me. I've tried learning that program at least five times... with no success, of course :confused:
     
  16. TomiL88

    TomiL88
    Expand Collapse

    Joined:
    Aug 6, 2013
    Messages:
    169
    I´s possible to draw only edges in Blender. Vertices(nodes) can be joined with beams(edges) by pressing J or F.
     
  17. nukezbomz

    nukezbomz
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    39
    Looks good, a Blender version would be great! Fully understand if you want to finish the Maya version first though. :)
     
  18. eletricmano

    eletricmano
    Expand Collapse

    Joined:
    Mar 30, 2013
    Messages:
    408
    Com o que você já fez até agora, tem como fazer um .jbeam para um carro? E obrigado por criar isso, logo teremos muitos veículos feitos pela comunidade! ;)
     
  19. netneo

    netneo
    Expand Collapse

    Joined:
    Aug 3, 2013
    Messages:
    9
    Can you share the script in this stage, because it would be a great help for me / us?
     
  20. Stealthy

    Stealthy
    Expand Collapse

    Joined:
    Aug 3, 2013
    Messages:
    5
    Omg please release this . The sheer amount of benefits would be insane .it work make it less like a rocket science to make a car


    Sent from my iPad using Tapatalk - now Free
     
  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