MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby AndroidAdam » Sat Aug 14, 2010 3:05 am

Sorry to rez an old thread, if that be the case, but I'm having a bit of a problem. MOC worked amazing for a single character, but I now have 40 entities each casting 4 rays (one in each of the cardinal directions) and this is causing quite a performance problem. I'm curious if there is a method of increasing the speed. Already I cache the MeshInformation so that it only has to be retrieved once, but nevertheless the game is unplayable.

Any suggestions would be greatly appreciated
AndroidAdam
Gnoblar
 
Posts: 1
Kudos: 0
Joined: 14 Aug 2010

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby Nauk » Sat Aug 14, 2010 10:17 am

I think you would be better off with using a real physics library in that case. Curious, how much speed gain did you get with the caching?
User avatar
Nauk
Gnoll
 
Posts: 644
Kudos: 23
Joined: 11 May 2006
Location: Bavaria

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby RoadKillGrill » Sun Aug 15, 2010 12:12 am

AndroidAdam wrote:Sorry to rez an old thread, if that be the case, but I'm having a bit of a problem. MOC worked amazing for a single character, but I now have 40 entities each casting 4 rays (one in each of the cardinal directions) and this is causing quite a performance problem. I'm curious if there is a method of increasing the speed. Already I cache the MeshInformation so that it only has to be retrieved once, but nevertheless the game is unplayable.

Any suggestions would be greatly appreciated


Instead on using cardinal directions use the heading of the object, that will still allow for good collision with half of the checks. Another thing to do is to disable queries with the current object, the is reduce 2 more checks per entity. For that matter made sure that it is only checking relevant objects that you indeed want collision with, if you don't want collision with it set its query flag. Also try to collide with simpler geometry, at this point seriously consider a real physics engine but it will help allot.

I started using MOC as a temporary solution but as the ppl I assigned to add physics failed it is the only system the High Contract: Zombie Game uses for collision. Even with many objects it is still rather playable on most systems tho I know that MOC is my bottleneck and I really should use a better system.
It's a rule, artist applications are 50% magic and 40% productivity and 10% crash.
User avatar
RoadKillGrill
Kobold
 
Posts: 39
Kudos: 6
Joined: 13 Mar 2009
Location: Ohio

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby jonathan_blacknight » Mon Sep 27, 2010 7:09 pm

Sorry the stupid question, how about linux and animated meshes with tri mesh shape?
Brazilian blog about game programming
http://www.pontov.com.br/

My develop blog:
http://shydsgames.com/
jonathan_blacknight
Kobold
 
Posts: 32
Kudos: 2
Joined: 21 Mar 2010
Location: Brazil

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby icaro56 » Fri Oct 15, 2010 6:59 pm

Hi,

how I to do collision using a OBBoxRenderable ?
http://www.ogre3d.org/tikiwiki/Oriented ... e=Cookbook

OBBoxRenderable is not a mesh and in the MOC the collision test is done witch mesh. Is it simple change the MOC 's code to work with OBBoxRenderable?

thanks.
Ícaro Motta
User avatar
icaro56
Halfling
 
Posts: 92
Kudos: 0
Joined: 15 Feb 2009
Location: Belo Horizonte, MG, BRA

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby gameengineer » Wed Dec 08, 2010 11:42 pm

I noticed the sample that comes with MOC is camera to world collisions. Will this library handle one object Entity with other static things like walls?

I just need simple kinematic entity collisions against walls. The walls are made up of blocks or cubes placed around the scene. Full blown physics like OgreBullet and NxOgre are overkill for me. Just want collisions so the player mesh and their bullets doesn't go through walls.

Steve
User avatar
gameengineer
Kobold
 
Posts: 28
Kudos: 0
Joined: 09 Oct 2010
Location: San Diego, CA, USA

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby RoadKillGrill » Wed Dec 08, 2010 11:57 pm

gameengineer wrote: Just want collisions so the player mesh and their bullets doesn't go through walls.


It will do that no problem and be very easy, that is what my game uses until I get off my lazy ass and add something better.
It's a rule, artist applications are 50% magic and 40% productivity and 10% crash.
User avatar
RoadKillGrill
Kobold
 
Posts: 39
Kudos: 6
Joined: 13 Mar 2009
Location: Ohio

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby gameengineer » Thu Dec 09, 2010 1:21 am

It will do that no problem and be very easy, that is what my game uses until I get off my lazy ass and add something better.

Yes! Finally the answer I was looking for. I spent the last 2 days searching, asking, learning physics solutions because another post said I needed Bullet or I needed NxOgre. Well this game, which is a Wii Play Tanks clone of sorts, doesn't need physical dynamics. Just collisions if you please.

I will learn physics later but have no time at the moment.

Ok so I reserve the right to ask you more questions if, after diving into the source code, I need to. :roll: :)

Thanks so much for your help.

EDIT: Just watched the video of your game. Nice... a lot of blood. :) My son likes those bloody games too. What is wrong with you people! :roll:

Steve
User avatar
gameengineer
Kobold
 
Posts: 28
Kudos: 0
Joined: 09 Oct 2010
Location: San Diego, CA, USA

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby siondream » Mon Jan 10, 2011 4:00 pm

Wow, this is really great for beginners like me. Have you thought of providing some documentation among the code? Doxygen style documentation would be really great in orden to get a better understanding of the system.

Thanks again!
siondream
Kobold
 
Posts: 38
Kudos: 1
Joined: 24 Nov 2009

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby rogerdv » Mon Jan 17, 2011 10:40 pm

i havent used MOC in a log time. Does it has been updated to work with new terrain system?
User avatar
rogerdv
Gnome
 
Posts: 356
Kudos: 1
Joined: 09 May 2003
Location: Cuba

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby Mafioso » Sat Jun 25, 2011 10:29 pm

Hello there, I've just implemented MOC::collidesWithEntity into my app, but I've got a problem. I placed two entities opposite to each other and slowly move one towards another that stands still, it works fine, but then I increase the movement speed of the moving entity, the function always returns that collision occured, as far as I know the variables are incorrect in the collidesWithEntity function:
Code: Select all
distToColl = -0.8
distToDest = 1.0


Can anybody help me with this? Thanks in advance.

P.S. And thanks for your time and great work creating this easy to use lib :)

EDIT: I've found out that the gliches occur when frame rate is low, if it's hight enough, even on maximum speed it works fine, any ideas on how to fix it? I would be really grateful :(
Mafioso
Kobold
 
Posts: 27
Kudos: 0
Joined: 21 Mar 2011

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby maxiwill » Sat Jul 23, 2011 7:57 am

hi,

does anybody know what the ETM (Enhanced Terrain Manager) do in the source code?

I'm just wondering if I should implement my own set of terrain manager or not :o
maxiwill
Halfling
 
Posts: 45
Kudos: 0
Joined: 22 May 2010

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby singmelody » Wed Aug 31, 2011 2:46 pm

Thanks for that. Now I am using it.
singmelody
Gnoblar
 
Posts: 11
Kudos: 0
Joined: 19 Dec 2010

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby Nauk » Wed Sep 14, 2011 10:31 am

@Maxiwill: ETM is not required, we just used it because we had the setup ready to demo MOC.

@Singmelody: Great to see people still using MOC :)
User avatar
Nauk
Gnoll
 
Posts: 644
Kudos: 23
Joined: 11 May 2006
Location: Bavaria

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby JDX_John » Thu Oct 13, 2011 8:45 am

A quick question for anyone using MOC for picking... does it support static meshes only or will it work on animated entities too?
JDX_John
Gnome
 
Posts: 397
Kudos: 2
Joined: 08 Nov 2008

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby MorrK » Thu Oct 13, 2011 12:39 pm

i think the current version is just working with not animatied entitys but its easy to make it work with animations as well using this: http://www.ogre3d.org/tikiwiki/Raycasti ... ed_version
User avatar
MorrK
Gnoblar
 
Posts: 12
Kudos: 7
Joined: 24 Jun 2010

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby eferaga » Wed Feb 15, 2012 10:56 pm

Hello, i have the next problem i try to use the function

collidesWithEntity(Ogre::Vector3::ZERO,Ogre::Vector3(50,0,0),60.0f,-1.0f);

and i just do that to get always a true in the collision detection just to test, but the problem is that i always get false the result of this :s, so i would like to know what else do i have to add to achieve the collision or what do i have to modify, i would be very grateful if someone can help me out with this since i need it for a school project,

Sincerely,
Eferaga
eferaga
Gnoblar
 
Posts: 1
Kudos: 0
Joined: 15 Feb 2012


Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Postby fiorebat » Sat May 12, 2012 12:03 pm

hi, set up an application with ogre 1.7.3, no artifex, with 3 meshes, 1 particle, if I put the MOC, it works well, but my frame rate goes to 0,7 ~ 1,3 :)

I try a version posted backwards (col3=) but is the same.

Some idea?

tnx
fiorebat
Gnoblar
 
Posts: 3
Kudos: 0
Joined: 12 May 2012

Previous

Return to Showcase

Who is online

Users browsing this forum: Bing [Bot] and 4 guests