Lucio Tommaso De Paolis, Giovanni Aloisio
Department of Innovation Engineering, Salento University, Lecce, Italy & SPACI Consortium, Italy
Marco Pulimeno
SPACI Consortium, Italy
Keywords: Computer Game, Force Feedback, Simulation, Virtual Reality.
Abstract: Performance improvements in graphics hardware and the diffusion of the low cost haptic interfaces have
made it possible to visualize complex virtual environments and provided opportunities to interact with these
in a more realistic way. In this paper a Virtual Reality application of a game of billiards is presented. By
means of a commercial haptic interface a force feedback is provided, thus rendering the interaction realistic
and exciting to the user; the introduction of the force feedback allows the user to actually feel the contact
between cue and ball. The virtual environment has been built using the development environment XVR and
rigid body dynamics have been simulated utilizing the ODE library. Since in the real game it is possible to
use the left hand when aiming and striking the ball, in the play modality it is possible to fix the cue
movement in the desired direction in order to allow a more careful aim and a more stable interaction in the
virtual environment. In addition it is possible to choose the force with which the ball is hit.
The field of computer entertainment technology has
aroused a great deal of interest recently among
researchers and developers in both academic and
industrial fields as it is recognized as showing
promise in terms of generating exciting new forms
of human computer interaction.
Techniques used in computer entertainment are
also seen to translate into advances in research work
ranging from industrial training, collaborative work,
novel interfaces, novel multimedia, network
computing and ubiquitous computing.
At the same time, performance improvements
in graphics hardware and the diffusion of the low
cost haptic interfaces have made the visualization of
complex virtual environments possible and provided
us with the opportunity to interact with these in a
more realistic way.
Haptic feedback in virtual environments makes
it possible to increase the overall realism of a
simulation by improving the user experience.
Haptic interfaces in virtual environments have
been intensively studied in the past decade. Different
types of haptic interface are used in virtual games
which provide multimodal feedback creating a
deeper sense of being in control of the game, of
Players like to get some bodily feedback, be it
vibration, movement or other. Vibration is a
practical and important way of providing users with
haptic feedback. It requires a minimal interface
design and is low both in terms of complexity and
cost. Vibration feedback joysticks are widely used
input devices in current games.
Lindeman and al. investigated how vibro-tactile
feedback improves task performance (Lindeman,
Sibert, Mendez, Patil and Phifer, 2005).
Walters described the technical background of
haptics and games and shows the first steps of
integrating haptics in PC based games. He concludes
by stating that the force feedback devices are now
readily available to consumers looking for good
force response in their games (Walters, 1997).
Haptic Battle Pong is a pong clone with haptic
Tommaso De Paolis L., Aloisio G. and Pulimeno M. (2008).
In Proceedings of the Third International Conference on Computer Graphics Theory and Applications, pages 450-455
DOI: 10.5220/0001097804500455
control through the SensAble Phantom device. Force
feedback is used to haptically render the contact
between the ball and the paddle. Although it
provides force to the user it does not allow free
bodily action because of the device’s restrictions
(Morris and Joshi, 2004).
Jiang et al. modified Half-Life and added force
and vibration feedback. Their aim was to find out
the effectiveness of feedback in a virtual reality
training environment. The study concluded that
haptic feedback plays an important role as it reduced
the error rates of the players (Jiang, Girotra,
Cutkosky and Ullrich, 2005).
Snibbe et al. described a set of techniques for
manipulating digital media with force feedback
(Snibbe, MacLean, Shaw, Roderick, Verplank and
Scheef, 2001).
Hayward et al. provided an introduction to
haptic interfaces and a summary of devices
(Hayward, Astley, Cruz-Hernandez and Grant,
Robles-De-La-Torre, 2004).
Salisbury et al. provided a survey of some
haptic systems and discussed some haptic rendering
algorithms (Salisbury, Conti and Barbagli, 2004).
Some virtual simulations of a billiards game
have been developed with and without the force
feedback sensation.
Gourishankar presented the HAPSTICK, a high
fidelity haptic simulation of billiards game. The
system incorporates a low cost interface designed
and constructed for the haptic simulation of the
billiards game; the device allows motion in three
degrees of freedom (two rotations: pitch and yaw,
and one translation) with haptic feedback along the
translation. The game also includes an auditory
feedback (Gourishanker, 2006).
Takamura et al. presented a billiards game
simulation and the method used in this research
contributes to build a game with high reality. The
synchronization among visual, auditory and haptic
sensations are attained by SCRAME Net, a fast
network system (Takamura, Abe, Tanaka, Taki and
He, 2006).
Ciger et al. presented a virtual billiard where
ODE has been used to manage the collisions
between the billiard balls and the table; for the
collisions between the cue and any ball an own
collision detector has been created. No force
feedback is provided to the user (Ciger and Yersin,
2.1 Phantom Omni Haptic Interface
The haptic interface used in this simulation is the
PHANTOM Omni of SensAble Technologies, Inc.;
the device offers 6 degrees of freedom output
capabilities. The device specifications are reported
in Table 1.
Table 1: Specifications of Phantom Omni Haptic Interface.
Nominal Position
~0.055 mm
Workspace > 160 w x 120 h x 70 d mm
Friction < 0.26 N
Maximum Exactable
3.3 N
Continuous Exactable
> 0.88 N
X axis > 1.26 N/ mm
Y axis > 2.31 N/mm
Z axis > 1.02 N/mm
(apparent mass at tip)
~ 45 g
Footprint ~ 168 w x 203 d mm
Weight ~1.47 kg
Force Feedback 3 degrees of freedom (x, y, z)
Position Sensing x, y, z (digital encoders)
pitch, roll, yaw (± 5%
linearity potentiometers)
FireWire port
2.2 eXtreme Virtual Reality (XVR)
XVR is an integrated development environment for
the rapid development of Virtual Reality
applications. Using a modular architecture and a
VR-oriented scripting language, XVR content can be
embedded in a variety of container applications
making it suitable for writing content ranging from
web-oriented presentations to more complex VR
The execution environment, the web browser
plug-in and the virtual machine for this system have
been developed by PERCRO Laboratory of Scuola
S. Anna in Pisa, Italy and the XVR platform has
been used in many virtual reality projects
(Carrozzino, Tecchia, Bacinelli and Bergamasco,
Originally created for the development of web-
enabled virtual reality applications, XVR has
evolved in recent years into an all-around
technology for interactive applications. Beside
web3D content management, XVR now supports a
wide range of VR devices (such as trackers, 3D
mice, motion capture devices, stereo projection
systems and HMDs) and uses a state-of-the-art
graphics engine for the real-time visualization of
complex three-dimensional models, which is
perfectly adequate even for advanced off-line VR
XVR applications are developed using a
dedicated scripting language whose constructs and
commands are targeted to VR, and provide
developers with the opportunity to deal with 3D
animation, positional sounds effects, audio and
video streaming and user interaction.
In its current form XVR is an ActiveX
component running on various Windows platforms
and can be embedded in several container
applications including the web browser Internet
It is possible to load additional modules which
offer advanced functionalities, such as support to
VR devices, as a decision was made to keep them
separate so that web applications, which do not
usually need any of these advanced features, are not
afflicted by additional downloading times.
2.3 Open Dynamics Engine (ODE)
The Open Dynamics Engine is an open source, high
performance library for simulating rigid body
dynamics. It is a fully featured, stable, mature and
independent platform with an easy to use C/C++
API. It has advanced joint types and integrated
collision detection with friction.
ODE is useful for simulating vehicles, objects
in virtual reality environments and virtual creatures.
It is currently used in many computer games, 3D
authoring tools and simulation tools.
ODE is a free, industrial quality library for
simulating articulated rigid body dynamics. It is
good for simulating ground vehicles, legged
creatures, and moving objects in VR environments.
ODE is designed to be used in interactive or
real-time simulations and is particularly good for
simulating moving objects in changeable virtual
reality environments.
The ODE collision system provides fast
identification of potentially intersecting objects and
a non-penetration constraint is used whenever two
bodies collide; the current collision primitives are
sphere, box, capped cylinder, plane, ray, and
triangular mesh. However, it can be ignored and an
alternative collision detection can be used (Open
Dynamics Engine, http://www.ode.org).
2.4 OpenHaptics
The SensAble OpenHaptics toolkit enables software
developers to add haptics and true 3D navigation to
a broad range of applications, it can be used for
design and for games and entertainment and also for
simulation and visualization.
Using the OpenHaptics toolkit, developers can
leverage the existing OpenGL code for specifying
geometry, and supplement it with OpenHaptics
commands to simulate haptic material properties
such as friction and stiffness.
The architecture enables developers to add
functionality to support new types of shapes and it is
also designed to integrate third-party libraries such
as physics/dynamics and collision detection engines
(SensAble Technologies, http://www.sensable.com).
Figure 1: Loops of the simulation.
The developed application is a simulation of a game
of billiards. To make the game as interactive and
realistic as possible for the user a force feedback is
provided by means of a commercial haptic interface.
In the simulation it is possible to distinguish
three different models: graphical modelling, physical
modelling and haptic modelling.
Each type of modelling can be represented by a
loop executed at a specific frequency; the XVR
application combines all the loops. This is shown in
Figure 1.
GRAPP 2008 - International Conference on Computer Graphics Theory and Applications
3.1 Graphical Modelling
The graphical model consists of a set of 3D objects
modelled using 3D Studio and imported into the
XVR development environment where they are
managed using the XVR scenegraph.
The modelled objects are: the billiard table, the
cue, the billiard balls and the skittles. An example of
billiards with five skittles has been implemented.
XVR provides classes for the lighting, shading
and observation point (virtual camera) management;
in addition it allows the user to superimpose 2D text
onto the scene and this functionality is used in order
to provide the user with messages about the system
conditions, working modality and error states.
Three different working modalities are allowed:
camera modality the ability to choose
the desired position of the virtual camera (no
force feedback is provided);
positioning modality when a force
feedback is provided for the user in order to
allow the correct positioning of the billiard balls
in case of necessity or so as to decide the starting
state of the game.
play modality when the end-effector is
mapped onto the cue and a force feedback is
provided to the user by means of the haptic
Since in the real game it is possible to use the
left hand when aiming and striking the ball, in the
play modality it is possible to fix the cue movement
in the desired direction in order to allow a more
careful aim and a more stable interaction in the
virtual environment. In addition it is possible to
choose the force with which the ball is hit.
A game situation is shown in Figure 2.
3.2 Physical Modelling
Each object of the scenegraph is modelled from the
physical point of view defining the geometry, the
mass, the inertia, the stiffness and the contact
friction with another one.
The physical modelling definition is carried out
using the functions provided by the library of rigid
bodies dynamic simulation (ODE); this library is
also used to define the dynamics for simulating the
billiard game.
The process of simulating a rigid body is called
integration. Each integration step advances the
current time by a given step size, adjusting the state
of all rigid bodies for the new time value.
The ODE integrator is very stable, but not
particularly accurate unless the step size is small.
Between each integrator step the user can call
functions to apply forces to the rigid body and the
sum of these forces will be applied to the body when
the next integrator step happens.
At each simulation step, ODE is used to check
the collisions between objects and to calculate the
forces of interaction and those applied by the user; in
addition the speed, new orientation and positioning
of the objects are computed. In this way the state of
the system is updated and a new one is provided.
Fig. 2: A game situation.
3.3 Haptic Modelling
Regarding the haptic modelling of the objects that
are present in the virtual scene, two different
solutions have been considered:
the utilization of the HapticWeb
library of XVR;
the utilization of the OpenHaptics
library provided with the PHANTOM Omni
haptic device.
The second solution has been chosen in this
application because it permits control at a lower
level of the haptic interface.
The cue is modelled as a rigid body and, in the
play modality, its position and orientation are linked,
using a spring-damper system, to the position and
orientation of the stylus of the haptic interface.
At each step of the simulation the forces
depending on the movement of the stylus are applied
to the cue in order to replicate it as quickly as
possible, while taking care to avoid stylus
displacement. This model is shown in Figure 3.
The user is provided with a force feedback by
means of the haptic interface and calculated
applying the proxy method (Van den Bergen, 2004).
A virtual spring-damper system links the end-
point position of the virtual cue (the proxy) to the
end-effector position of the haptic device. When the
cue is in a free space and no collision occurs, the
Figure: 3: Virtual coupling for the cue movement.
proxy and the end-effector position are the same, but
when the virtual cue collides with an objects in the
virtual scene, the proxy cannot enter the body and
cannot follow the position of the haptic device; so
the positions no longer match and a force is sent to
the user.
The force is calculated using (1), where x is the
distance between the end-effector and the proxy
positions, v is the velocity of the end-effector and k
and b are respectively the spring and the damper
constants (Van den Bergen, 2004).
bvkxF =
The described model is shown in Figure 4.
In this way the forces exercised on the cue by
the colliding objects are sent to the user by means of
the virtual coupling cue-stylus providing the force
feedback due to the impact between the cue and the
other objects.
From the haptic point of view, the scene is
rendered in two different ways: the play modality
and the positioning modality.
Figure 4: Virtual coupling for the force feedback.
In the play modality, the virtual coupling
between the end-effector of the haptic device and the
cue provides the force feedback to be sent to the user
by means of the haptic device. Figure 5 shows a
game phase using the Phantom haptic device.
In the positioning modality, used to allow the
correct positioning of the balls in case of necessity
or to decide the starting state of the game, the balls
in the scene are attracted by the cursor (end-effector
of the haptic device); in this way the selection of the
ball is made very easy.
Figure 5: A game phase.
In this paper a Virtual Reality simulation of the
game of billiards is presented. In order to provide
the user with an interactive and realistic interaction a
force feedback is provided by means of the Phantom
Omni haptic interface.
The virtual environment has been built using
the development environment XVR and the rigid
body dynamics have been simulated utilizing the
ODE library.
The introduction of the force feedback makes it
possible to obtain a realistic simulation as it is
possible to strike the billiard ball and to feel the
contact between cue and ball.
The limitations of the simulation are due to the
use of a commercial haptic device which has not
been specifically designed for the game of billiards.
Because of the limited workspace of the haptic
device used, it is not possible to perform some shots,
which, in the real game, require wide movements in
order to be carried out. In addition, it is not possible
to use your left hand in order to stabilize the cue and
to obtain a more precise strike, as would happen in
GRAPP 2008 - International Conference on Computer Graphics Theory and Applications
the real game of billiards.
For this reason modifications have been made
to the simulation: the possibility to fix a chosen
direction to the cue during the strike has been
introduced and also the ability to decide on the force
with which to hit the billiard ball. In this way we
have tried to reduce to a minimum the limitations
that were present due to the use of a non specific
haptic device.
In the present configuration of the simulator, a
validation phase will be carried out.
In order to have a general opinion on the
project and to obtain an objective response to the
realism of the game simulator, billiard players will
be asked to try the system out. These players will
respond to a questionnaire with questions about the
game’s playability and the visual and haptic
sensations; suggestions that could help improving
the game simulation will be also asked. The results
of this survey will be used to improve the
performance of the simulator.
In order to obtain a more immersive virtual
environment and to create the illusion of a
stereoscopic image, the utilization of a pair of
shutter glasses has been scheduled; these devices are
able to display alternate frame sequencing for each
eye, thus providing stereoscopic vision.
Lindeman R.W., Sibert J.L., Mendez E., Patil S., Phifer
D., 2005. Effectiveness of directional vibrotactile
cuing on a building-clearing task. In Proc CHI 2005,
Session Touch & Such, Portland, Oregon, USA, pp.
Walters C., 1997. Cop a feel....with haptic peripherals,
Morris D., Joshi N., 2004. Haptic battle pong. In Proc
Game Developers Conference, Experimental
Gameplay Workshop.
Jiang L., Girotra R., Cutkosky M. R., Ullrich C., 2005.
Reducing error rates with lowcost haptic feedback in
virtual reality-based training applications. In Proc
worldHAPTICS, Pisa, Italy, pp. 420–425.
Snibbe S., MacLean K., Shaw R., Roderick J., W.
Verplank, Scheef M., 2001. Haptic techniques for
media control. In Proc 14th Annual ACM Symposium
on User Interface Software and Technology (UIST),
Orlando, Florida, USA.
Hayward V., Astley O.R., Cruz-Hernandez M., Grant D.,
Robles-De-La-Torre G., 2004. Haptic interfaces and
devices. In Sensor Review, 24(1), pp. 16–29.
Salisbury K., Conti F., Barbagli F., 2004. Haptic
rendering: Introductory concepts. In IEEE Computer
Graphics and Applications, 24, pp. 24–32.
Gourishanker V., 2006. HapStick - A High Fidelity Haptic
System for Simulation of Billiards. Thesis at the
Virtual Reality Laboratory, University of New York at
Buffalo, Buffalo, MA.
Takamura Y., Abe N., Tanaka K., Taki H. and He S.,
2006. A Virtual Billiard Game with Visual, Auditory
and Haptic Sensation. In International Conference on
E-learning and Games (Edutainment 2006),
Hangzhou, China, pp. 700-705.
Ciger J., Yersin B., 2004. The Virtual Billiard Game.
Virtual Reality Lab at Swiss Federal Institute of
Technology in Lausanne, Switzerland, Available:
Carrozzino M., Tecchia F., Bacinelli S., Bergamasco M.,
2005. Lowering the Development Time of Multimodal
Interactive Application: The Real-life Experience of
the XVR Project. In ACE 2005, Advances in Computer
Entertainment Technology 2005, Valencia, Spain, pp.
Van den Bergen G., 2004. Collision Detection in
Interactive 3D Environments, Elsevier Morgan
Kaufmann Publishers, San Francisco.