Springs in 0.9

Mavab

17-08-2007 23:45:33

Hi,

I'm trying to use springs in nxOgre 0.9 but I can't seem to figure it out.

From the source it seems that its not been implemented yet as it does not let you pass variables into the joint descriptor for the spring component, unlike 0.6.

So I tried to add that functionaity to the joint classes by changing the spring component (that is the spring/target/damper variables) and setting the flag for enabling springs. This however does not have any spring-like effect to the joint.

Any ideas what I am missing? I've been going through the 0.6 source code like crazy trying to figure out what I've missed.

Thanks!

betajaen

18-08-2007 00:15:39

It's probably not in yet. But Joints will be added soon - real soon.

Aiursrage2k

18-08-2007 01:52:43

Probablly you are using a joint that does not support spring. It is best to use the 6DOF joint because they support all of it, set it to emulate the various joints -- Lesson 215 shows how to set them.

Joint Motors, Springs, and Special Limits
Joint motors are a very robust and stable way to simulate motorized joints, such as the wheels of a car or the joints of a robot. You can either control the maximum force output of the motor to reach a certain speed, or set this force to a large number and control the speed that is to be maintained. The monster truck demo uses revolute joint motors to drive all four wheels.

The following are joints with motor support:

6 DOF Joint
Revolute Joint
Pulley Joint

Joint springs are similar to joint motors. You can set up a spring and a damper constant that resists the motion applied to the joint's degrees of freedom.

The following are joints with spring support:

6 DOF Joint

Spherical Joint
Revolute Joint
Distance Joint

Finally, custom angular limits may be defined for the joints below, which are much easier to use than the generic limits described in previous sections:

6 DOF Joint
Spherical Joint
Revolute Joint



All the joints you have learned so far are special cases of the Six Degree of Freedom Joint. Not only can you use this joint to simulate any of the other joints, you can also reconfigure it to a different type of joint on the fly. That is, you don't need to destroy it as one type and recreate it as another. In this lesson, we will create a demo where you can toggle the joint through three types: fixed, revolute, and spherical.

A final word on this joint: only some of the joints we have used thusfar have springs, motors, and naturally limits attached to them, namely, the revolute and the spherical joints. The 6DOF Joint has motors, springs, and limits defined on each degree of freedom. With this sort of flexibility, you can create motors to power ragdolls, creating a character that can be physically driven by an animation. That is, you never make the parts kinematic, they stay dynamic and you drive them to their animation keyframes with motors on the joints.

Mavab

19-08-2007 00:23:35

Cool, will check that out.

Its not particularly important in my current work but I was curious coming from a 0.6 background.

Thanks :D