MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]
-
- Gnoll
- Posts: 653
- Joined: Thu May 11, 2006 9:12 pm
- Location: Bavaria
- x 36
MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]
Link to the Video:
Hey everyone, since collision-detection seems to be an ongoing topic and people keep asking about simple collision and more accurate mousepicking we decided to pack our collision routines into a lightweight and easy to use mini-toolkit, named MOC - Minimal Ogre Collision.
MOC is based on the Ogre forum & wiki entries:
http://www.ogre3d.org/phpBB2/viewtopic.php?t=23440
http://www.ogre3d.org/wiki/index.php/Ra ... ygon_level
MOC does not aim to and is by no means able to be a replacement for the use of a full blown physics or collision library. It is rather a solution for situations where integrating a physics library would be a total overkill: like mousepicking in editor applications, quest & turn based rpgs, architectural presentations, quick prototypes, demos etc. Simply in all cases where you only need a basic collision-detection or picking and nothing else.
Performance:
So far we could not detect a notable performance tax when using it. Looking at the demo - you can turn it off entirely pressing C and the FPS meter doesn't show a messurable difference. We had similar good results testing it in bigger scenarios with many more objects in the scene.
Features:
- Simple accurate mousepicking on vertex level, means if you click on a mesh the mesh is only detected if you hit the actual mesh and not the bounding box.
- Simple collision detection, for example to prevent the camera from moving through walls, or enable walking and driving on objects like bridges, roadmeshes, etc.
- Supports ETM, TSM & Meshbased terrains
- Easy to setup and use. MOC only consist of 2 files CollisionTools.h + .cpp
- Open Source under the MIT license allows to use it like you wish, commercial or non-commerical
Downloads:
- MOC demo 1.0 beta - win32 demo,binaries, source and media ~ 46MB
- MOC demo 1.0 beta - VC++ 2005 express project files, sources
- Latest - MOC toolkit source
- Latest - MMOC toolkit source for MOgre
Future Plans:
- Support for BSP
- Static Geometry
Repository:
- MOC - Google Code
Homepage:
- MOC on www.artifexterra.com
Since this is not only my doing:
Thanks & credits to Wannabee who helped a lot with the implementation and Eliah for making the video.
Hopefully some of you find it useful
/Nauk
ARTIFEX TERRA 3D - Artist-friendly, free and easy WYSIWYG realtime outdoor scene Editor & Painter
New loader now with Ogre::Terrain support: Addons for Artifex on SourceForge
MOC - Minimal Ogre Collision & Mousepicking
Simple TerrainMaterialGenerator for the use of standard Ogre material with Ogre::Terrain
Support me on Patreon
-
- Gnome
- Posts: 334
- Joined: Tue Oct 24, 2006 9:02 am
- Location: Moscow, Russa
- x 26
-
- OGRE Moderator
- Posts: 3447
- Joined: Mon Jul 18, 2005 4:15 pm
- Location: Wales, UK
- x 58
-
- Gremlin
- Posts: 166
- Joined: Fri Jun 30, 2006 1:04 pm
-
- Halfling
- Posts: 79
- Joined: Fri Jun 23, 2006 12:27 am
- Location: Germany
-
- Halfling
- Posts: 59
- Joined: Fri Aug 11, 2006 8:34 pm
- Location: Bishkek, Kyrgyzstan
-
- Greenskin
- Posts: 124
- Joined: Thu Feb 15, 2007 8:47 pm
-
- Orc
- Posts: 419
- Joined: Thu Apr 07, 2005 2:11 pm
- Location: UK
-
- OGRE Moderator
- Posts: 2819
- Joined: Mon Mar 05, 2007 11:17 pm
- Location: Canada
- x 218
-
- Greenskin
- Posts: 130
- Joined: Sat Oct 18, 2008 7:50 am
- Location: Sydney, Australia / Seoul, Korea
-
- Orc
- Posts: 470
- Joined: Thu Feb 15, 2007 2:08 pm
- Location: Gothenburg, Sweden
-
- Gnoll
- Posts: 653
- Joined: Thu May 11, 2006 9:12 pm
- Location: Bavaria
- x 36
@Bharling: I will definately have a look into that, at this point I have to admit I only know the very basics about culling mechanics and possible implementations, but I already started reading up on it, since it sounds like a good thing to do. If you have more detailed suggestions, pointers or ideas about it feel free to post them here or on the MOC forum: http://92.51.140.14/artifexterra3d/foru ... ?board=7.0 - will be definately greatly appreciated.
@Nargil: But then you got it already up and running which is what counts and there is always the possibility to try it in the next project.
@Manowar: Both have the same basic purpose, but Opcode has definately way more features and is likely more performant, where MOC is easier to integrate and lightweight.
Many thanks for the overly nice feedback everyone on behalf of our humble team
ARTIFEX TERRA 3D - Artist-friendly, free and easy WYSIWYG realtime outdoor scene Editor & Painter
New loader now with Ogre::Terrain support: Addons for Artifex on SourceForge
MOC - Minimal Ogre Collision & Mousepicking
Simple TerrainMaterialGenerator for the use of standard Ogre material with Ogre::Terrain
Support me on Patreon
-
- Gnoblar
- Posts: 5
- Joined: Wed Aug 22, 2007 8:20 pm
MOC feature request
i tried out MOC and it works fine.
The CollisionTools::raycastFromCamera method expects an const OIS::MouseEvent param.
What do you think about a downgrade to an OIS::MouseState struct? You just use the mouse position in this function. This could reduce the dependencies.
best regards rukos1
-
- OGRE Retired Team Member
- Posts: 3335
- Joined: Tue Jun 21, 2005 8:26 pm
- Location: Rochester, New York, US
- x 3
-
- Gnoll
- Posts: 653
- Joined: Thu May 11, 2006 9:12 pm
- Location: Bavaria
- x 36
@sinbad: thanks a lot, your feedback means a lot for us
@rukos1 & praetor: many thanks for testing and input , you both are totally right, changing it to x,y parameters to remove the OIS dependency.
ARTIFEX TERRA 3D - Artist-friendly, free and easy WYSIWYG realtime outdoor scene Editor & Painter
New loader now with Ogre::Terrain support: Addons for Artifex on SourceForge
MOC - Minimal Ogre Collision & Mousepicking
Simple TerrainMaterialGenerator for the use of standard Ogre material with Ogre::Terrain
Support me on Patreon
-
- Gnoblar
- Posts: 5
- Joined: Wed Aug 22, 2007 8:20 pm
another MOC feature request
I tried to pick an BillboardSet, but they were not recognized, because Billboards are not intented. To allow this I added the entry:
mRaySceneQuery->setQueryTypeMask(SceneManager::FX_TYPE_MASK | SceneManager::ENTITY_TYPE_MASK);
into the constructor.
But in method CollisionTools::raycast is an explicit check if the object is an entity. Could the next version consider Billboardsets please. A flexible solution would be to allow the user to set the QueryTypeMask...
Another point is the returned target as ulong value.
Why don´t you just return a movable pointer without this horrible cast?
Thanks for your work!
-
- Gnoll
- Posts: 653
- Joined: Thu May 11, 2006 9:12 pm
- Location: Bavaria
- x 36
ARTIFEX TERRA 3D - Artist-friendly, free and easy WYSIWYG realtime outdoor scene Editor & Painter
New loader now with Ogre::Terrain support: Addons for Artifex on SourceForge
MOC - Minimal Ogre Collision & Mousepicking
Simple TerrainMaterialGenerator for the use of standard Ogre material with Ogre::Terrain
Support me on Patreon
-
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
I approve of the MOC!
About time that Ogre got a collision lib using nothing but Ogre.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
- Gnoll
- Posts: 653
- Joined: Thu May 11, 2006 9:12 pm
- Location: Bavaria
- x 36
ARTIFEX TERRA 3D - Artist-friendly, free and easy WYSIWYG realtime outdoor scene Editor & Painter
New loader now with Ogre::Terrain support: Addons for Artifex on SourceForge
MOC - Minimal Ogre Collision & Mousepicking
Simple TerrainMaterialGenerator for the use of standard Ogre material with Ogre::Terrain
Support me on Patreon
-
- Old One
- Posts: 2730
- Joined: Sat Sep 17, 2005 10:08 am
- Location: San Francisco
- x 13
-
- Gnoll
- Posts: 653
- Joined: Thu May 11, 2006 9:12 pm
- Location: Bavaria
- x 36
ARTIFEX TERRA 3D - Artist-friendly, free and easy WYSIWYG realtime outdoor scene Editor & Painter
New loader now with Ogre::Terrain support: Addons for Artifex on SourceForge
MOC - Minimal Ogre Collision & Mousepicking
Simple TerrainMaterialGenerator for the use of standard Ogre material with Ogre::Terrain
Support me on Patreon