Hello,
Help me understand how the game engine determines the mass of an object? How does the game know if we are simulating steel, plastic, wood, or Styrofoam? Each has a different density.
Is it just a matter of trial and error playing with the rigid body attributes and weighing in game until we get the weight to where we want it?
Dynamic Objects
6 posts
Page 1 of 1
Re: Dynamic Objects
Weight is in the XML. I have not played much with the Rigid Body Attributes settings.
Code: Select all
<base>
<components maxMass="13350">
<component centerOfMass="0 0.5 1" solverIterationCount="10" mass="8750"/>
Re: Dynamic Objects
for clarity, the dynamic objects i'm focusing on are ones without xml files. Or, should i have the mindset that everything in game needs to driven by xml settings?
example, stop signs are dynamic items so they can break away when hit. some objects i want to make wont be static so they can be picked up in first person. Base game FS19 says some logs and square bales are too heavy when we know most farmers are strong enough to roll big logs at the least and can toss most square bales. bales are probably a bad example as i do believe they have xml but do traffic signs?
thanks for always helping out
example, stop signs are dynamic items so they can break away when hit. some objects i want to make wont be static so they can be picked up in first person. Base game FS19 says some logs and square bales are too heavy when we know most farmers are strong enough to roll big logs at the least and can toss most square bales. bales are probably a bad example as i do believe they have xml but do traffic signs?
thanks for always helping out
Re: Dynamic Objects
Traffic signs etc are controlled from the i3d, example from Elmcreek and as far as i'm aware cannot be adjusted in GE
specifically these lines
<TransformGroup name="joint" joint="true" breakableJoint="true" jointBreakForce="25" jointBreakTorque="25" rotMinX="0" rotMaxX="0" transMinX="0" transMaxX="1" rotMinY="0" rotMaxY="0" transMinY="0" transMaxY="0" rotMinZ="0" rotMaxZ="0" transMinZ="0" transMaxZ="0" clipDistance="88" nodeId="50357">
note also the collision mask setting in the next line
Some further collision mask settings
Code: Select all
<?xml version="1.0" encoding="iso-8859-1"?>
<i3D name="untitled" version="1.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://i3d.giants.ch/schema/i3d-1.6.xsd">
<Asset>
<Export program="GIANTS Editor 64bit" version="9.0.3"/>
</Asset>
<Files>
<File fileId="5" filename="$data/maps/mapUS/textures/props/trafficSignsDecals_diffuse.png"/>
<File fileId="2" filename="$data/maps/mapUS/textures/props/trafficSigns_diffuse.png"/>
<File fileId="3" filename="$data/maps/mapUS/textures/props/trafficSigns_normal.png"/>
<File fileId="4" filename="$data/maps/mapUS/textures/props/trafficSigns_specular.png"/>
</Files>
<Materials>
<Material name="lambert1" materialId="393" diffuseColor="0.494118 0.494118 0.494118 1"/>
<Material name="trafficSigns_mat" materialId="663">
<Texture fileId="2"/>
<Normalmap fileId="3"/>
<Glossmap fileId="4"/>
</Material>
<Material name="trafficSigns_signs_mat" materialId="664" specularColor="0.494118 1 0.494118">
<Texture fileId="5"/>
</Material>
</Materials>
<Shapes externalShapesFile="crossing.i3d.shapes"/>
<Dynamics/>
<Scene>
<TransformGroup name="farmVehicleCrossing" lockedgroup="true" translation="-368.031 -2.8775 90.2078" rotation="-180 3.7379 -180" nodeId="50356">
<TransformGroup name="joint" joint="true" breakableJoint="true" jointBreakForce="25" jointBreakTorque="25" rotMinX="0" rotMaxX="0" transMinX="0" transMaxX="1" rotMinY="0" rotMaxY="0" transMinY="0" transMaxY="0" rotMinZ="0" rotMaxZ="0" transMinZ="0" transMaxZ="0" clipDistance="88" nodeId="50357">[/b]
<Shape shapeId="1" name="colMain" dynamic="true" collisionMask="223" nodeId="50358" materialIds="393" castsShadows="true" receiveShadows="true" nonRenderable="true">
<Shape shapeId="2" name="diamondSign" clipDistance="120" nodeId="50359" materialIds="663" castsShadows="true" receiveShadows="true"/>
<Shape shapeId="3" name="yellowdecal" clipDistance="100" nodeId="50360" materialIds="664" castsShadows="true" receiveShadows="true" decalLayer="1"/>
<Shape shapeId="4" name="blackdecal" clipDistance="100" nodeId="50361" materialIds="664" castsShadows="true" receiveShadows="true" decalLayer="2"/>
</Shape>
</TransformGroup>
</TransformGroup>
</Scene>
</i3D>
<TransformGroup name="joint" joint="true" breakableJoint="true" jointBreakForce="25" jointBreakTorque="25" rotMinX="0" rotMaxX="0" transMinX="0" transMaxX="1" rotMinY="0" rotMaxY="0" transMinY="0" transMaxY="0" rotMinZ="0" rotMaxZ="0" transMinZ="0" transMaxZ="0" clipDistance="88" nodeId="50357">
note also the collision mask setting in the next line
Some further collision mask settings
Code: Select all
CollisionFlag.DEFAULT = registerFlag(0, "DEFAULT", "The default bit", true)
CollisionFlag.STATIC_WORLD = registerFlag(1, "STATIC_WORLD", "Collision with terrain, terrainHeight and static objects", true)
CollisionFlag.STATIC_OBJECTS = registerFlag(3, "STATIC_OBJECTS", "Collision with static objects", true)
CollisionFlag.STATIC_OBJECT = registerFlag(4, "STATIC_OBJECT", "A static object", true)
CollisionFlag.AI_BLOCKING = registerFlag(5, "AI_BLOCKING", "Blocks the AI", true)
CollisionFlag.TERRAIN = registerFlag(8, "TERRAIN", "Collision with terrain", true)
CollisionFlag.TERRAIN_DELTA = registerFlag(9, "TERRAIN_DELTA", "Collision with terrain delta", true)
CollisionFlag.CAMERA_BLOCKING = registerFlag(10, "CAMERA_BLOCKING", "Blocks outdoor vehicle camera", true)
CollisionFlag.TREE = registerFlag(11, "TREE", "A tree", true)
CollisionFlag.DYNAMIC_OBJECT = registerFlag(12, "DYNAMIC_OBJECT", "A dynamic object", true)
CollisionFlag.VEHICLE = registerFlag(13, "VEHICLE", "A vehicle", true)
CollisionFlag.PLAYER = registerFlag(14, "PLAYER", "A player", true)
CollisionFlag.BLOCKED_BY_PLAYER = registerFlag(15, "BLOCKED_BY_PLAYER", "Object that's blocked by a player", true)
CollisionFlag.ANIMAL = registerFlag(16, "ANIMAL", "An animal", true)
CollisionFlag.ANIMAL_POSITIONING = registerFlag(17, "ANIMAL_POSITIONING", "An object where animals can walk on", true)
CollisionFlag.AI_DRIVABLE = registerFlag(18, "AI_DRIVABLE", "AI can drive over this node", true)
CollisionFlag.GROUND_TIP_BLOCKING = registerFlag(19, "GROUND_TIP_BLOCKING", "Bit to block the ground tipping at this position", true)
CollisionFlag.TRIGGER_PLAYER = registerFlag(20, "TRIGGER_PLAYER", "A trigger for players", true)
CollisionFlag.TRIGGER_VEHICLE = registerFlag(21, "TRIGGER_VEHICLE", "A trigger for vehicles!", true)
CollisionFlag.TRIGGER_DYNAMIC_OBJECT = registerFlag(24, "TRIGGER_DYNAMIC_OBJECT", "A dynamic object", true)
CollisionFlag.TRIGGER_TRAFFIC_VEHICLE_BLOCKING = registerFlag(25, "TRIGGER_TRAFFIC_VEHICLE_BLOCKING", "A trigger that blocks the traffic vehicles", true)
CollisionFlag.TRIGGER_FORK = registerFlag(27, "TRIGGER_FORK", "A trigger for fork object mounting", true)
CollisionFlag.TRIGGER_ANIMAL = registerFlag(28, "TRIGGER_ANIMAL", "A trigger for animals", true)
CollisionFlag.FILLABLE = registerFlag(30, "FILLABLE", "A fillable node. Used in trailers and unload triggers", true)
CollisionFlag.WATER = registerFlag(31, "WATER", "Collision of the water plane", true)
Re: Dynamic Objects
Thx, I'll study this perspective. Before your reply, i was just comparing traffic signs to telephone poles and saw the big diff was poles are static and signs are dynamic. I didnt compare street name signs though like i originally intended too. I then found https://gdn.giants-software.com/tutorial05.php so that is where i got my orig theory.
TheSuBBie wrote: ↑Fri Jan 20, 2023 5:14 pm Traffic signs etc are controlled from the i3d, example from Elmcreek and as far as i'm aware cannot be adjusted in GE
specifically these linesCode: Select all
<?xml version="1.0" encoding="iso-8859-1"?> <i3D name="untitled" version="1.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://i3d.giants.ch/schema/i3d-1.6.xsd"> <Asset> <Export program="GIANTS Editor 64bit" version="9.0.3"/> </Asset> <Files> <File fileId="5" filename="$data/maps/mapUS/textures/props/trafficSignsDecals_diffuse.png"/> <File fileId="2" filename="$data/maps/mapUS/textures/props/trafficSigns_diffuse.png"/> <File fileId="3" filename="$data/maps/mapUS/textures/props/trafficSigns_normal.png"/> <File fileId="4" filename="$data/maps/mapUS/textures/props/trafficSigns_specular.png"/> </Files> <Materials> <Material name="lambert1" materialId="393" diffuseColor="0.494118 0.494118 0.494118 1"/> <Material name="trafficSigns_mat" materialId="663"> <Texture fileId="2"/> <Normalmap fileId="3"/> <Glossmap fileId="4"/> </Material> <Material name="trafficSigns_signs_mat" materialId="664" specularColor="0.494118 1 0.494118"> <Texture fileId="5"/> </Material> </Materials> <Shapes externalShapesFile="crossing.i3d.shapes"/> <Dynamics/> <Scene> <TransformGroup name="farmVehicleCrossing" lockedgroup="true" translation="-368.031 -2.8775 90.2078" rotation="-180 3.7379 -180" nodeId="50356"> <TransformGroup name="joint" joint="true" breakableJoint="true" jointBreakForce="25" jointBreakTorque="25" rotMinX="0" rotMaxX="0" transMinX="0" transMaxX="1" rotMinY="0" rotMaxY="0" transMinY="0" transMaxY="0" rotMinZ="0" rotMaxZ="0" transMinZ="0" transMaxZ="0" clipDistance="88" nodeId="50357">[/b] <Shape shapeId="1" name="colMain" dynamic="true" collisionMask="223" nodeId="50358" materialIds="393" castsShadows="true" receiveShadows="true" nonRenderable="true"> <Shape shapeId="2" name="diamondSign" clipDistance="120" nodeId="50359" materialIds="663" castsShadows="true" receiveShadows="true"/> <Shape shapeId="3" name="yellowdecal" clipDistance="100" nodeId="50360" materialIds="664" castsShadows="true" receiveShadows="true" decalLayer="1"/> <Shape shapeId="4" name="blackdecal" clipDistance="100" nodeId="50361" materialIds="664" castsShadows="true" receiveShadows="true" decalLayer="2"/> </Shape> </TransformGroup> </TransformGroup> </Scene> </i3D>
<TransformGroup name="joint" joint="true" breakableJoint="true" jointBreakForce="25" jointBreakTorque="25" rotMinX="0" rotMaxX="0" transMinX="0" transMaxX="1" rotMinY="0" rotMaxY="0" transMinY="0" transMaxY="0" rotMinZ="0" rotMaxZ="0" transMinZ="0" transMaxZ="0" clipDistance="88" nodeId="50357">
note also the collision mask setting in the next line
Some further collision mask settings
Code: Select all
CollisionFlag.DEFAULT = registerFlag(0, "DEFAULT", "The default bit", true) CollisionFlag.STATIC_WORLD = registerFlag(1, "STATIC_WORLD", "Collision with terrain, terrainHeight and static objects", true) CollisionFlag.STATIC_OBJECTS = registerFlag(3, "STATIC_OBJECTS", "Collision with static objects", true) CollisionFlag.STATIC_OBJECT = registerFlag(4, "STATIC_OBJECT", "A static object", true) CollisionFlag.AI_BLOCKING = registerFlag(5, "AI_BLOCKING", "Blocks the AI", true) CollisionFlag.TERRAIN = registerFlag(8, "TERRAIN", "Collision with terrain", true) CollisionFlag.TERRAIN_DELTA = registerFlag(9, "TERRAIN_DELTA", "Collision with terrain delta", true) CollisionFlag.CAMERA_BLOCKING = registerFlag(10, "CAMERA_BLOCKING", "Blocks outdoor vehicle camera", true) CollisionFlag.TREE = registerFlag(11, "TREE", "A tree", true) CollisionFlag.DYNAMIC_OBJECT = registerFlag(12, "DYNAMIC_OBJECT", "A dynamic object", true) CollisionFlag.VEHICLE = registerFlag(13, "VEHICLE", "A vehicle", true) CollisionFlag.PLAYER = registerFlag(14, "PLAYER", "A player", true) CollisionFlag.BLOCKED_BY_PLAYER = registerFlag(15, "BLOCKED_BY_PLAYER", "Object that's blocked by a player", true) CollisionFlag.ANIMAL = registerFlag(16, "ANIMAL", "An animal", true) CollisionFlag.ANIMAL_POSITIONING = registerFlag(17, "ANIMAL_POSITIONING", "An object where animals can walk on", true) CollisionFlag.AI_DRIVABLE = registerFlag(18, "AI_DRIVABLE", "AI can drive over this node", true) CollisionFlag.GROUND_TIP_BLOCKING = registerFlag(19, "GROUND_TIP_BLOCKING", "Bit to block the ground tipping at this position", true) CollisionFlag.TRIGGER_PLAYER = registerFlag(20, "TRIGGER_PLAYER", "A trigger for players", true) CollisionFlag.TRIGGER_VEHICLE = registerFlag(21, "TRIGGER_VEHICLE", "A trigger for vehicles!", true) CollisionFlag.TRIGGER_DYNAMIC_OBJECT = registerFlag(24, "TRIGGER_DYNAMIC_OBJECT", "A dynamic object", true) CollisionFlag.TRIGGER_TRAFFIC_VEHICLE_BLOCKING = registerFlag(25, "TRIGGER_TRAFFIC_VEHICLE_BLOCKING", "A trigger that blocks the traffic vehicles", true) CollisionFlag.TRIGGER_FORK = registerFlag(27, "TRIGGER_FORK", "A trigger for fork object mounting", true) CollisionFlag.TRIGGER_ANIMAL = registerFlag(28, "TRIGGER_ANIMAL", "A trigger for animals", true) CollisionFlag.FILLABLE = registerFlag(30, "FILLABLE", "A fillable node. Used in trailers and unload triggers", true) CollisionFlag.WATER = registerFlag(31, "WATER", "Collision of the water plane", true)
Re: Dynamic Objects
Forgot to add the joint settings can be set up in Blender before exporting in the Attributes tab of the Giants I3D Exporter (Blender Exporter Plugins v9.0.1 gdn.giants-software.com/downloads.php)
6 posts
Page 1 of 1