The best way to learn about using CHAI 3D is to explore the various examples provided with the framework. Each example is labeled by a unique name and a two digit number that indicates its relative level of complexity. For instance, the foundations of CHAI 3D are mostly covered in examples 01-30, while the more advanced topics including rigid and deformable dynamic |  | simulations are presented in examples 40‘s and higher. Screenshots are illustrated here bellow for each example with a short description of the functionalities they introduce. More detailed information about the technical aspects can be directly found in the source code. |  |
| name: 01 - devices |  |
The best way to learn about using CHAI 3D is to explore the various examples provided with the framework. Each example is labeled by a unique name and a two digit number that indicates its relative level of complexity. For instance, the foundations of CHAI 3D are mostly covered in examples 01-30, while the more advanced topics including rigid and deformable dynamic simulations are presented in examples 40‘s and higher. Screenshots are illustrated here bellow for each example with a short description of the functionalities they introduce. More detailed information about the technical aspects can be directly found in the source code. |  |
| name: 10 - oring |  |
Extending our first example, 10-oring introduces generic object by rendering a virtual torus. (cShapeTorus). The haptic device is interfaced to the simulation via a virtual tool (cGeneric3ofPointer) which computes the interactions between the haptic device and the objects located in the environment. A surface effect is added to the torus to generate a force response when the operator encounters the object with the device. A simple physical behavior is programmed in the Haptics Thread to rotate the torus when external forces are applied onto it. A spherical texture map is used to produce a metallic reflection on the environment. |  |
| name: 11 - effects |  |
This example explores in more depth the possibilities offered by combining various haptic effects together. Surface, viscosity, friction, stick’n slip, and magnetic properties are programmed onto 4 spheres for comparison. This example is a great starting point for understanding how potential fields can be effectively combined together to haptically render different material properties or tactile conditions. |  |
| name: 12 - polygons |  |
Introducing some the of the more advanced techniques in computer haptics, this example demonstrates the finger-proxy force rendering algorithm that is used to compute force interactions between a sphere (proxy) and a virtual mesh object composed of triangles (cMesh). In this program, a simple routine creates a circular fan of individual triangles and defines a color for each of them. This example can easily be extended to build more sophisticated objects. The collision detection between the tool and the object is managed by the collision detector, or more specifically in this example, by an aligned bounding box tree structure (AABB). |  |
| name: 20 - map |  |
From a 2D bitmap image, this example generates a height map by converting each colored pixel into a height value. The height map is then converted into an array of triangles to produce a virtual mesh. The original bitmap image is then clamped onto the surface as a 2D texture. By operating the haptic device and by engaging the user switch, the operator can freely rotate the camera and navigate around the object. By touching the surface of the map and by simultaneously engaging the user switch, the operator can locally modify the topology of the map. A virtual magnetic line is also used to guide the operator along a vertical segment during the modeling process. |  |
| name: 21 - object |  |
To display more complex mesh models, this example demonstrates the use of the mesh file loader which currently supports file formats of types .3ds (3D Studio MAX) and .obj (Alias Wavefront). As a scene may become more complicated with larger objects (populated with more triangles), further computation is required during the collision detection phase which can lead to degraded haptic rendering performance issues. Designing effective collision detectors to handle complex mesh models is a fundamental and challenging task for programming high-quality haptic simulated scenes. CHAI 3D currently supports spherical and aligned bounding box collision detection trees. |  |
| name: 22 - chrome |  |
Very similar to example 21, this application illustrate the use of spherical mapping to create more sophisticated graphical effects. In the Haptics Thread a simple force model is used to slowly re-orientate the virtual face back to its original configuration. Notice the larger diameter of the cursor which can be adjusted to typically model tools of different sizes (radius). The current force rendering model uses Ruspini’s finger-proxy approach (Stanford University). |  |
| name: 23 - tooth |  |
In this example we demonstrate how to command a 3D mesh model of a drill with a haptic device. By enabling the user switch, the operator can translate or rotate the tooth according to the movement of his/her hand. If the haptic device only holds 3 degrees-of-freedom (translation only) then the tool is automatically oriented to remain near perpendicular to the tooth’s surface. This example also demonstrates some of the transparency rendering functionalities offered by the graphics engines. |  |
| name: 24 - turntable |  |
This example explores the combination of sounds and haptics via the audio BASS library. Two meshes are used to model a turntable and a vinyl record which can freely spin around its vertical axis. Stiffness, friction (static and dynamic) and inertia properties can be adjusted to finely tune the haptic feeling when spinning the plate. An mp3 audio soundtrack is loaded and synchronized with the motion of the record player. |  |
| name: 25 - cubic |  |
Similar to the 12-polygon demo, this example projects onto a cube an image texture generated directly from the virtual camera viewport. Friction properties are also enabled to allow the operator to grasp the object to rotate it. This demo can easily be extended to further explore video texturing techniques or other applications that require bitmap editing. |  |
| name: 40 - ODE - cubes |  |
This example illustrates the use of the Open Dynamics Engine (ODE) module included with CHAI 3D. Three cubes are created and physical properties are defined for each of them. All physical interactions are computed by the ODE system within the Haptics Thread. CHAI 3D force rendering models are used to compute the interaction forces between the cursor tool and the objects; the resulting forces are then transferred to the ODE engine to update the dynamic configuration of each object in real time. Gravity can be either enabled or disabled by pressing the respective keyboard commands (see keyboard options in the console). |  |
| name: 41 - ODE - pool |  |
Similar to the previous example, the 41-ODE-pool application models three solid spheres by also binding some texture properties onto each of them. The operator can manipulate and pick each ball individually by simultaneously touching it and enabling the user switch. On each presented ODE demo, four transparent vertical walls are used to contain the objects within the physical workspace of the haptic device. Gravity can be either enabled or disabled by pressing the respective keyboard commands (see keyboard options in the console). |  |
| name: 42 - ODE - mesh |  |
This example introduces some of the more sophisticated features of ODE such as the tri-mesh collision detection where impacts are computed between individual triangles composing the object meshes. Each ODE object can be grasped by simultaneously touching its surface and enabling the user switch of the haptic device. Notice in this example that the two vertical shafts are defined as two ODE objects with their static property enabled. Gravity can be either enabled or disabled by pressing the respective keyboard commands (see keyboard options in the console). |  |
| name: 50 - GEL - membrane |  |
Using the GEL dynamics engine (Stanford University), this example introduces an new approach to simulate the dynamic behavior of complex deformable objects. The GEL model uses a skeleton technique where filling spheres are inserted inside the mesh object and connected together using elastic links to model properties such as mass, inertia, elongation, flexion and torsion. Each vertex (triangles point) composing the mesh is then attached to the nearest sphere or link. As the skeleton deforms, the shape of the mesh is updated at every simulation cycle. |  |
| name: 51 - GEL - cell |  |
An artistic view of a cell. This example further illustrates the concept of real time deformation or a complex structure. By further refining the underlying skeleton models it is possible to create multi-body scenes. Collision detection between different objects can be effectively estimated by computing the collision between their skeletons. |  |
| name: 52 - GEL - ducky |  |
Another example illustrating the use of the GEL framework where a skeleton model of a virtual duck is generated. The water is modeled by using an array of GEL springs and mass nodes with a double layer of semi-transparent texture mapping to create the illusion of translucent waves. Notice the reflection in the water which is created by rendering a mirrored copy the scene; this technique is also used with the ODE demos. |  |
| copyright 2009