Community Forum

Create and animate joints

Forum Overview >> Editor

CategoryEditor
Created01.12.2010 07:03


Thorsten Müller (Unknown) 01.12.2010 07:06
Hi,

how can i add joints in Giants Editor 4.1.7 and animate them in the engine (e.g. like trailers connected at a tractor in LS 2011)?
Do you have a small example?

Thanks
Thorsten

Stefan Geiger - GIANTS Software 01.12.2010 11:01
The GIANTS Engine supports two types of joints. Joints that are created in the script, and joints that are stored in the i3d file.

The vehicles are connected using joints created in the script. You can find the code to do this in the vehicle.lua of LS11 here:
http://ls-mods.de/scriptDocumentation.php?lua_file=vehicles/Vehicle

The code which connects the components starts at line 343.


Joints stored in the i3d are e.g. used for the scarecrow in the map i3d.
There you have a dynamic object, a transform group as a child, with the joint attribute, and then another dynamic objects as the child of this transform group.

Currently you can not set the joint attribute in the editor. But you can create the layout and then manually edit the attribute in a text editor.

Thorsten Müller (Unknown) 01.12.2010 13:47
Hi Stefan,

Thank you for your information.

Bye
Thorsten

Gh Portefait (Unknown) 05.05.2013 17:01
Very interesting, however let s imagine I have joints in my scripts :
<components count="4">
<component1 centerOfMass="0 0 0" solverIterationCount="10" />
<component2 centerOfMass="0 0 0" solverIterationCount="10" />
<component3 centerOfMass="0 -0.06584 0" solverIterationCount="90" />
<component4 centerOfMass="0 -0.36 -0.031" solverIterationCount="90" />
<joint component1="1" component2="0" index="1>" rotLimit="0 180 0" transLimit="0 0 0" />
<joint component1="2" component2="1" index="2>" rotLimit="20 0 0" transLimit="0 0 0" />
<joint component1="3" component2="2" index="3>" rotLimit="60 0 60" transLimit="0 0 0" />
</components>

based on the content of my i3D file.

Now Want I want to do is :
add joints between the second and the last joint,
to build like a cable made of small rigid bodies connected ( as we do not have have acess to soft bodies (like in http://www.youtube.com/watch?v=lDd3RO64Opo))

So for the questions :
+Is it possible to programmatically alter a "skeleton" through scripting ?
+my rigid body to add is contained in a i3D file with the right flags (i guess;) aka rigid body / dynamic / compound /collission

Many thanks


Gh Portefait (Unknown) 29.05.2013 08:42
An other question to Mr Geiger :
You wrote : "The vehicles are connected using joints created in the script"

But is it possible to build a vehicle i3D file where the skeleton is built in the i3D
like in the physics example of the SDK where all the parts of the skeleton are in the same hierarchy.


Sven2157 (Unknown) 29.05.2013 16:06
Yes. You need to make your model in your 3D editor( Maya, Max, Blender, etc, etc ), animate it, then EXPORT it using the appropriate plugin for your program. The plugin will create the i3d file for you.

You can then IMPORT that into the Giants Editor.

Hope that helps! ;-)


Note: Log in to post. Create a new account here.