Re: [osg-users] Collision detection using osgBullets

2013-11-18 Thread Paul Martz
Jan's advice is sound.

For use with Bullet and osgBullet, ideally each Geode (or maybe Geometry)
should be a convex object. If so, osgBullet can be used to create a Bullet
compound shape for the entire model, consisting of sub-shapes that are all
simple convex shapes.

Bullet does not support concave collision shapes, to my knowledge. But you
can emulate a concave shape by creating a compound shape consisting of
convex sub-shapes.

You mentioned cow.osg. Just FYI, the osgBullet examples that use that model
create a btConvexHull collision shape, I think -- that is a convex mesh of
triangles around the model. But, as Jan said, triangle meshes are very
slow. The parameterized convex shapes (sphere, box, cylinder) are much more
efficient.

What you might want to do with cow.osg is create a convex shape for each of
its parts (four cylinders for the legs, a larger cylinder for the torso,
etc.). But you would have to model this manually. osgBullet can't do this
automatically because all of the cow.osg geometry is inside a single
Geometry object. Bullet contains a convex decomposition implementation, but
the algorithm has limitations.



On Mon, Nov 18, 2013 at 6:27 AM, Jan Ciger  wrote:

>
>
> On Mon, Nov 18, 2013 at 12:34 PM, Mots G  wrote:
>
>> Thank you Paul and Jan for the explanations!
>>
>>
> You are welcome. BTW, that stuff is also in the Bullet's documentation
> *wink* :)
>
>
>
>> On digging further, I came across a post 
>> (here),
>> which suggested that collision between two "Trimesh:
>> btBvhTriangleMeshShape" does not work with the default dispatcher. It
>> suggests the use of gimpact algorithm and create
>> 'btGImpactConvexDecompositionShape' collision shapes for the osg-geode.
>>
>> I am yet to figure out the correct way to generate a
>> 'btGImpactConvexDecompositionShape' shape for an osg-geode.
>>
>
> Ah yes, this I remember as well. If you can, try to avoid using arbitrary
> meshes for collision testing, because it is slow. Unless you absolutely
> need the accuracy, try to use a bounding volume(s) for it instead - i.e.
> you have one mesh for display and another, simpler one, for collision
> testing. Replacing the complicated non-convex object with a one or more
> spheres, boxes or cylinders does wonders for performance and it is a lot
> simpler than doing the convex decomposition.
>
> Regards,
>
> Jan
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
Paul Martz
Skew Matrix Software LLC
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision detection using osgBullets

2013-11-18 Thread Jan Ciger
On Mon, Nov 18, 2013 at 12:34 PM, Mots G  wrote:

> Thank you Paul and Jan for the explanations!
>
>
You are welcome. BTW, that stuff is also in the Bullet's documentation
*wink* :)



> On digging further, I came across a post 
> (here),
> which suggested that collision between two "Trimesh:
> btBvhTriangleMeshShape" does not work with the default dispatcher. It
> suggests the use of gimpact algorithm and create
> 'btGImpactConvexDecompositionShape' collision shapes for the osg-geode.
>
> I am yet to figure out the correct way to generate a
> 'btGImpactConvexDecompositionShape' shape for an osg-geode.
>

Ah yes, this I remember as well. If you can, try to avoid using arbitrary
meshes for collision testing, because it is slow. Unless you absolutely
need the accuracy, try to use a bounding volume(s) for it instead - i.e.
you have one mesh for display and another, simpler one, for collision
testing. Replacing the complicated non-convex object with a one or more
spheres, boxes or cylinders does wonders for performance and it is a lot
simpler than doing the convex decomposition.

Regards,

Jan
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision detection using osgBullets

2013-11-18 Thread Mots G
Thank you Paul and Jan for the explanations!

I have checked the collision example that comes with the osgBullet library.
I was trying to modify the same example to get collision between two
osg-models.

I first modified the  CF_KINEMATIC_OBJECT box by an osg mode (Cow.osgt).
Collision worked fine with precision between the CF_STATIC_OBJECT Box-geode
and the CF_KINEMATIC_OBJECT cow model.

I then changed the other CF_STATIC_OBJECT box by another osg model
(cessna.osgt) and the collision completely stopped working.

On digging further, I came across a post
(here),
which suggested that collision between two "Trimesh:
btBvhTriangleMeshShape" does not work with the default dispatcher. It
suggests the use of gimpact algorithm and create
'btGImpactConvexDecompositionShape' collision shapes for the osg-geode.

I am yet to figure out the correct way to generate a
'btGImpactConvexDecompositionShape' shape for an osg-geode.

I hope I'm on the right track :)

Regards,
Mots



On Mon, Nov 18, 2013 at 5:41 AM, Jan Ciger  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hello,
>
> On 11/17/2013 06:42 PM, Mots G wrote:
> > Hi Paul, I'm confused between static and dynamic objects. Does
> > dynamic object mean the rigid body dynamic object and the dynamic
> > world? I thought dynamic objects were only needed if I had to get
> > inertia and motion states properties to the objects. In my case I
> > only need to test if the 3D models collide among themselves so
> > their movement(translations etc) could be restricted.
>
> These the classes objects Bullet is using:
>
> Static = never moves, doesn't get any collision response (think
> landscape or buildings), but other objects hitting it get collisions.
>
> Dynamic = both moves and gets collision response (i.e. bounces off
> when hit), typically most of your mobile objects.
>
> Kinematic = moves but doesn't get any collision response (it is not
> affected by impacts from other objects), but still will participate in
> the collision testing (can push away other objects, for example).
> Typically used for things that the user is manipulating. This is in
> order for the physics engine to not "freak out" because the object is
> moving differently than the physics expects it to.
>
> The reason for this type of division is optimization - e.g. two static
> objects never move, thus can never collide with each other and Bullet
> doesn't need to calculate such collision. Collision testing can be
> very expensive, that's why this optimization is there - to minimize
> the amount of calculation to be done.
>
> If you are getting a static-static collision, that either means that
> you haven't set the object type correctly for your moving objects or
> that you have two static objects overlapping - typically something
> like one piece of static decor (e.g. a building) overlapping another
> one (or even the ground!).
>
> >
> > Therefore I was under the impression only the collision library
> > (osgbCollision) would suffice my purpose. However I'm still missing
> > on something and unable to get it work.
>
> Bullet doesn't work like that. Even if you are using only the
> collision tests and not driving your objects using the physics
> simulation, you still must set up the object types correctly.
> Otherwise the collision engine will optimize the tests out or even
> fail with an error.
>
> In your case you must set the objects that you are moving as dynamic
> (perhaps kinematic) for the collisions to work. They cannot be all static.
>
> Regards,
>
> Jan
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.14 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iD8DBQFSiTgIn11XseNj94gRAixBAJ9PdzxAypWx4GU4x60gEmeXh27gSwCfZJEL
> Mefjrx+3c/ub8uxJeoxB7+8=
> =hH53
> -END PGP SIGNATURE-
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision detection using osgBullets

2013-11-17 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

On 11/17/2013 06:42 PM, Mots G wrote:
> Hi Paul, I'm confused between static and dynamic objects. Does
> dynamic object mean the rigid body dynamic object and the dynamic
> world? I thought dynamic objects were only needed if I had to get
> inertia and motion states properties to the objects. In my case I
> only need to test if the 3D models collide among themselves so
> their movement(translations etc) could be restricted.

These the classes objects Bullet is using:

Static = never moves, doesn't get any collision response (think
landscape or buildings), but other objects hitting it get collisions.

Dynamic = both moves and gets collision response (i.e. bounces off
when hit), typically most of your mobile objects.

Kinematic = moves but doesn't get any collision response (it is not
affected by impacts from other objects), but still will participate in
the collision testing (can push away other objects, for example).
Typically used for things that the user is manipulating. This is in
order for the physics engine to not "freak out" because the object is
moving differently than the physics expects it to.

The reason for this type of division is optimization - e.g. two static
objects never move, thus can never collide with each other and Bullet
doesn't need to calculate such collision. Collision testing can be
very expensive, that's why this optimization is there - to minimize
the amount of calculation to be done.

If you are getting a static-static collision, that either means that
you haven't set the object type correctly for your moving objects or
that you have two static objects overlapping - typically something
like one piece of static decor (e.g. a building) overlapping another
one (or even the ground!).

> 
> Therefore I was under the impression only the collision library 
> (osgbCollision) would suffice my purpose. However I'm still missing
> on something and unable to get it work.

Bullet doesn't work like that. Even if you are using only the
collision tests and not driving your objects using the physics
simulation, you still must set up the object types correctly.
Otherwise the collision engine will optimize the tests out or even
fail with an error.

In your case you must set the objects that you are moving as dynamic
(perhaps kinematic) for the collisions to work. They cannot be all static.

Regards,

Jan

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iD8DBQFSiTgIn11XseNj94gRAixBAJ9PdzxAypWx4GU4x60gEmeXh27gSwCfZJEL
Mefjrx+3c/ub8uxJeoxB7+8=
=hH53
-END PGP SIGNATURE-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision detection using osgBullets

2013-11-17 Thread Paul Martz
There is an example called "collision" that comes with osgBullet. Take a
look at the two objects that are created. The box on the left is created
with CF_STATIC_OBJECT because it never moves. The box on the right is
created with CF_KINEMATIC_OBJECT, and can be moved with ctrl-leftmouse.
When you drag the kinematic object into the static object, the collision
information is displayed on the console.

I hope this helps.


On Sun, Nov 17, 2013 at 10:42 AM, Mots G  wrote:

> Hi Paul,
> I'm confused between static and dynamic objects. Does dynamic object mean
> the rigid body dynamic object and the dynamic world? I thought dynamic
> objects were only needed if I had to get inertia and motion states
> properties to the objects. In my case I only need to test if the 3D models
> collide among themselves so their movement(translations etc) could be
> restricted.
>
> Therefore I was under the impression only the collision library
> (osgbCollision) would suffice my purpose. However I'm still missing on
> something and unable to get it work.
>
> Thanks
> Mots
>
>
> On Fri, Nov 15, 2013 at 12:32 AM, Paul Martz  wrote:
>
>> My guess is that you've somehow created the collision shapes as static
>> instead of dynamic. Bullet uses the static classification for objects that
>> never move. If you have two objects that never move, Bullet will assume
>> they never collide.
>>
>> Although I've done quite a bit of work in the past with Bullet and
>> osgBullet, I would not consider myself a Bullet expert. This is really just
>> a guess. Since the warning comes from Bullet, the Bullet forum might be a
>> better place. osgBullet also has its own discussion group.
>>
>>
>> On Thu, Nov 14, 2013 at 7:56 AM, Mots G  wrote:
>>
>>> Hi all,
>>> I'm trying to use osgBullets in my application for collision detection.
>>> The library comes with a sample example for detection between two
>>> box-geodes.
>>> I've modified it to use a cessna and a cow model and obtained a
>>> 'btCollisionObject' by calling:
>>>
>>> *osgbCollision::btCompoundShapeFromOSGGeodes(cess_model,COMPOUND_SHAPE_PROXYTYPE
>>> )*
>>>
>>> However, the collision detection does not happen and I'm unable to
>>> figure out what's going wrong.
>>> I also get a warning "warning btCollisionDispatcher::needsCollision:
>>> static-static collision".
>>>
>>> Sorry for the noob question but I'm trying to get this feature in my app
>>> and using the bullet/osgBullet library for the first time. Also I'm not
>>> sure if this question belongs here or to another forum.
>>> Inconvenience regretted.
>>>
>>> Best regards,
>>> Mots
>>>
>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>>
>>
>>
>> --
>> Paul Martz
>> Skew Matrix Software LLC
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
Paul Martz
Skew Matrix Software LLC
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision detection using osgBullets

2013-11-17 Thread Mots G
Hi Paul,
I'm confused between static and dynamic objects. Does dynamic object mean
the rigid body dynamic object and the dynamic world? I thought dynamic
objects were only needed if I had to get inertia and motion states
properties to the objects. In my case I only need to test if the 3D models
collide among themselves so their movement(translations etc) could be
restricted.

Therefore I was under the impression only the collision library
(osgbCollision) would suffice my purpose. However I'm still missing on
something and unable to get it work.

Thanks
Mots


On Fri, Nov 15, 2013 at 12:32 AM, Paul Martz  wrote:

> My guess is that you've somehow created the collision shapes as static
> instead of dynamic. Bullet uses the static classification for objects that
> never move. If you have two objects that never move, Bullet will assume
> they never collide.
>
> Although I've done quite a bit of work in the past with Bullet and
> osgBullet, I would not consider myself a Bullet expert. This is really just
> a guess. Since the warning comes from Bullet, the Bullet forum might be a
> better place. osgBullet also has its own discussion group.
>
>
> On Thu, Nov 14, 2013 at 7:56 AM, Mots G  wrote:
>
>> Hi all,
>> I'm trying to use osgBullets in my application for collision detection.
>> The library comes with a sample example for detection between two
>> box-geodes.
>> I've modified it to use a cessna and a cow model and obtained a
>> 'btCollisionObject' by calling:
>>
>> *osgbCollision::btCompoundShapeFromOSGGeodes(cess_model,COMPOUND_SHAPE_PROXYTYPE
>> )*
>>
>> However, the collision detection does not happen and I'm unable to figure
>> out what's going wrong.
>> I also get a warning "warning btCollisionDispatcher::needsCollision:
>> static-static collision".
>>
>> Sorry for the noob question but I'm trying to get this feature in my app
>> and using the bullet/osgBullet library for the first time. Also I'm not
>> sure if this question belongs here or to another forum.
>> Inconvenience regretted.
>>
>> Best regards,
>> Mots
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
>
> --
> Paul Martz
> Skew Matrix Software LLC
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision detection using osgBullets

2013-11-14 Thread Paul Martz
My guess is that you've somehow created the collision shapes as static
instead of dynamic. Bullet uses the static classification for objects that
never move. If you have two objects that never move, Bullet will assume
they never collide.

Although I've done quite a bit of work in the past with Bullet and
osgBullet, I would not consider myself a Bullet expert. This is really just
a guess. Since the warning comes from Bullet, the Bullet forum might be a
better place. osgBullet also has its own discussion group.


On Thu, Nov 14, 2013 at 7:56 AM, Mots G  wrote:

> Hi all,
> I'm trying to use osgBullets in my application for collision detection.
> The library comes with a sample example for detection between two
> box-geodes.
> I've modified it to use a cessna and a cow model and obtained a
> 'btCollisionObject' by calling:
>
> *osgbCollision::btCompoundShapeFromOSGGeodes(cess_model,COMPOUND_SHAPE_PROXYTYPE
> )*
>
> However, the collision detection does not happen and I'm unable to figure
> out what's going wrong.
> I also get a warning "warning btCollisionDispatcher::needsCollision:
> static-static collision".
>
> Sorry for the noob question but I'm trying to get this feature in my app
> and using the bullet/osgBullet library for the first time. Also I'm not
> sure if this question belongs here or to another forum.
> Inconvenience regretted.
>
> Best regards,
> Mots
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
Paul Martz
Skew Matrix Software LLC
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection in OSG 1.2

2013-03-25 Thread Paul Martz
You didn't really provide much detail on how the code is failing, so we can
really only hazard a few wild guesses.

One potential problem area is that the osg::BoundingBox is axis-aligned. As
a result, rotating a BB just a few degrees will subtend a much larger area
than the unrotated box.

As Robert suggests, it might be better to transform the world location of
the eye into the local coordinate space of your ship node BB. To do this,
transform the eye by the ship node's world-to-local matrix. If OSG v1.2
doesn't give you direct access to that matrix, then simply take the inverse
of the getWorldMatrix() you're already using.


On Mon, Mar 25, 2013 at 9:34 AM, Robert Osfield wrote:

> Hi Todd,
>
> OSG-1.2 oh boy, that be a little out of date know.  You have my
> sympathies.  Being stuck on OSG-1.2 will limit the communities ability
> to help a bit as most will be on 3.x or later 2.x series releases.  On
> the positive side the core scene graph in OSG-1.2 is pretty similar to
> that in OSG-3.x, the really big differences are in the viewer and
> extensions to the core OSG.
>
> In terms of collision detection, the OSG even these days doesn't
> directly provide collision detection.  in OSG-1.2 there is only view
> frustum culling and line intersection testing available.  You can use
> the bounding volume classes osg::BoundingSphere (attached to Node) and
> osg::BoundBox (attached to Drawable/Geometry) that you can do tests
> with, and an osg::Polytope class that is used for view frustum culling
> that could potentially be reused.
>
> With all these different tools the key is getting point/line/volume
> tests in the same coordinate frames, usually this is done by
> transforming a world point into a local coordinate frame, or
> visa-versa.  Traverses like the PickVisitor and CullVisitor do the
> accumulation of transforms through the scene graph so have a look at
> how they are managed.  My guess is you will probably want to create
> your own custom visitor to do something similar.
>
> Robert.
>
> On 12 March 2013 05:08, Todd Baniak  wrote:
> > Hello all,
> >
> > Unfortunately my organization has made the decision to stick with OSG
> 1.2.  At this point it is not an option to upgrade, so the question
> pertains to how to solve a particular problem in 1.2.  I am a newbie to OSG
> and 3D in general, so please be patient with me!
> >
> > I have a window that displays a scene.  The scene is comprised of a
> series of Nodes, one of which I'll call a Ship Node.  All of the Nodes
> (including the Ship Node) are added to a single Root Node, which is then
> added to the SceneView.
> >
> > I believe I have successfully created a BoundingBox around this Ship
> Node.  What I'm trying to do is detect when the camera eye point intersects
> with this BoundingBox.
> >
> > The camera can move in and out (using setViewMatrixAsLookAt and changing
> the eye parameter).  I also have the ability to rotate up, down, left, and
> right.  This is done by applying the rotations to the Root Node.
> >
> > I have tried to obtain the world coordinates of the Ship Node at any
> given time via getBound() * getWorldMatrix()[0].  The camera eye point
> seems far more difficult.  No matter what I do, I can't get the camera to
> intersect with the BoundingBox properly.  Is the eye considered part of the
> 'world'?  And if so, does it need to be translated to world coordinates to
> make this work?
> >
> > I suspect I am going about this problem completely wrong.  I can post
> snippets of code if necessary.  Any ideas?
> >
> > Thank you for your time,
> >
> > Todd
> >
> > --
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=53046#53046
> >
> >
> >
> >
> >
> > ___
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Paul Martz
Skew Matrix Software LLC
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection in OSG 1.2

2013-03-25 Thread Robert Osfield
Hi Todd,

OSG-1.2 oh boy, that be a little out of date know.  You have my
sympathies.  Being stuck on OSG-1.2 will limit the communities ability
to help a bit as most will be on 3.x or later 2.x series releases.  On
the positive side the core scene graph in OSG-1.2 is pretty similar to
that in OSG-3.x, the really big differences are in the viewer and
extensions to the core OSG.

In terms of collision detection, the OSG even these days doesn't
directly provide collision detection.  in OSG-1.2 there is only view
frustum culling and line intersection testing available.  You can use
the bounding volume classes osg::BoundingSphere (attached to Node) and
osg::BoundBox (attached to Drawable/Geometry) that you can do tests
with, and an osg::Polytope class that is used for view frustum culling
that could potentially be reused.

With all these different tools the key is getting point/line/volume
tests in the same coordinate frames, usually this is done by
transforming a world point into a local coordinate frame, or
visa-versa.  Traverses like the PickVisitor and CullVisitor do the
accumulation of transforms through the scene graph so have a look at
how they are managed.  My guess is you will probably want to create
your own custom visitor to do something similar.

Robert.

On 12 March 2013 05:08, Todd Baniak  wrote:
> Hello all,
>
> Unfortunately my organization has made the decision to stick with OSG 1.2.  
> At this point it is not an option to upgrade, so the question pertains to how 
> to solve a particular problem in 1.2.  I am a newbie to OSG and 3D in 
> general, so please be patient with me!
>
> I have a window that displays a scene.  The scene is comprised of a series of 
> Nodes, one of which I'll call a Ship Node.  All of the Nodes (including the 
> Ship Node) are added to a single Root Node, which is then added to the 
> SceneView.
>
> I believe I have successfully created a BoundingBox around this Ship Node.  
> What I'm trying to do is detect when the camera eye point intersects with 
> this BoundingBox.
>
> The camera can move in and out (using setViewMatrixAsLookAt and changing the 
> eye parameter).  I also have the ability to rotate up, down, left, and right. 
>  This is done by applying the rotations to the Root Node.
>
> I have tried to obtain the world coordinates of the Ship Node at any given 
> time via getBound() * getWorldMatrix()[0].  The camera eye point seems far 
> more difficult.  No matter what I do, I can't get the camera to intersect 
> with the BoundingBox properly.  Is the eye considered part of the 'world'?  
> And if so, does it need to be translated to world coordinates to make this 
> work?
>
> I suspect I am going about this problem completely wrong.  I can post 
> snippets of code if necessary.  Any ideas?
>
> Thank you for your time,
>
> Todd
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=53046#53046
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection and getting intersection point between two object

2011-03-17 Thread Paul Martz

On 3/17/2011 12:36 AM, manish Choudhary wrote:

2.Does OsgBullet give me list of intersection point where two object node meet ?


osgBullet per se doesn't provide anything like this. The Bullet API already 
provides one or more contact points when two collision shapes meet. You'd have 
to study the Bullet API to determine if this meets your requirements, but it 
sounds like what you want.

   -Paul
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection and getting intersection point between two object

2011-03-17 Thread Kim Bale
>
> 1.Can OsgBullet integrate with my current application ?


I don't know about the specifics of your application but I for one am using
osgBullet in it's current form to compute collisions in several of my
programs.

2.Does OsgBullet give me list of intersection point where two object node
> meet ?


Yes.

Regards,

Kim.


On 17 March 2011 06:36, manish Choudhary  wrote:

> Hi,
>
> I really want to use Bullet library but before proceeding forward I have
> some question so that I don't  face problem in future :-
>
> 1.Can OsgBullet integrate with my current application ?
> 2.Does OsgBullet give me list of intersection point where two object node
> meet ?
>
> I need Intersection point for generating  texture coordinate of composite
> model(by joining two basic model), then Parameterization of Triangulated
> Surface Meshes(Composite model) and then  texture mapping .
>
> I have never use bullet engine so please help me .
>
> ...
>
> Thank you!
>
> Cheers,
> manish
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=37673#37673
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection and getting intersection point between two object

2011-03-16 Thread manish Choudhary
Hi,
 
I really want to use Bullet library but before proceeding forward I have some 
question so that I don't  face problem in future :- 

1.Can OsgBullet integrate with my current application ?
2.Does OsgBullet give me list of intersection point where two object node meet 
? 

I need Intersection point for generating  texture coordinate of composite 
model(by joining two basic model), then Parameterization of Triangulated 
Surface Meshes(Composite model) and then  texture mapping .

I have never use bullet engine so please help me . 

... 

Thank you!

Cheers,
manish

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37673#37673





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection and getting intersection point between two object

2011-03-16 Thread Paul Martz

On 3/16/2011 1:18 PM, Kim Bale wrote:

Try osgBullet: http://code.google.com/p/osgbullet/

I'm using it for collisions.


FYI The posted osgBullet roadmap is no longer valid. I am planning to do some 
significant work on this project later in the year, including breaking out the 
dependency on the collision and dynamics libraries so that osgBullet can be used 
for collision-only. This should be done by the end of the year (sorry -- lots of 
other work in the queue ahead of this).

   -Paul

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection and getting intersection point between two object

2011-03-16 Thread Kim Bale
Try osgBullet: http://code.google.com/p/osgbullet/

I'm using it for collisions.

Regards,

Kim.


2011/3/16 Sergey Polischuk 

> Hi,
>
> Osg dont have this features, you should use another libraries for this
> (like physics simulation libraries).
>
> Cheers,
> Sergey.
>
> 16.03.2011, 13:36, "manish Choudhary" :
> > Hi,
> > I'm working on problem in which user develop composite  shape like
> building , hut , table etc. by arranging basic shape like
> cylinder,cube,hemisphere etc.
> > using picking operation.
> > Right now basic shape overlap each other , which is not required in my
> application . Therefore I need collision technique to avoid these overlap .
> >
> > I also need corresponding set of intersection point where two object
> intersect during collision.
> >
> > So here are my questions :
> > 1. How to perform collision in OSG ? any tutorial
> > 2. How to get Intersection point where two object meet ?
> >
> > Can somebody please help me regarding this
> > ...
> >
> > Thank you!
> >
> > Cheers,
> > manish
> >
> > --
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=37640#37640
> >
> > ___
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection and getting intersection point between two object

2011-03-16 Thread Sergey Polischuk
Hi,

Osg dont have this features, you should use another libraries for this (like 
physics simulation libraries).

Cheers,
Sergey.

16.03.2011, 13:36, "manish Choudhary" :
> Hi,
> I'm working on problem in which user develop composite  shape like building , 
> hut , table etc. by arranging basic shape like cylinder,cube,hemisphere etc.
> using picking operation.
> Right now basic shape overlap each other , which is not required in my 
> application . Therefore I need collision technique to avoid these overlap .
>
> I also need corresponding set of intersection point where two object 
> intersect during collision.
>
> So here are my questions :
> 1. How to perform collision in OSG ? any tutorial
> 2. How to get Intersection point where two object meet ?
>
> Can somebody please help me regarding this
> ...
>
> Thank you!
>
> Cheers,
> manish
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=37640#37640
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection

2010-05-06 Thread John Galt
Hi,

Is there any example that demonstrates how to use osgUtil for doing this?

I caught some of the ideas of osgUtil in the quick start guide (pg 103) but 
lost my way at 


> osgUtil::PolytopeIntersector* picker =
> new osgUtil::PolytopeIntersector(
> osgUtil::Intersector::PROJECTION,
> x-w, y-h, x+w, y+h );
> 


What exactly does the Intersector::PROJECTION try to achieve? How do I get the 
osgUtil functions to relate to the pyramid geometry?

Thank you!

Cheers,
John

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27639#27639





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection

2010-05-06 Thread Paul Martz

John Galt wrote:

Hi Paul,

I only plan on detecting intersections between a PATNode and other Nodes. 

I do not intend to write code for a "reaction to a collision", I want the intersection to happen and only want to know which objects are intersecting. 


Do you suggest I still use osgbullet for that?


If you're just doing intersection testing, then you should look at using 
osgUtil's facilities for that. You could transform your pyramid using the local 
to world matrix and use the result to configure a polytope intersector.


--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection

2010-05-06 Thread John Galt
Hi Paul,

I only plan on detecting intersections between a PATNode and other Nodes. 

I do not intend to write code for a "reaction to a collision", I want the 
intersection to happen and only want to know which objects are intersecting. 

Do you suggest I still use osgbullet for that?

Thank you!

Cheers,
John

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27633#27633





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection

2010-05-06 Thread Paul Martz

John Galt wrote:

Hi,

I am trying to implement a code that detects collision between a PAT Node with 
the geometry of a pyramid and multiple other fixed Nodes that are loaded with 
ac3d models.

How do you determine which node (if any) falls within the geometry of the PAT Node of the pyramid? 


I would use a library designed for collision detection (and rigid body dynamics) 
such as Bullet. I maintain a toolkit for Bullet and OSG apps: 
osgbullet.googlecode.com.


--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection

2010-03-31 Thread ted morris
On Thu, Mar 18, 2010 at 12:56 PM, Jason Daly  wrote:

> ted morris wrote:
>
>>
>> yeah, looked through that one a while ago. I was hoping there will be an
>> "osgpolytopeintersection" demo out there with
>> some of these ideas.
>>
>
> I think the OSG Quick Start Guide uses a PolytopeIntersector to demonstrate
> picking.  Not exactly what you're trying to do, but it at least shows how to
> set up the intersector.  That's the only other example I know of.
>
>
> --"J"
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>

yeah, maybe if I can assign planes on each side of the cars as a
PolytopeIntsersector ... I guess one will never have
the 'perfect example' available. :)

thanks!
t
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection

2010-03-18 Thread Jason Daly

ted morris wrote:


yeah, looked through that one a while ago. I was hoping there will be 
an "osgpolytopeintersection" demo out there with

some of these ideas.


I think the OSG Quick Start Guide uses a PolytopeIntersector to 
demonstrate picking.  Not exactly what you're trying to do, but it at 
least shows how to set up the intersector.  That's the only other 
example I know of.


--"J"

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection

2010-03-17 Thread ted morris
yeah, looked through that one a while ago. I was hoping there will be an
"osgpolytopeintersection" demo out there with
some of these ideas.

thanks,
ted


On Mon, Mar 15, 2010 at 11:12 AM, Jason Daly  wrote:

> ted morris wrote:
>
>>
>> I have been looking for an example of using this utility
>> PolytopeIntersector to intersect say, a bounding box, of a more complex
>> object,
>> with another set of objects in the scene. Are there any example snippets
>> out there how to go about this?
>>
>> An example might be wanting to know if a moving car (surrounded by
>> bounding box) hit a cone or channelizer drum (e.g., "cylinder").
>>
>
> Closest thing would be the osgintersection example.  It doesn't use the
> PolytopeIntersector, but it might get you started.
>
>
> --"J"
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection

2010-03-15 Thread Jason Daly

ted morris wrote:


I have been looking for an example of using this utility 
PolytopeIntersector to intersect say, a bounding box, of a more 
complex object,
with another set of objects in the scene. Are there any example 
snippets out there how to go about this?


An example might be wanting to know if a moving car (surrounded by 
bounding box) hit a cone or channelizer drum (e.g., "cylinder").


Closest thing would be the osgintersection example.  It doesn't use the 
PolytopeIntersector, but it might get you started.


--"J"

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection

2010-03-13 Thread ted morris
I have been looking for an example of using this utility PolytopeIntersector
to intersect say, a bounding box, of a more complex object,
with another set of objects in the scene. Are there any example snippets out
there how to go about this?

An example might be wanting to know if a moving car (surrounded by bounding
box) hit a cone or channelizer drum (e.g., "cylinder").

thanks all,
Ted

On Fri, Mar 5, 2010 at 11:10 AM, Jason Daly  wrote:

> John Galt wrote:
>
>> Hi,
>>
>> I have a noob question.
>>
>> Say I have a pyramid defined by points 0,1,2,3,4. And say I have another
>> cube determined by points 5,6,7,8,9,10,11,12.
>>
>> How do I detect whether the entire cube falls inside the pyramid or not?
>>
>> What if the cube is very small and can be defined by a single point 13.
>> Can I find out if the point 13 falls within the pyramid with a simple osg
>> command?
>>
>>
>
> I think you should be able to do this with a PolytopeIntersector.  Just add
> each face of the pyramid as a plane in the Polytope, and intersect it
> against the cube.
> The nice thing about the PolytopeIntersector is that it will work with
> points and lines as well as faces, so it should work for your second case.
>
> --"J"
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection

2010-03-05 Thread Jason Daly

John Galt wrote:

Hi,

I have a noob question.

Say I have a pyramid defined by points 0,1,2,3,4. And say I have another cube 
determined by points 5,6,7,8,9,10,11,12.

How do I detect whether the entire cube falls inside the pyramid or not?

What if the cube is very small and can be defined by a single point 13. Can I 
find out if the point 13 falls within the pyramid with a simple osg command?
  


I think you should be able to do this with a PolytopeIntersector.  Just 
add each face of the pyramid as a plane in the Polytope, and intersect 
it against the cube. 

The nice thing about the PolytopeIntersector is that it will work with 
points and lines as well as faces, so it should work for your second case.


--"J"

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision detection engines with OSG

2008-06-29 Thread Janusz
Hi: There are a couple of examples in the tutorial section on the osg 
website.


Rgds, Janusz

Carlos Sanches pisze:

Hi !
Anybody have some example of OSG with any collision engine (bullet, 
newton or ODE)??

Asimple example will be welcome .
thanks !


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision detection and Distance measuring in OSG

2008-05-08 Thread Gino van den Bergen
SOLID 3.5 (www.dtecta.com) offers distance computation between arbitrary
objects (polygon meshes, quadrics, boxes, etc). I offer SOLID 3.5 under
GPL/QPL terms. I have no plans for integrating SOLID 3.5 into OSG, so you'll
have to do it yourself. But I guess that should not be too hard. You might
need to create a separate pass through a NodeVisitor to get all the world
transforms for the collision objects into SOLID. I can give you some limited
support by answering your questions. Please e-mail me directly through:

 gino "at" dtecta "dot" com

Cheers,

Gino

2008/5/6 Brian R Hill <[EMAIL PROTECTED]>:

> Henry,
>
> You are probably on your own with this, unless someone else has integrated
> those specific libraries in their OSG application. I haven't looked into
> them because of their license.
>
> Good luck.
>
> Brian
>
> [EMAIL PROTECTED] wrote: -
>
>
> To: OpenSceneGraph Users 
> From: "Mrs. Mister" <[EMAIL PROTECTED]>
> Sent by: [EMAIL PROTECTED]
> Date: 05/06/2008 10:39AM
>  Subject: Re: [osg-users] Collision detection and Distance measuring in
> OSG
>
> hello again,
>
> thx Brian, i looked at those but they dont have distance
> measuring.
>
> i found something that supports collision and distance measuring:
> http://www.cs.unc.edu/~geom/SSV/
>
> i intgerated it, but dont know if i made this good.
> i can check for collision of tri-meshes and get minimum distance
> and distance tolerance querys.
>
> if anyone want to look at the code and help with my integration issues
> just write a mail - i think its good basis, but im not long programming
> in osg.
>
> byebye
> henry
>
> Brian R Hill wrote:
> > There are many collision detection libraries out there. Licensing and
> > difficulty of integration are the big issues.
> > google collision detection
> > http://www.cs.unc.edu/~geom/collide/
> > http://www.win.tue.nl/~gino/solid/
> >
> > Brian
> >
> > [EMAIL PROTECTED] wrote: -
> >
> >
> > To: OpenSceneGraph Users 
> > From: "Mrs. Mister" <[EMAIL PROTECTED]>
> > Sent by: [EMAIL PROTECTED]
> > Date: 05/06/2008 06:08AM
> > Subject: Re: [osg-users] Collision detection and Distance measuring in
> OSG
> >
> > hello again,
> >
> > thx for answering, but i need geometry to geometry collision detection
> > and minimal distance computation. do you know any library which can
> > handle that?
> >
> > bye
> > henry
> >
> > Gordon Tomlinson wrote:
> >>  You don't really need a another library to workout the distance between
> > 2
> >> geodes or points
> >> It's a straight forward calculation.
> >>
> >> Simple get the positions of the geometries center or collision points
> >>
> >> distance =  sqrt( square( start[0] - end[0] ) + square( start[1] - end
> > [1] )
> >> + square( start[2] - end[2] ) );
> >>
> >>
> >> Depending on the collision detection you want, simple isector collions
> > works
> >> and is quite fast and provide in OSG
> >> See the exmaple for various different methods
> >>
> >> Now if you want geometry to geometry collison detection then you will
> > need
> >> to handle that either your self or through some 3rd party code
> >>
> >>
> >>
> >>
> >> -Original Message-
> >> From: [EMAIL PROTECTED]
> >> [mailto:[EMAIL PROTECTED] On Behalf Of Mrs.
> > Mister
> >> Sent: Monday, May 05, 2008 12:23 PM
> >> To: osg-users@lists.openscenegraph.org
> >> Subject: [osg-users] Collision detection and Distance measuring in OSG
> >>
> >> hello,
> >>
> >> i want to do collision detection and distance measurung in osg between
> >> geodes. can someone advise me to a library which has been prooved with
> > osg.
> >> so that i can start up working.
> >>
> >> i just tried SWIFT++ (http://www.cs.unc.edu/~geom/SWIFT++/) which can
> > handle
> >> distances. but the source is very old and a "make" doesnt compile
> without
> >> own chnages of the swift++ source. it compiles, but the program
> segfaults
> > in
> >> the swift library.
> >>
> >> now im stuck.
> >>
> >> i did:
> >> tesselate geodes and get a array of vertices of triangles. this i fed
> > into
> >> the collision/distance library to use their functions.
> >>
> >> maybe someone has an idea.
> >>
> >> bye
> >> 

Re: [osg-users] Collision detection and Distance measuring in OSG

2008-05-06 Thread Brian R Hill
Henry,

You are probably on your own with this, unless someone else has integrated
those specific libraries in their OSG application. I haven't looked into
them because of their license.

Good luck.

Brian

[EMAIL PROTECTED] wrote: -


To: OpenSceneGraph Users 
From: "Mrs. Mister" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
Date: 05/06/2008 10:39AM
Subject: Re: [osg-users] Collision detection and Distance measuring in OSG

hello again,

thx Brian, i looked at those but they dont have distance
measuring.

i found something that supports collision and distance measuring:
http://www.cs.unc.edu/~geom/SSV/

i intgerated it, but dont know if i made this good.
i can check for collision of tri-meshes and get minimum distance
and distance tolerance querys.

if anyone want to look at the code and help with my integration issues
just write a mail - i think its good basis, but im not long programming
in osg.

byebye
henry

Brian R Hill wrote:
> There are many collision detection libraries out there. Licensing and
> difficulty of integration are the big issues.
> google collision detection
> http://www.cs.unc.edu/~geom/collide/
> http://www.win.tue.nl/~gino/solid/
>
> Brian
>
> [EMAIL PROTECTED] wrote: -
>
>
> To: OpenSceneGraph Users 
> From: "Mrs. Mister" <[EMAIL PROTECTED]>
> Sent by: [EMAIL PROTECTED]
> Date: 05/06/2008 06:08AM
> Subject: Re: [osg-users] Collision detection and Distance measuring in
OSG
>
> hello again,
>
> thx for answering, but i need geometry to geometry collision detection
> and minimal distance computation. do you know any library which can
> handle that?
>
> bye
> henry
>
> Gordon Tomlinson wrote:
>>  You don't really need a another library to workout the distance between
> 2
>> geodes or points
>> It's a straight forward calculation.
>>
>> Simple get the positions of the geometries center or collision points
>>
>> distance =  sqrt( square( start[0] - end[0] ) + square( start[1] - end
> [1] )
>> + square( start[2] - end[2] ) );
>>
>>
>> Depending on the collision detection you want, simple isector collions
> works
>> and is quite fast and provide in OSG
>> See the exmaple for various different methods
>>
>> Now if you want geometry to geometry collison detection then you will
> need
>> to handle that either your self or through some 3rd party code
>>
>>
>>
>>
>> -Original Message-
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Mrs.
> Mister
>> Sent: Monday, May 05, 2008 12:23 PM
>> To: osg-users@lists.openscenegraph.org
>> Subject: [osg-users] Collision detection and Distance measuring in OSG
>>
>> hello,
>>
>> i want to do collision detection and distance measurung in osg between
>> geodes. can someone advise me to a library which has been prooved with
> osg.
>> so that i can start up working.
>>
>> i just tried SWIFT++ (http://www.cs.unc.edu/~geom/SWIFT++/) which can
> handle
>> distances. but the source is very old and a "make" doesnt compile
without
>> own chnages of the swift++ source. it compiles, but the program
segfaults
> in
>> the swift library.
>>
>> now im stuck.
>>
>> i did:
>> tesselate geodes and get a array of vertices of triangles. this i fed
> into
>> the collision/distance library to use their functions.
>>
>> maybe someone has an idea.
>>
>> bye
>> henry
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

>
> This is a PRIVATE message. If you are not the intended recipient, please
> delete without copying and kindly advise us by e-mail of the mistake in
> delivery. NOTE: Regardless of content, this e-mail shall not operate to
> bind CSC to any order or other contract unless pursuant to explicit
written
> agreement or government initiative expressly permitting the use of e-mail
> for such purpose.

Re: [osg-users] Collision detection and Distance measuring in OSG

2008-05-06 Thread Mrs. Mister

hello again,

thx Brian, i looked at those but they dont have distance
measuring.

i found something that supports collision and distance measuring:
http://www.cs.unc.edu/~geom/SSV/

i intgerated it, but dont know if i made this good.
i can check for collision of tri-meshes and get minimum distance
and distance tolerance querys.

if anyone want to look at the code and help with my integration issues
just write a mail - i think its good basis, but im not long programming
in osg.

byebye
henry

Brian R Hill wrote:

There are many collision detection libraries out there. Licensing and
difficulty of integration are the big issues.
google collision detection
http://www.cs.unc.edu/~geom/collide/
http://www.win.tue.nl/~gino/solid/

Brian

[EMAIL PROTECTED] wrote: -


To: OpenSceneGraph Users 
From: "Mrs. Mister" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
Date: 05/06/2008 06:08AM
Subject: Re: [osg-users] Collision detection and Distance measuring in OSG

hello again,

thx for answering, but i need geometry to geometry collision detection
and minimal distance computation. do you know any library which can
handle that?

bye
henry

Gordon Tomlinson wrote:

 You don't really need a another library to workout the distance between

2

geodes or points
It's a straight forward calculation.

Simple get the positions of the geometries center or collision points

distance =  sqrt( square( start[0] - end[0] ) + square( start[1] - end

[1] )

+ square( start[2] - end[2] ) );


Depending on the collision detection you want, simple isector collions

works

and is quite fast and provide in OSG
See the exmaple for various different methods

Now if you want geometry to geometry collison detection then you will

need

to handle that either your self or through some 3rd party code




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mrs.

Mister

Sent: Monday, May 05, 2008 12:23 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Collision detection and Distance measuring in OSG

hello,

i want to do collision detection and distance measurung in osg between
geodes. can someone advise me to a library which has been prooved with

osg.

so that i can start up working.

i just tried SWIFT++ (http://www.cs.unc.edu/~geom/SWIFT++/) which can

handle

distances. but the source is very old and a "make" doesnt compile without
own chnages of the swift++ source. it compiles, but the program segfaults

in

the swift library.

now im stuck.

i did:
tesselate geodes and get a array of vertices of triangles. this i fed

into

the collision/distance library to use their functions.

maybe someone has an idea.

bye
henry
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision detection and Distance measuring in OSG

2008-05-06 Thread Brian R Hill
There are many collision detection libraries out there. Licensing and
difficulty of integration are the big issues.
google collision detection
http://www.cs.unc.edu/~geom/collide/
http://www.win.tue.nl/~gino/solid/

Brian

[EMAIL PROTECTED] wrote: -


To: OpenSceneGraph Users 
From: "Mrs. Mister" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
Date: 05/06/2008 06:08AM
Subject: Re: [osg-users] Collision detection and Distance measuring in OSG

hello again,

thx for answering, but i need geometry to geometry collision detection
and minimal distance computation. do you know any library which can
handle that?

bye
henry

Gordon Tomlinson wrote:
>  You don't really need a another library to workout the distance between
2
> geodes or points
> It's a straight forward calculation.
>
> Simple get the positions of the geometries center or collision points
>
> distance =  sqrt( square( start[0] - end[0] ) + square( start[1] - end
[1] )
> + square( start[2] - end[2] ) );
>
>
> Depending on the collision detection you want, simple isector collions
works
> and is quite fast and provide in OSG
> See the exmaple for various different methods
>
> Now if you want geometry to geometry collison detection then you will
need
> to handle that either your self or through some 3rd party code
>
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Mrs.
Mister
> Sent: Monday, May 05, 2008 12:23 PM
> To: osg-users@lists.openscenegraph.org
> Subject: [osg-users] Collision detection and Distance measuring in OSG
>
> hello,
>
> i want to do collision detection and distance measurung in osg between
> geodes. can someone advise me to a library which has been prooved with
osg.
> so that i can start up working.
>
> i just tried SWIFT++ (http://www.cs.unc.edu/~geom/SWIFT++/) which can
handle
> distances. but the source is very old and a "make" doesnt compile without
> own chnages of the swift++ source. it compiles, but the program segfaults
in
> the swift library.
>
> now im stuck.
>
> i did:
> tesselate geodes and get a array of vertices of triangles. this i fed
into
> the collision/distance library to use their functions.
>
> maybe someone has an idea.
>
> bye
> henry
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision detection and Distance measuring in OSG

2008-05-06 Thread Mrs. Mister

hello again,

thx for answering, but i need geometry to geometry collision detection
and minimal distance computation. do you know any library which can
handle that?

bye
henry

Gordon Tomlinson wrote:

 You don't really need a another library to workout the distance between 2
geodes or points
It's a straight forward calculation. 


Simple get the positions of the geometries center or collision points

distance =  sqrt( square( start[0] - end[0] ) + square( start[1] - end[1] )
+ square( start[2] - end[2] ) );


Depending on the collision detection you want, simple isector collions works
and is quite fast and provide in OSG
See the exmaple for various different methods

Now if you want geometry to geometry collison detection then you will need
to handle that either your self or through some 3rd party code




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mrs. Mister
Sent: Monday, May 05, 2008 12:23 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Collision detection and Distance measuring in OSG

hello,

i want to do collision detection and distance measurung in osg between
geodes. can someone advise me to a library which has been prooved with osg.
so that i can start up working.

i just tried SWIFT++ (http://www.cs.unc.edu/~geom/SWIFT++/) which can handle
distances. but the source is very old and a "make" doesnt compile without
own chnages of the swift++ source. it compiles, but the program segfaults in
the swift library.

now im stuck.

i did:
tesselate geodes and get a array of vertices of triangles. this i fed into
the collision/distance library to use their functions.

maybe someone has an idea.

bye
henry
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision detection and Distance measuring in OSG

2008-05-05 Thread Gordon Tomlinson
 You don't really need a another library to workout the distance between 2
geodes or points
It's a straight forward calculation. 

Simple get the positions of the geometries center or collision points

distance =  sqrt( square( start[0] - end[0] ) + square( start[1] - end[1] )
+ square( start[2] - end[2] ) );


Depending on the collision detection you want, simple isector collions works
and is quite fast and provide in OSG
See the exmaple for various different methods

Now if you want geometry to geometry collison detection then you will need
to handle that either your self or through some 3rd party code




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mrs. Mister
Sent: Monday, May 05, 2008 12:23 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Collision detection and Distance measuring in OSG

hello,

i want to do collision detection and distance measurung in osg between
geodes. can someone advise me to a library which has been prooved with osg.
so that i can start up working.

i just tried SWIFT++ (http://www.cs.unc.edu/~geom/SWIFT++/) which can handle
distances. but the source is very old and a "make" doesnt compile without
own chnages of the swift++ source. it compiles, but the program segfaults in
the swift library.

now im stuck.

i did:
tesselate geodes and get a array of vertices of triangles. this i fed into
the collision/distance library to use their functions.

maybe someone has an idea.

bye
henry
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision Detection

2008-01-29 Thread Robert Osfield
Hi Ahmed,

The OSG does not have a inbuilt collision detection system.

There is support for doing intersection using the
osgUtil::IntersectionVisitor coupled with osgUtil::*Intersector
implementation.  The PolytopeIntersection is probably the closest to
what you require.  You'd need to create a polytope around your first
object and then visit the scene graph using the IntersectionVisitor to
find all the intersections.

Robert.

On Jan 29, 2008 7:55 AM, Ahmed Nawar <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> How i can test the Collision Detection between two nodes (x - y).
> But these two nodes move by moving there parent (Deferent parents).
>  Every parent has a lot of sub nodes.
> So I can not use the "BoundingSphere" of the parent.
> And when i use the "BoundingSphere" of the nodes (x - y).
>  They (x - y) don't see the movement.
>
> Thanks,
> Ahmed Nawar
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision detection

2007-09-20 Thread Anders Backman
That depends what you mean by Collision Detection.

The only functionality in this area is, checking for overlapping bounding
volumes and ray/scene intersection.

If you need to extract intersectionpoints, normals, penetration depth
between any two given geometries/meshes, then osg is not what you need.
Look at Bullet, ODE, OPCODE, GIMPACT which are examples of libraries doing
just that (and more).

/Anders

On 9/19/07, Zach Deedler <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> Has anybody used OSG to do collision detection?  Is it efficient for doing
> it?  I'm not looking for details; just if it works well or not.
>
> Thanks.
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 



Anders Backman   Email:[EMAIL PROTECTED]
HPC2N/VRlab  Phone:+46 (0)90-786 9936
Umea university  Cellular: +46 (0)70-392 64 67
S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
   http://www.cs.umu.se/~andersb
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collision detection

2007-08-21 Thread Alberto Luaces
El Lunes 20 Agosto 2007, Dave Pugmire escribió:
> I'm looking for a geode collision detection. I don't see one in OSG. Or
> am I missing it?

I am afraid it doesn't exist due to the graphical only nature of OSG. However, 
OSG still offers some very useful tools when dealing with the objects, as 
model loading. That is what I am currently doing in my project through the 
use of the Nodevisitor and TriangleFunctor classes.

> I have used the one from UNC in the past. It takes a polygon soup and
> detects collisions. Is there a very fast way to grab a list of triangles
> from a geode? Or is it best to grab it once, cache it, and then run the
> tri-list through the geode position matrix on each frame?

Cache or extract the geometry at start would be the best since it allows to 
build data structures that will speed up your collision tests at runtime 
(AABB trees and so on).

Alberto
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org