A friend of mine (Hilux85) and I are making a M939 military vehicle and I'm having problems with the placement of the flexbody mesh compared to the jbeam, I would expect it to be centered. The group is centered in the middle of the railings, and I've had no luck with the transform function.
Have you defined the 'Ref Nodes' correctly? Also, are you sure your mesh has origin point to (0,0,0)?
Could you try to change the ref node to a node that is closer to the (0,0,0) location. I don't really remember what would cause that, so let's try.
I already tried that with same result. I'm just wondering, aren't mesh groups supposed to center to the jbeam group?
is the mesh properly centred in blender/3ds max or whatever? I've seen alot of people have to reset transforms or something before export for it to work in BeamNG or this issue occurs.
Thats what I mean though, there have been issues where the mesh appears centred correctly, but its loaded into game funny and yet reset the transforms has fixed it. I think its because every part has an origin that its position is relative to and that part origin isnt always the 0,0,0 that it should be.
Your mesh origin isn't set up correctly. 1) Go to Edit > Transform Toolbox (imported from here) 2) Click "Origin" in the align pivot area with objects selected (imported from here) 3) Reset your XForms (select all objects first) (imported from here) If you're modifiers has XForm you should be good to go! (imported from here) If the export comes out incorrectly again, you can also try changing the up axis (imported from here) Hope it helped!
We've pretty much gotten it center now, but I'm still unsure of how the whole group center works. I thought the center of each mesh group would be in the center of each jbeam group. Hilux is using blender to model the truck. Also, does anyone know why the texture darkens?
If you just moved it in 3dsmax till it was "center" then you have dnoe it wrong. Anyways, materials.cs in the vehicle directory will contain the colors for the material.
Ok, so I found the materials.cs in the cache folder, deleted that and the dts, then changed the settings. Worked. Now need to figure out if things are properly alligned. Correct me if I'm wrong, but the visible mesh will always be in the same position, so you have to build the jbeam around it? I can't seem to move parts around. then how does things move apart from eachother?
The base position of the mesh is determined by the ref nodes. After that it should not need to be moved, so yeah you build the jbeam around it.
I'm still failing to understand how flexbodies work, and I'm not grasping the concept of groups. I've got the mesh frame grouped to the jbeam frame group, but my problem is that the front axle mesh, even tho I have another group for the axle jbeam, is still somehow stuck on the frame, with no movement for the jbeam. Please do excuse my load of questions, but it's for a great cause.
//axle nodes {"group":"axleGroup"}, ["axleNode1",0,0,0], ["axleNode2",0,0,0], ["axleNode3",0,0,0], ["axleNode4",0,0,0], ["axleNode5",0,0,0], ["axleNode6",0,0,0], {"group":"none"}, //structure nodes that wont affect stuff //frame nodes {"group":"frame"}, Basically you set the axle group for axle nodes, therefore making the flexbody "axle" assigned to the group, and only those nodes will affect the mesh.
I still can't get it to work tho. and I've got no idea why. m939.jbeam: Frame mesh: Code: ["mesh", "[group]:", "nonFlexMaterials"], //frame ["Frame_NWB", ["chassis_rails"]], Frame beam: Code: //////////////////////////////////////////////////////////// {"group":"chassis_rails"} {"nodeWeight":50.0}, //segment 1 ["chassis_1_L_U",0.4318,-3.6576,0.1143] ... {"group":""} //////////////////////////////////////////////////////////// m939_front_suspension.jbeam: Axle mesh: Code: ["mesh", "[group]:", "nonFlexMaterials"], ["Axle_f", ["front_axle_group"]], Axle beam: Code: //////////////////////////////////////////////////////////// {"group":"front_axle_group"} ["axle_F_M_C",0,-2.667,-0.3302] ... {"group":""} //////////////////////////////////////////////////////////// Update: I've pretty much fiddled around with everything now, and I can't get the visual front axle to move with the jbeam front axle, I'm in desperate need of help!
Making a new post to get some attention, please excuse the double post. The mesh issue has not been resolved as explained per the last two posts, I'm making it in the experimental version, but it still doesn't explain why the axle mesh won't move separately from the frame mesh. I've tried everything I know of so far, but with no luck.
Just to re-iterate, all mesh parts should have their origins (or pivots) at 0,0,0 and then xforms reset. then, where the mesh is in reference to the origin should be the same as where the jbeam is with respect to its origin. So say the nodes at the end of your chassis are (5,6,7) then the end of the chassis mesh should be at (5,6,7) in the modelling program. If your xforms arent reset then even if the chassis appears in teh correct place, as soon as the object moves in BeamNG the mesh will start shifting around and won't appear locked down to the jbeam. What I do in 3dsmax is: Save first! Reset xforms cannot be undone and sometimes it messes up! 1.) Select all parts, click in the heirarchy tab on the right, select "affect pivot only" 2.) use the "select and move" transform to place all pivots at 0,0,0 3.) alt+rightclick, choose freeze transform, the freeze rotation, then transform to zero, then rotation to zero 4.) In the utilities tab, click reset xforms, reset selected. I don't see the problems in your snippets of code but it should look like this for example, looking in a jbeam from my car project called ke17_suspension_R.jbeam { "ke17_axle_R": { "information":{ } "slotType" : "ke17_suspension_R", "slots": [ ], "flexbodies": [ ["mesh", "[group]:", "nonFlexMaterials"], //rear axle ["ke17_hub_R", ["wheelhub_RR", "wheelhub_RL", "ke17_axle_R","ke17_rearshockmounts"]], ["ke17_axle_R", ["wheelhub_RR", "wheelhub_RL", "ke17_axle_R","ke17_rearshockmounts"]], ], "nodes": [ {"group":"ke17_axle_R"}, ... {"group":"ke17_rearshockmounts"}, ... {"group":""}, ], "beams": [ ... ], "hubWheels": [ ["name","group","node1:","node2:","nodeS","nodeArm:","wheelDir"], {"propulsed":0} ], "triangles": [ ["id1:","id2:","id3:"], ], } 3rd edit: if you are wondering, wheelhub_RR and wheelhub_RL groups are defined in the wheels jbeam