Latest  | Search | Go
Edit this page   |   Attach file 

  Home | Tutorials | Technical Reference | Runtime | API Documentation | JointsEditor  


Joints Editor

Author:Mostafa Mohamed

Introduction

The Joints Editor is on of the new Reality physics editing tools, it will enable you to visually edit all types of Novodex joints in Reality Builder, and you can setup doors, chains, vehicles and any scenario with jointed rigid bodies.

A simple Revolute joint example

Now we will create a simple revolute joint connecting 2 actors:

Stop the physics simulation

First thing before using the physics editors stop the simulation by clicking "Novodex Simulation Started" button on the toolbar, stopping the simulation resets the simulation to the intial transformation of actors that they will start with in game.

Enable physics visualization

Press Ctrl + P on your keyboard or go to View -> Visualize Physics menu button to enable extra physics visualization that will help you through your editing process.

Add two Rigid Boxes

From the Reality Builder actors list insert to Rigid Boxes and position them as shown in the picture:
After adding the 2 Rigid Boxes select the upper one and from the properties grid change the Kinematic property to true, Kinematic actors are not affected with different type of forces even gravity and they appear to have infinite mass.

Add a Revolute Joint

A Revolute joint is the type of joint that enables the rotation of the 2 connected actors along one axis, An example for a revolute joint is a door hinge.

To add the joint in reality builder go to Joints -> Revolute menu button, this will add a red sphere captioned with "Revolute joint" and a toolbar will appear on the top - right of the Reality Builder main form.

Connect the two boxes with the joint

Click the "Actor 1" button in your joint toolbar and select the first Rigid Box, you will notice that a blue bounding box appears when you hover over the rigid box, this implies that the actor is joints editor ready, to make your actor ready for joints editor override the "GetNxActor" function found in MActor class this function must return the novodex actor connected to this MActor so the editor can connect it to the joint. Repeat the same steps by clicking "Actor 2" button and select the other box.

your scene should look now like this:

Set the joint global axis

Now you want to set the joints' global axis that the rotation will be permitted on:
  1. From the property grid change the High_Value property to 1, the limit value is angle beyond which the limit is active.
  2. Change the mode of the transformation gizmo to rotation from the main toolbar.
  3. rotate the joint until it looks like the one on the following picture.

Start the simulation again.

Click the "Novodex Simulation" button again and your simulation will run.

Information about various novodex joints

Spherical Joint

A sphere joint is the simplest kind of joint. It constrains two points on two different bodies to coincide. This point, specified in world space (this guarantees that the points coincide to start with) is the only parameter that has to be specified. An example for a common spherical joint is a person’s shoulder. Of course it is quite limited in its range of motion. (See limits below.) DOFs removed: 3 DOFs remaining: 3

Revolute Joint

A revolute joint removes all but a single rotational degree of freedom from two objects. The axis along which the two bodies may rotate is specified with a point and a direction vector. The point along the direction should not matter in theory, but it should be preferably close to the area where the bodies contact. An example for a revolute joint is a door hinge. DOFs removed: 5 DOFs remaining: 1

Cylindrical Joint

A cylindrical joint permits relative translational movement between two bodies along a single axis, and also relative rotation along that axis. An example for a cylindrical joint is a telescopic radio antenna. DOFs removed: 4 DOFs remaining: 2

Prismatic Joint

A prismatic joint permits relative translational movement between two bodies along an axis, but no relative rotational movement at all. An example for a prismatic joint is a pair of motorcycle shock absorbers. DOFs removed: 5 DOFs remaining: 1

Point On Line Joint

A point on line joint constrains a point on one actor to only move along a line attached to another. The starting point of the point is defined as the anchor point. The line through this point is specified by its direction (axis) vector. An example for such a joint is a curtain hanger widget. DOFs removed: 2 DOFs remaining: 4

Point In Plane Joint

A point in plane joint constrains a point on one actor to only move inside a plane attached to another. The starting point of the point is defined as the anchor point. Its normal vector specifies the plane through this point. An example is a magnet on a refrigerator. DOFs removed: 1 DOFs remaining: 5

Fixed Joint

The fixed joint effectively glues two bodies together with no remaining degrees of freedom for relative motion. It is useful to set it to be breakable to simulate simple fracture effects.

Distance Joint

The distance joint tries to maintain a certain minimum distance, maximum distance, or both, between two points on two actors. It can also be set to be springy, so it behaves like a rubber band.

Pulley Joint

The pulley joint simulates a rope that can be thrown across a pulley. In this way its similar to the distance joint (the length of the rope is the distance) but the rope doesn’t connect the two bodies along the shortest path, but rather it leads from the connection point on one actor to the pulley point (fixed in world space) and then to the other actor.

6-Degree-of-Freedom Configurable Joint

Not supported yet.

For more information about joints and their behaviors refer to Novodex SDK documentation: http://www.ageia.com/pdf/NovodeX%20Physics%20SDK%20Documentation.pdf

Any questions contact me at mostafa@artificialstudios.com.

Attachment sort Action Size Date Who Comment
axis.JPG manage 38.6 K 17 Mar 2005 - 03:36 Main.guest  
boxes.JPG manage 18.2 K 17 Mar 2005 - 03:32 Main.guest  
StartStop.JPG manage 0.9 K 17 Mar 2005 - 03:32 Main.guest  
toolbar.JPG manage 4.1 K 17 Mar 2005 - 03:33 Main.guest  
scene.JPG manage 9.9 K 17 Mar 2005 - 03:34 Main.guest  

JointsEditor   Edit | Attach | Ref-By | Printable | Diffs | r1.1 | More