Solved Where do I have to put my wheel mesh in ?

Discussion in 'Mod Support' started by schumacher, Jul 29, 2016.

  1. schumacher

    schumacher
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    1,054
    Hey ; I would like to ask if I get a 3d model with Custom wheels , how do I get them appering in game instead of the ones which come with the jbeam I used (f.e. sbr or pessima jbeam) do I have to put the wheel mesh name anywhere in my suspention.jbeam flexbody section?

    Greetings
     
  2. DapperDan

    DapperDan
    Expand Collapse

    Joined:
    May 2, 2015
    Messages:
    1,249
    Code:
    "wheel_07a_17x9_R_deepdish_398767": {
        "information":{
            "authors":"BeamNG",
            "name":"Clockwise 533 Deepdish 17x9 Rear Wheels",
            "value":500,
        }
        "slotType" : "wheel_R_5",
        "slots": [
            ["type", "default", "description"]
            ["tire_R_17x9","tire_R_255_35_17_race", "Rear Tires"],
        ],
        "flexbodies": [
            ["mesh", "[group]:", "nonFlexMaterials"],
            //alloy wheels
            ["wheel_07a_17x9_deepdish", ["wheel_RR","wheelhub_RR"], [], {"pos":{"x":-0.50, "y":0.0, "z":0.0}, "rot":{"x":0, "y":0, "z":180}, "scale":{"x":1, "y":1, "z":1}}],
            ["wheel_07a_17x9_deepdish", ["wheel_RL","wheelhub_RL"], [], {"pos":{"x": 0.50, "y":0.0, "z":0.0}, "rot":{"x":0, "y":0, "z":0}, "scale":{"x":1, "y":1, "z":1}}],<edit the flexbody name here to the mesh name
        ],
        "nodes": [
            ["id", "posX", "posY", "posZ"],
            {"collision":true},
            {"selfCollision":true},
            //rear wheels
            {"nodeWeight":5.0},
            {"nodeMaterial":"|NM_METAL"},
            {"chemEnergy":200,"burnRate":0.5,"flashPoint":300,"smokePoint":200,"selfIgnition":0,"specHeat":1},
            {"frictionCoef":0.5},
            {"group":"wheelhub_RR"},
            ["rw1r", -0.33, 0, 0],
            {"group":"wheelhub_RR"},
            ["rw1rr", -0.60, 0, 0],
            {"group":"wheelhub_RL"},
            ["rw1l", 0.33, 0, 0],
            {"group":"wheelhub_RL"},
            ["rw1ll", 0.60, 0, 0],
            {"chemEnergy":false,"burnRate":false,"flashPoint":false,"smokePoint":false,"selfIgnition":false,"specHeat":false},
            {"group":""},
        ],
        "beams": [
            ["id1:", "id2:"],
            {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
            {"breakGroup":""},
            {"beamDeform":75000,"beamStrength":400000},
            {"beamSpring":801000,"beamDamp":6},
            //rear wheel
            ["rw1r","rw1rr"],
            ["rw1l","rw1ll"],
            {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
        ],
        "pressureWheels": [
            ["name","hubGroup","group","node1:","node2:","nodeS","nodeArm:","wheelDir"],
            {"disableMeshBreaking":true,"disableHubMeshBreaking":false,"enableHubcaps":false,"hasTire":false},
    
            //general settings
            {"hubRadius":0.225},
            {"wheelOffset":-0.035},
            {"hubWidth":0.265},
            {"numRays":16},
    
            //hub options
            {"hubTreadBeamSpring":1101000, "hubTreadBeamDamp":10},
            {"hubPeripheryBeamSpring":1101000, "hubPeripheryBeamDamp":10},
            {"hubSideBeamSpring":1601000, "hubSideBeamDamp":10},
            {"hubNodeWeight":0.44},
            {"hubNodeMaterial":"|NM_METAL"},
            {"hubFrictionCoef":0.5},
            {"hubBeamDeform":68600, "hubBeamStrength":76000},
        ],
    }
     
    • Like Like x 1
  3. Neo

    Neo
    Expand Collapse

    Joined:
    Oct 31, 2015
    Messages:
    262
    Hi,
    before exporting your model to a COLLADA file you should make sure, that the location of the model is in the origin. If that is the case you can use one modelled wheel for all jBeam wheels.
    Unbenannt26.PNG
    Here you can see my mesh called "wheels". Make sure that you have a material assigned to it, then it´s ready to export.
    The flexbody section then looks in my case like this:
    Code:
     "flexbodies": [
                ["mesh", "[group]:","nonFlexMaterials"],
                ["wheels", ["trailer_wheel_R"],[],{"pos":{"x":-1.1863, "y":4.595, "z":0.499}}],
                ["wheels", ["trailer_wheel_L"],[],{"pos":{"x":1.1863, "y":4.595, "z":0.499}}],
    ],
     "pressureWheels": [
                ["name","hubGroup","group","node1:","node2:","nodeS","nodeArm:","wheelDir"],
                ...
                ["R", "trailer_wheel_R", "trailer_wheel_R", "anr3", "anr5", 9999,  "anr4", 1],
                ["L", "trailer_wheel_L", "trailer_wheel_L", "anl1", "anl0", 9999,  "anl2", 1]
                ...
    ],
    The first parameter is the name of the mesh, the second is the name of the group to wich the mesh is connected and the third parameter is deprecated. As options I only use the positions options, but you can use the rotations option as well. For my simple example is that not necessaryy. The position option move the mesh to the right place, for me here 1.1863 on the x-axis, 4.595 on the y-axis and 0.499 on the z-axis.
    Ingame it looks like this:
    Unbenannt28.PNG
    Btw you get these coordinates by moving your object in the editor of your choice to get the correct place. But don´t forget to revert this before you export it.
    Unbenannt27.PNG
    Greetings.
     
  4. schumacher

    schumacher
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    1,054
    Thanks you guys!, very useful. Just one question , do I have to use them as an own f.e tire.jbeam or can I place these Codes in any existing ones? I think the code daniel398767 posted is already in the suspention jbeam but the one neo posted is I think an own jbeam I guess but idk.
     
  5. meywue

    meywue
    Expand Collapse
    BeamNG Team

    Joined:
    Nov 19, 2015
    Messages:
    346
    It doesn't matter. You could even put it in a body.jbeam etc. The most important thing is that it has it's own unique part name. In the end all the parts from all the jbeam will be loaded separately.

    Everything's fine now with the mesh?
     
  6. schumacher

    schumacher
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    1,054
    Yes I got it in game but the Rubber of the sbr wheel is still there , just the middle of the sbr wheel is now replaced with my mesh. And it rotates weired , I will send a video or Screenshots later what I mean. I think I forgot to Set something up in blender
     
  7. SergentFido

    SergentFido
    Expand Collapse

    Joined:
    May 30, 2015
    Messages:
    1,607
    The weird rotation can appear if your 3D model use a normal map that is not compatible with Torque3D, i had the issue already once (wrong normal map format). The lights couldn't be renderer properly so it was like the wheel had it's own lights rotating around it. I don't know anything about your issue so i tell you that in the case it could help.
     
  8. schumacher

    schumacher
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    1,054
    I dont have at the moment a normal map applied / any texture, if you mean that . here is my problem

     
  9. SergentFido

    SergentFido
    Expand Collapse

    Joined:
    May 30, 2015
    Messages:
    1,607
    Your vid seems to be private, or at least require me to login, and i don't have Youtube account.
     
  10. schumacher

    schumacher
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    1,054
    try now again, I made it public now, but in 1 day ill delete it again
     
  11. Neo

    Neo
    Expand Collapse

    Joined:
    Oct 31, 2015
    Messages:
    262
    Can you please give us information about the coordinates of the mesh in blender and in your code? I think there is the problem.
     
  12. schumacher

    schumacher
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    1,054
    I have added a new jbeam with this

    Code:
    {
    "hirochi_wheel_02a_16x7_F": {
        "information":{
            "authors":"gg",
            "name":"Toyota Wheels",
            "value":450,
        },
        "slotType" : "wheel_F_5",
        "slots": [
            ["type", "default", "description"],
            ["tire_F_16x7","tire_F_215_55_16_sport", "Front Tires"],
        ],
        "flexbodies": [
            ["mesh", "[group]:", "nonFlexMaterials"],
            ["wheel01", ["wheel_FR","wheelhub_a_FR","wheelhub_b_FR"], [], {"pos":{"x":-0.48, "y":0.0, "z":0.0}, "rot":{"x":0, "y":0, "z":180}, "scale":{"x":1, "y":1, "z":1}}],
            ["wheel02", ["wheel_FL","wheelhub_a_FL","wheelhub_b_FL"], [], {"pos":{"x": 0.48, "y":0.0, "z":0.0}, "rot":{"x":0, "y":0, "z":0}, "scale":{"x":1, "y":1, "z":1}}],
        ],
        "nodes": [
            ["id", "posX", "posY", "posZ"],
            {"collision":true},
            {"selfCollision":true},
            //front wheels
            {"nodeWeight":5.0},
            {"nodeMaterial":"|NM_METAL"},
            {"chemEnergy":200,"burnRate":0.5,"flashPoint":300,"smokePoint":200,"selfIgnition":0,"specHeat":1},
            {"frictionCoef":0.5},
            {"group":"wheelhub_a_FR"},
            ["fw1r", -0.33, -0.0, 0.0],
            {"group":"wheelhub_b_FR"},
            ["fw1rr", -0.60, -0.0, 0.0],
            {"group":"wheelhub_a_FL"},
            ["fw1l", 0.33, -0.0, 0.0],
            {"group":"wheelhub_b_FL"},
            ["fw1ll", 0.60, -0.0, 0.0],
            {"chemEnergy":false,"burnRate":false,"flashPoint":false,"smokePoint":false,"selfIgnition":false,"specHeat":false},
            {"group":""},
        ],
        "beams": [
            ["id1:", "id2:"],
            {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
            {"breakGroup":""},
            {"beamDeform":75000,"beamStrength":400000},
            {"beamSpring":801000,"beamDamp":6},
            //front wheel
            ["fw1r","fw1rr"],
            ["fw1l","fw1ll"],
            {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
        ],
        "pressureWheels": [
            ["name","hubGroup","group","node1:","node2:","nodeS","nodeArm:","wheelDir"],
            {"disableMeshBreaking":true,"disableHubMeshBreaking":false,"enableHubcaps":false,"hasTire":false},
    
            //general settings
            {"hubRadius":0.22},
            {"wheelOffset":-0.015},
            {"hubWidth":0.225},
            {"numRays":16},
    
            //hub options
            {"hubTreadBeamSpring":1101000, "hubTreadBeamDamp":10},
            {"hubPeripheryBeamSpring":1101000, "hubPeripheryBeamDamp":10},
            {"hubSideBeamSpring":1601000, "hubSideBeamDamp":10},
            {"hubNodeWeight":0.42},
            {"hubBeamDeform":55600, "hubBeamStrength":63000},
            {"hubNodeMaterial":"|NM_METAL"},
            {"hubFrictionCoef":0.5},
        ],
    and this is line 13 I think in the f suspention jbeam

    Code:
    ["wheel_F_5","steelwheel_01a_15x7_F", "Front Wheels", {"nodeOffset":{"x":"$trackwidth_F", "y":-1.2495, "z":0.315}}],
     
  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