[osg-users] OSG with Haptics

Matt Sutton Matt.Sutton at padtinc.com
Mon Jul 14 08:16:53 PDT 2008

Hi Adrian,

  Thank you for the ideas.  Yes, it is the Phantom 6DOF device.  I'm
skeptical as well that we'll be able to maintain 1000Hz.  One other
option I'm looking at is a voxel based approach where I use Google's
sparsehash code to implement the voxel storage.  It has its own set of
limitations on resolution in particular, but has the one nice feature of
being more or less constant complexity for a lookup vs a tree
implementation. You just hash on 3D points and use a force field
function that is stored in each voxel that is populated, otherwise force
= 0.  Resolution and static objects that aren't always static become
challenging, however.

Thanks again,



From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Adrian
Egli OpenSceneGraph (3D)
Sent: Monday, July 14, 2008 12:41 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] OSG with Haptics


Hi Matt, 

i implemented once an haptic based application. most of the models are
about 1M triangles, and no device can handle such numbre of tries. but
finally the app runs at 150Hz :-). so you can never get faster than
1000Hz for big scene. ok i guess you are using the phantom device, and
the vendor says: it's running at 1000Hz,... you have to update the
triangles for each frame, or you pass the whole scene to the device,
right. if you have to update you can not pass it with 1000Hz as the
device can render it. but no worries, the device can only render 1000Hz
with in an optimal case, and we never have this case in our apps. how
did i achieve +100Hz with such big scenes, i implemented an kdTree to
store the triangles, and then i culled them against a sphere. so since
OSG has kdTree support (since past week) may you can implement a
polytopIntersector, or just for a sphere. the sphere radius is the max
distance the device can move between one frame :-) the faster you render
the smaller the radius become, faster again ,... you see, quite

so implement the polytop intersection, add a sphere or a box or ... it
would be greate if you could share the code. :-) new node kit or ... 

what kind of driver you will support ? 


2008/7/14 Matt Sutton <Matt.Sutton at padtinc.com>:


Hi Folks,
  I'm brand new to osg, so I wanted to get some feedback from more
experienced users regarding a tactic I am considering for a haptic
application I am developing.  Haptics are 3d force feedback devices.
One of the challenges with them is that they require update speeds at
approximately 1000Hz.  The model that I will be working with is
approximately 1,000,000 triangles, so collision detection is challenging
at these rates.  The tactic I am considering in a nut shell is to use a
second scene graph for haptic culling purposes.  I want to create an
artificial viewing frustum near the haptic probe so I can cull away
triangles that cannot come into contact with the probe.  I would then
use the haptic rendering software with this smaller subset of triangles.
The cull doesn't need to process at 1000Hz, but rather needs to maintain
a window around the probe such that the "visible" triangles include all
that can potentially contact the probe while the probe is moving and
before the next cull frame.  Does this sound reasonable?  If so, what
form should I use for my haptic scene graph?  That is, does the cull
work best with a series of nodes representing smaller patches of the
geometry?  Are there any issues, beyond the extra book-keeping with two
separate scene graphs in a single application?  Is there any benefit in
maintaining two separate graphs, or would alternate traversals of a
master graph be sufficient?  Sorry if these are too elementary.  Please
feel free to point me to a piece of documentation if I am missing
Thanks for any help.
Matt Sutton

osg-users mailing list
osg-users at lists.openscenegraph.org

Adrian Egli 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080714/a4fd3eb1/attachment-0003.htm>

More information about the osg-users mailing list