Title: CHAI 3D
1CHAI 3D
- EECE 511, Introduction to Virtual Reality
- PPT based on Siggraph 2005 presentation of CHAI3D
2CHAI 3D
- An Open-Source Toolkit for Haptic Rendering
Applications - A useful platform used by many research labs
working on haptics for various purposes
3FEATURES OF CHAI3D
- Open source
- C Open GL based
- Supports most commercially available desktop
devices. - Supports for I/O boards
- Supports for various compilers on various OSs
- Supports for integration of ODE
- Can be used as a
- Low level API to talk to devices
- High level API with visual and haptic rendering
supports
4SUPPORTING HW
- Force dimension Products (Omega,Delta)
- Sensable Products (Phantom, Omni)
- MPB Freedom 6S
- Virtual device
5COMPARISONS OF OPEN HAPTICS
- CHAI 3D
- Open source, transparent structure
- You can modify almost everything
- Support typical scenegraph built-in force
rendering algorithm - The best library for haptic oriented project
- Open Haptics (HDLibrary)
- Device API
- You must make everything except device
communication and scheduler. - Open Haptics (HLLibrary)
- You cannot modify anything
- You can add haptics to your existing OpenGL
program without many modification
6PRELIMINARY HAPTIC RENDERING PIPELINE
7PRELIMINARY COLLISION DETECTION
- To determine whether the interaction tool is in
contact with any virtual object in the database. - Main ideas common to the collision detection
algorithms - Smart data structure (e.g., those using bounding
boxes and spatial partitioning) - Smart transition between global and local search
8PRELIMINARY AXIS ALIGNED BOUNDING BOX (AABB)
9PRELIMINARY VECTOR FIELD METHOD
- Vector field
- Determines response forces directly from
penetrations of the HIP. - 11 mapping of an interior point to the response
force
10PRELIMINARY VIRTUAL PROXY ALGORITHM
- Virtual proxy is an ideal interaction sphere.
- It stays on the surface when the object
penetration occurs. - It locates on the nearest surface from the HIP.
Virtual proxy
HIP
11PRELIMINARY RESPONSE FORCE COMPUTATION
12STRUCTURE OF CHAI 3D
13OVERALL STRUCTURE OF CHAI3D
Object-wiseCollision Detection Algorithm (AABB)
Camera
World
Light
Object (Mesh ForceField)
Object (Mesh ForceField)
Tool(Device)
Tool(Device)
CollisionDetection Algorithm
Object (Mesh ForceField)
Object (Mesh ForceField)
Rendering Algorithm
CollisionDetection Algorithm
14CLASSES GRAPHICS
- Supports multiple scene-graphs
- A scene contains
- A world
- Lights
- Cameras
- Meshes
15CLASSES GRAPHICS
- Objects are inherited from the cGenericObject
class - Transform properties
- Bounding box
- Objects have various graphical features
- Graphic textures
- Vertex colors
- Transparency
- Object also have haptic features
- Stiffness
- Friction properties
16GRAPHICS SCENE GRAPH
17CLASSES DEVICES TOOLS
Tool
- Device classes
- Low-level interfaces to haptic devices
- Start-stop
- Read position/forces
- Command force/pose
- Tools classes
- High-level interfaces to haptically enabled
virtual tools - They are part of the scenegraph
- They call collision detection and force rendering
algorithms to compute forces - They communicate to devices associated with them
Rendering Algorithm
Device
18CLASSES DEVICES TOOLS
- The cPhantomDevicesclass allows you to directly
talk a Phantom device - useful if you already have your own virtual
environment setup and just need to talk to a
device - The cPhantom3dofPointer allows you to have a
three degrees of freedom pointer to poke objects
present in the chai3d scenegraph - useful if you are using chai3d to manage virtual
environment and force rendering algorithms
19EXAMPLE OF USING TOOLS
- Can add a 3dof tool to our scenegraph to touch
the mesh in the system - All collision detection an force rendering calls
are handled transparently
20THE VIRTUAL DEVICE
- Some drawbacks of most haptic devices
- expensive
- not easy to carry around
- very hard to debug
- easy to break
- It allows to
- move a pointer in 3D with a mouse
- visualize forces returned from the chai3d
application
21CLASSES FORCES AND COLLISION DETECTION, FILES
- Force rendering algorithms supported (only 3dof)
- God-object , virtual proxy algorithm with
friction (Zilles 95 , Salisbury 97) - Potential fields
- Collision detection algorithms supported
- line to mesh using AABB trees
- line to mesh using Spheres hierarchies
- File types supported for meshes
- OBJ Alias Wavefront file format
- 3Ds 3d Studio Max file format
22CLASSES TIMERS
- Haptic rendering of stiff surfaces becomes
unstable for low servo rates - Typical rates are 1KHz
- This can be hard under Windows and thus
- most haptic devices have some way to emulate Real
Time behavior - chai3d approach use Windows Multimedia Timers,
accurate up to 1KHz
23A TYPICAL CHAI3D APPLICATION
- Initialization
- Instantiate world, camera, light, objects, tool
- Add everything to world
- Instantiate viewport and timer
- Haptic callback (1kHz)
- Read tool position, compute force, apply tem
- Visual callback (30Hz)
- Render viewport
24A TYPICAL CHAI3D APPLICATION
25A TYPICAL CHAI3D APPLICATION
- Visual callback
- Haptic callback
26LEARNING CHAI3D
- download chai3d from
- http//www.chai3d.org
- build libraries using your favorite compiler
- add the chai3d/bin folder to your path
- look at the examples
- look at Doxygen documentation