sidebar features
sidebar content

Go Back   Blender Artists Forums > Game Engine > Game Engine Support and Discussion

Reply
 
Thread Tools
Ace Dragon Ace Dragon is online now
Banned Member
 
Join Date: Feb 2006
Location: Wichita Kansas
Posts: 12,952
http://lists.blender.org/pipermail/b...ay/019429.html
Quote:
BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility.

A new type of "Sensor" physics object is available in the GE for advanced
collision management. It's called Sensor for its similarities with the
physics objects that underlie the Near and Radar sensors.
Like the Near and Radar object it is:
- static and ghost
- invisible by default
- always active to ensure correct collision detection
- capable of detecting both static and dynamic objects
- ignoring collision with their parent
- capable of broadphase filtering based on:
* Actor option: the collisioning object must have the Actor flag set to be detected
* property/material: as specified in the collision sensors attached to it
Broadphase filtering is important for performance reason: the collision points
will be computed only for the objects that pass the broahphase filter.
- automatically removed from the simulation when no collision sensor is active on it

Unlike the Near and Radar object it can:
- take any shape, including triangle mesh
- be made visible for debugging (just use the Visible actuator)
- have multiple collision sensors using it

Other than that, the sensor objects are ordinary objects. You can move them
freely or parent them. When parented to a dynamic object, they can provide
advanced collision control to this object.

The type of collision capability depends on the shape:
- box, sphere, cylinder, cone, convex hull provide volume detection.
- triangle mesh provides surface detection but you can give some volume
to the suface by increasing the margin in the Advanced Settings panel.
The margin applies on both sides of the surface.

Performance tip:
- Sensor objects perform better than Near and Radar: they do less synchronizations
because of the Scenegraph optimizations and they can have multiple collision sensors
on them (with different property filtering for example).
- Always prefer simple shape (box, sphere) to complex shape whenever possible.
- Always use broadphase filtering (avoid collision sensor with empty propery/material)
- Use collision sensor only when you need them. When no collision sensor is active
on the sensor object, it is removed from the simulation and consume no CPU.

Known limitations:
- When running Blender in debug mode, you will see one warning line of the console:
"warning btCollisionDispatcher::needsCollision: static-static collision!"
In release mode this message is not printed.
- Collision margin has no effect on sphere, cone and cylinder shape.

Other performance improvements:
- Remove unnecessary interpolation for Near and Radar objects and by extension
sensor objects.
- Use direct matrix copy instead of quaternion to synchronize orientation.

Other bug fix:
- Fix Near/Radar position error on newly activated objects. This was causing
several detection problems in YoFrankie
- Fix margin not passed correctly to gImpact shape.
- Disable force/velocity actions on static objects
This system will allow for advanced collision management and allows things like static-static collision, also, this will likely be the last big commit in the BGE for 2.49 as said below
Quote:
**** 2.49

- Some complaints went on that too many new (although good!) GE stuff
went in svn last weeks, postponing release. Benoit promised it's done
for now though.
#1   Old 17-May-09, 17:18   
Reply With Quote


SamCameron SamCameron is offline
Member
 
Join Date: Apr 2008
Posts: 336
That is one of those things that Blender should must have, so finally is done, STATIC COLLISIONS !! that sounds great , what a shame there will be no soft shadows in 2.49 .
#2   Old 17-May-09, 17:52   
Reply With Quote
J09's Avatar
J09 J09 is offline
Member
 
Join Date: Jan 2007
Posts: 1,441
Quote:
Some complaints went on that too many new (although good!) GE stuff
went in svn last weeks, postponing release.
Hm... you won't hear me complaining. Good work devs!!!
............................................
Resources
#3   Old 17-May-09, 18:36   
Reply With Quote
Blendiac's Avatar
Blendiac Blendiac is offline
Member
 
Join Date: May 2007
Location: North of Toronto, Ontario, Canada
Posts: 775
Quote:
Some complaints went on that too many new (although good!) GE stuff
went in svn last weeks
Damn straight. All this new feature stuff just makes it that new users think being an artist is easy! *hrumph!* I say no new features for Blender - ever! In fact, let's strip out the ones we don't need currently, like modelling, lighting, texturing and animation. We'll all finish up much faster without any of that stuff.

............................................
Starting out? Here's the tutorial that I found most helpful when first beginning in wiki or PDF format.

..........................................After that, RTFM! (Read the *Friendly* Manual ) here!..........................................
#4   Old 17-May-09, 18:45   
Reply With Quote
kay_Eva kay_Eva is offline
Member
 
Join Date: Jun 2008
Posts: 1,197
I hope this get built on graphicall soon trigger volumes make everything awesome
#5   Old 17-May-09, 19:03   
Reply With Quote
kirado kirado is offline
Member
 
Join Date: Jun 2006
Posts: 1,607
Quote:
- Some complaints went on that too many new (although good!) GE stuff
went in svn last weeks,
.. er.. who was complaining and why (curious)? Yeah I hate it when stuff improves and gets better.. it's sooo terrible lol.

I think the other Blender users are just jealous that now that the GE has a larger group of motivated devs than ever before, that it just appears, to impatient users, that there have been faster improvements than the 2.5 update ;-) Well that's my make believe theory, heh heh. Probably just some commit convention thing..but it has been like this before.
#6   Old 17-May-09, 19:08   
Reply With Quote
Moguri's Avatar
Moguri Moguri is offline
Member
 
Join Date: Jun 2008
Location: Spokane, Washington, USA
Posts: 795
The complaints have been coming from the fact that 2.49 has been in a release candidate stage for a while now, which is supposed to be bug fixes only at that point.
............................................
* Concept RPG News
* BlenderKart Site
#7   Old 17-May-09, 21:05   
Reply With Quote
kirado kirado is offline
Member
 
Join Date: Jun 2006
Posts: 1,607
Yah, I figured it was probably something like that. Thanks for clearing it up.
#8   Old 17-May-09, 23:08   
Reply With Quote
jessegp's Avatar
jessegp jessegp is offline
Member
 
Join Date: Apr 2006
Posts: 953
so sweet baby Jebus i've been wanting this for soooooooooooo long.
............................................
Don't try to confuse me with the facts. My minds already made up.
Making movies, singing songs, 'nd fighting round the world.
http://animea.blackgoku.com/anime/Go...nds/heaven.wav
#9   Old 17-May-09, 23:42   
Reply With Quote
Blendiac's Avatar
Blendiac Blendiac is offline
Member
 
Join Date: May 2007
Location: North of Toronto, Ontario, Canada
Posts: 775
Has anyone managed to find where this is in the UI? I looked in the dynamic type dropdown / bounds / sensor / actuator... still no joy. I'm wondering if my graphicall build was from pre-this commit though...
............................................
Starting out? Here's the tutorial that I found most helpful when first beginning in wiki or PDF format.

..........................................After that, RTFM! (Read the *Friendly* Manual ) here!..........................................
#10   Old 18-May-09, 07:36   
Reply With Quote
ben2610 ben2610 is offline
Member
 
Join Date: Jan 2008
Posts: 241
@Blendiac: this is a new physics type. It's between "no collision" and "static" in the physics type menu.
You will need revision 20239 or later to get it.
#11   Old 18-May-09, 08:53   
Reply With Quote
moerdn moerdn is offline
Member
 
Join Date: Jul 2008
Posts: 25
Could someone give a short idea, how to use this feature? Is it useful to check whether the player is inside this volume or not and how do I combine it with a logic brick?

greetings, moerdn
#12   Old 19-May-09, 05:53   
Reply With Quote
Littlebob Littlebob is offline
Member
 
Join Date: Apr 2006
Posts: 386
What specifically does this mean?
Quote:
Originally Posted by Benoit
- Use collision sensor only when you need them. When no collision sensor is active
on the sensor object, it is removed from the simulation and consume no CPU.
Is it possible to deactivate a collision sensor or does this just mean if you don't have a collision sensor on the object? It would be very nice if I could temporarily disable a collision sensor.
............................................
My favorite word: Duotrigintillion.
#13   Old 26-May-09, 19:21   
Reply With Quote
Blendiac's Avatar
Blendiac Blendiac is offline
Member
 
Join Date: May 2007
Location: North of Toronto, Ontario, Canada
Posts: 775
Quote:
Originally Posted by moerdn View Post
Could someone give a short idea, how to use this feature? Is it useful to check whether the player is inside this volume or not and how do I combine it with a logic brick?

greetings, moerdn

I'm using it to detect whether my character is touching the ground. Previously I used a ray, but the problem there was that if only the edge of the character was touching the ground, then the ray (in the middle of the character) missed it. Using a collision actuator on my character would also trigger if the side or top of my character was touching something. With this, I have a simple shape, that approximates the underside of my characters shape, parented just beneath them. If the sensor object is colliding with the ground, they're touching. Simple, flexible and effective.

Feel free to checkout my demo file here. (note: it requires a build more recent than RC3, such as the autobuild from graphicall.org)
............................................
Starting out? Here's the tutorial that I found most helpful when first beginning in wiki or PDF format.

..........................................After that, RTFM! (Read the *Friendly* Manual ) here!..........................................
#14   Old 26-May-09, 19:44   
Reply With Quote
ben2610 ben2610 is offline
Member
 
Join Date: Jan 2008
Posts: 241
@Littlebob: yes you can deactivate a collision sensor: simply put the main object in a state where no controllers is connected to the sensor; it will be automatically removed from the physics simulation and the logic system and will consume no CPU. Changing back to a state where the sensor is connected will automatically bring it back in the simulation.

@Blendiac: if you use a sensor object with a triangle shape, don't forget to give it a width with the collision margin in the Advanced panel or your sensor object will easily miss the ground. Ideally the sensor object shape should touch the feet of your character so that the contact with the ground is never missed. Unfortunately, the margin is not visible in the 3D view but you can get a feel of the size of the shape in the game if you enable physics visualization.
#15   Old 26-May-09, 21:19   
Reply With Quote
Littlebob Littlebob is offline
Member
 
Join Date: Apr 2006
Posts: 386
Quote:
Originally Posted by ben2610 View Post
@Littlebob: yes you can deactivate a collision sensor: simply put the main object in a state where no controllers is connected to the sensor; it will be automatically removed from the physics simulation and the logic system and will consume no CPU. Changing back to a state where the sensor is connected will automatically bring it back in the simulation.
Thank you.

I knew I should have been getting used to states much earlier. I have a feeling that it might be better and more efficient than how I have been doing it with allot of things.
............................................
My favorite word: Duotrigintillion.
#16   Old 27-May-09, 01:19   
Reply With Quote
dabeanyo's Avatar
dabeanyo dabeanyo is offline
Member
 
Join Date: Oct 2008
Posts: 7
This is a very helpful addition to the game engine. Has anyone found errors with these new sensor objects, or are they good to go?
@Blendiac: Thanks for posting the demo file, it works well to show some of the new capabilities.
#17   Old 27-May-09, 19:53   
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 19:09.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Logo and website design copyright © 2006 by froodee design bureau. All rights reserved.
Other Blender Sites
new icon Blender Homepage »
The official Blender homepage
new icon BlenderNation »
Fresh Blender News, Every Day
new icon Blenderart Magazine »
Blender articles, tutorials and images.
Blender Headlines
Featured Artwork
Short animation: Barrel by Phlopper
Woolly mammoth by sebastian_k
Photorealistic classic furniture by eMirage
Social BlenderArtists