Page 2 of 2

Re: beastie - Header only collision detection library for Og

Posted: Fri Jul 16, 2010 9:50 am
by betajaen
kneeride wrote:betajaen you rock!! This is very cool.

I've been reluctant to integrate a physics engine because it would have been overkill for what I need. I also thought the memory would be overkill because there needs to be 2 scene managers (1 for phsyics and 1 for ogre).

I've been using MOC for ray to mesh but I'm really hanging out for this one:

>> Box v.s. Box and Plane intersection.

Can you please also consider: Box vs Sphere :-)

Don't worry, I'll be adding spheres/ellipsoids from this code article.

I'm just working on changing the "node" system a bit. I want it to be more like Ogre's where you can attach multiple objects, and of different types. My system just assumes you want a mesh and does it automatically. I'll probably get to boxes and spheres then.

I'm also aiming for speed. Every microsecond counts.

Re: beastie - Header only collision detection library for Og

Posted: Fri Jul 16, 2010 3:47 pm
by Zonder
betajaen wrote:
kneeride wrote:betajaen you rock!! This is very cool.

I've been reluctant to integrate a physics engine because it would have been overkill for what I need. I also thought the memory would be overkill because there needs to be 2 scene managers (1 for phsyics and 1 for ogre).

I've been using MOC for ray to mesh but I'm really hanging out for this one:

>> Box v.s. Box and Plane intersection.

Can you please also consider: Box vs Sphere :-)

Don't worry, I'll be adding spheres/ellipsoids from this code article.

I'm just working on changing the "node" system a bit. I want it to be more like Ogre's where you can attach multiple objects, and of different types. My system just assumes you want a mesh and does it automatically. I'll probably get to boxes and spheres then.

I'm also aiming for speed. Every microsecond counts.
Yes I remember reading that article god knows how many years ago I was developing with Geforce 2 and 3 was just out?? I never implemented it in my collision engine at the time it was the last thing on my list but I split from the team I was working with :)

Re: beastie - Header only collision detection library for Og

Posted: Sat Jul 17, 2010 5:22 am
by Kojack
doing a box -> sphere check is only a matter of checking to see if a points distance from the center of the sphere is below it's radius
No, it takes more than that.
It's possible for the sphere to intersect the sides of the box without ever going near a box corner.

Looks cool, maybe I won't have to modify Moc now to be more efficient (it transforms every triangle into world space, instead of transforming the ray into local space like beastie does).

Re: beastie - Header only collision detection library for Og

Posted: Sat Jul 17, 2010 3:19 pm
by Herb
I take it, this is more efficient (faster) and easy to use than the "minimal ogre collision library"?

http://www.ogre3d.org/tikiwiki/Minimal+ ... =Libraries

Re: beastie - Header only collision detection library for Og

Posted: Sat Jul 17, 2010 3:24 pm
by betajaen
It's faster (about 1.5x-2x) due to it transforming the ray to localspace and caching the triangles of the loaded meshes.

Re: beastie - Header only collision detection library for Og

Posted: Sat Jul 17, 2010 9:12 pm
by reptor
Thumbs up for this new project. I hope it a good life!

Re: beastie - Header only collision detection library for Og

Posted: Sat Nov 13, 2010 11:39 pm
by SunSailor
Any news or updates on this project, or is it elapsed? If so, any recommendation for an alternative? Or is it work stable and simply didn't need any further update?

Re: beastie - Header only collision detection library for Og

Posted: Sat Nov 13, 2010 11:43 pm
by betajaen
It's fine as it is. I was going to do box/plane/sphere collisions but I'm probably not now, but just for raycasting it's pretty fast and stable.

Re: beastie - Header only collision detection library for Og

Posted: Thu Nov 18, 2010 12:08 am
by Tinnus
Kojack wrote:
doing a box -> sphere check is only a matter of checking to see if a points distance from the center of the sphere is below it's radius
No, it takes more than that.
It's possible for the sphere to intersect the sides of the box without ever going near a box corner.

Looks cool, maybe I won't have to modify Moc now to be more efficient (it transforms every triangle into world space, instead of transforming the ray into local space like beastie does).
I'm pretty sure taking all faces from the box and doing face<->center_of_sphere distance is enough: if a point of the box is inside the sphere, then a point of a face must be; then if a point of a face is inside the sphere, then the face's point closest to the center of the sphere must be as well.

Doing face<->point distance is a matter of projecting the point to the plane of the face; then if it's inside it, do center<->plane distance (easy), and if it's outside, you can do point<->edge with the edges of the face.

Of course that's probably not the fastest way to do it though.

Re: beastie - Header only collision detection library for Og

Posted: Tue Dec 14, 2010 3:18 pm
by Zwart
Hi,
I have a question about beasty. I'm looking to it because I need to detect a simple collision between meshs and I though I would be able to use it in my scene but at first sight I haven't find any function to move my node in my tree so my question is, do I need to have all my objects static to compute any raytracing with beasty or do I miss in the code ??

Thanks

Re: beastie - Header only collision detection library for Og

Posted: Fri Dec 17, 2010 11:33 am
by jonim8or
Does beastie also work with manualobjects?

Re: beastie - Header only collision detection library for Og

Posted: Sun Dec 26, 2010 10:29 pm
by mikekknd
Very nice work but is there any mesh scaling function? It seems like the mesh is not scaled properly and the collision is detecting the unscaled mesh...

Re: beastie - Header only collision detection library for Og

Posted: Thu Feb 03, 2011 6:22 pm
by Beauty
Nice project :D

Maybe some parts of your library are interesting for the sensor simulation of my underwater application. So I can learn from it.

Re: beastie - Header only collision detection library for Og

Posted: Thu Feb 03, 2011 9:36 pm
by voyvf
Doh! Neither g++ 4.4.5 nor clang version 2.9 (trunk 124442) appear to grok the template declarations. ):

I attempted to attach the error but the forum doesn't appear to allow .txt or .out file extensions - here is the gist: https://gist.github.com/810137

Re: beastie - Header only collision detection library for Og

Posted: Thu Feb 03, 2011 9:49 pm
by betajaen
It's because I've literally twisted and turned C++ in a way, it may as well be BASIC. Visual Studio is a bit of a pushover, where as G++ is more hardened against my "style" of programming.

I don't have quick and easy idea of fixing it for you though. The long alternative would be to create a cpp file and declare all the functions in that and remove all the templates; just like proper C++ code. ;)

Re: beastie - Header only collision detection library for Og

Posted: Thu Feb 03, 2011 10:23 pm
by voyvf
betajaen wrote:It's because I've literally twisted and turned C++ in a way, it may as well be BASIC. Visual Studio is a bit of a pushover, where as G++ is more hardened against my "style" of programming.

I don't have quick and easy idea of fixing it for you though. The long alternative would be to create a cpp file and declare all the functions in that and remove all the templates; just like proper C++ code. ;)
Darn, I was hoping to write some Python bindings for this. Do you know if I'll run into the same issue with Gorilla? I've got time to kill and need a break from my normal project. :D

Re: beastie - Header only collision detection library for Og

Posted: Thu Feb 03, 2011 11:48 pm
by betajaen
No, Gorilla doesn't use templates at all. As far as I'm aware, Gorilla is multiplatform.

I only used templates like that, so I could reference functions to classes that haven't been declared yet. Like I said; creating a cpp file, with all of the functions defined in it, would be the most appropriate way to go, but at the time I just wanted a single header file.

Re: beastie - Header only collision detection library for Og

Posted: Fri Feb 04, 2011 12:13 am
by voyvf
betajaen wrote:No, Gorilla doesn't use templates at all. As far as I'm aware, Gorilla is multiplatform.

I only used templates like that, so I could reference functions to classes that haven't been declared yet. Like I said; creating a cpp file, with all of the functions defined in it, would be the most appropriate way to go, but at the time I just wanted a single header file.

Awesome! I'll hit Gorilla first and then move back to beastie, as I need a GUI* just as much as I need collision. :D

Thanks!

EDIT: * Specifically a drop down hud/console.

Re: beastie - Header only collision detection library for Og

Posted: Tue Jun 14, 2011 10:53 am
by mikekknd
I just found something interesting recently. The collision detection become unstable when the mesh uses multiple materials. Do anyone encounter the same problem or is it just me?

Re: beastie - Header only collision detection library for Og

Posted: Sat Sep 01, 2012 11:25 am
by suny2000
Hi !
I'm using Beastie in a little project, and I'm wondering if this library is still under developement.
More specifically, the integration of Paul Nettle work (ellipsoid character controller), which is the only really missing feature in my opinion.
Thanks again for this work,
S.

Re: beastie - Header only collision detection library for Og

Posted: Sat Sep 01, 2012 12:05 pm
by betajaen
I'm afraid not. I never got around to doing it, and I'm working on different projects now.

Perhaps you could use a physics engine instead - bullet for example?

Re: beastie - Header only collision detection library for Og

Posted: Sun Sep 02, 2012 1:39 am
by Zonder
Tinnus wrote:
Kojack wrote:
doing a box -> sphere check is only a matter of checking to see if a points distance from the center of the sphere is below it's radius
No, it takes more than that.
It's possible for the sphere to intersect the sides of the box without ever going near a box corner.

Looks cool, maybe I won't have to modify Moc now to be more efficient (it transforms every triangle into world space, instead of transforming the ray into local space like beastie does).
I'm pretty sure taking all faces from the box and doing face<->center_of_sphere distance is enough: if a point of the box is inside the sphere, then a point of a face must be; then if a point of a face is inside the sphere, then the face's point closest to the center of the sphere must be as well.

Doing face<->point distance is a matter of projecting the point to the plane of the face; then if it's inside it, do center<->plane distance (easy), and if it's outside, you can do point<->edge with the edges of the face.

Of course that's probably not the fastest way to do it though.
i never answered this I realised. You can just use the center of the box and the distance to it's side and the radius of the sphere for the intersect.

Re: beastie - Header only collision detection library for Og

Posted: Thu Mar 07, 2013 2:57 pm
by suny2000
I just found something interesting recently. The collision detection become unstable when the mesh uses multiple materials. Do anyone encounter the same problem or is it just me?
I'm experiencing the same problem. I'm thinking that beastie can't properly test collisions on more than 2 sub-meshes...

If someone knows how to modify this behavior, don't hesitate to post the solution !
S.