The Sporum - The Official Spore Forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to forum index 
[Login] Login 
Awareness and buildings (update 8/2 see p9)  XML
Forum Index » Spore Galactic Adventures
Author Message
DVDMaster


MouthBreather

Joined: 05/12/2009 22:00:32
Messages: 940
Offline

Double_Helix wrote:There is something else you need to know too.

The bounding box creation also influences paths. By keeping the walls, floor, and roof separate you can reduce issues with paths you layout with your ai. Also be sure to place enough path points so that curvature doesn't mess up the pathing either. Paths on buildings works, but its finicky. You will have to test a lot.

Collision boxing is also a bit odd. It's not the same for everyone so it has something to do with the relationship of creature parts and particular shapes. It can also be influenced by processor performance. Slower or busier processors will cause more clipping issues. I figure this due to the fact that some people have a ton of clipping issues where others do not on the same objects.

Because of the way collision detection and avoidance works, the ai can't transition well or at all onto objects. They either must be on them or off them. The Ai also gets confused (little ? over their head) if the plane they are standing on is too close to the ground plane. There seems to be a minimum distance the surface they stand on needs to be from the ground, in order to avoid problems.

So you can build a mission in a "space ship" or building or what have you but it will take quite a bit of tweaking to get it to work. Large open space works better than narrow corridors and such.

Personally I think its all a little to finicky to rely on solely and this information should just be used to create some accents to your adventures.


I've suspected that much. Thanks for the details.

I thought I'd start with the awareness issue before checking pathing issues. I hope some of the pathing issues will be solved by fixing the awarness problem. I don't think the AI would be able to find a path when it can't see the destination or opponent in combat.



[WWW]
4ferrets


Microbe

Joined: 09/12/2008 23:42:45
Messages: 99
Offline

this should get sticky-ed.
very interesting, and kind of explains some of the problems I've be having making my adventure.

It also make me wonder how much is effected just
by the placement of objects, trees, crates and such
around a building or by themselves, this may be why some of my scripts are inconstant?
or suddenly just stop working.
I'll have to toy with this and see what i find.

thank you

This message was edited 1 time. Last update was at 07/08/2009 21:22:33

Andeavor


MouthBreather

Joined: 10/23/2008 12:10:23
Messages: 652
Offline

DVDMaster wrote:I thought I'd start with the awareness issue before checking pathing issues. I hope some of the pathing issues will be solved by fixing the awarness problem. I don't think the AI would be able to find a path when it can't see the destination or opponent in combat.

Pathing doesn't seem affected inside buildings - unless combined with awareness.

I successfully had NPCs walk along a path in a hallway made of modular pieces containing of the walls and the roof and the same in a room made as one building. I had to remove the floor in both to get them to move from the spot as they easily got stuck, and there sometimes is some hesitation, especially when an object is placed nearby or when another NPC is crossing their path.

I have also tested the 'move to' action, which gets them stuck in a wall sometimes due to the floor plan, but they will eventually find their way as well as when they are set to always 'follow' the player or another NPC.
[WWW] [MSN]
Khorzho


MouthBreather

Joined: 11/03/2008 16:51:35
Messages: 565
Offline

DVDMaster wrote:I've seen the problem too. It does seem that the coordinates of the skin do not mesh with the coordinates of the blocking volume used for collision detection. In general, it seems that the problem escalates when you scale up the object.


Yep. Exactly.

Between your video, and my experiences, I can only conclude:

1. When Maxis put collision on building parts, they didn't actually place the collision boundry on the texture layers, but just pumped out an automated code to get collision between the vertices. This is the only way the scaling issue could occur.

2. Line of sight was not given true collision detection, but is more 2D in approach. Pathing is probably the same.


My bigger issue with collision detection is that fast moving objects (like my captain with speed 5, jump 4, glide 4) can move so fast that the collision against the blocking volume on the surface nearest the captain is missed and you collide with the blocking volume on the far side of the object. The net result is that you are now trapped INSIDE the object.


I just experienced the EXACT same problem in an adventure I created. Please take a minute to read over this. If you have enough time, play the mission and see an entire concept ruined by this issue.

http://forum.spore.com/jforum/posts/list/35260.page






Prometheus09


Civilized Sporeon

Joined: 09/10/2008 01:40:23
Messages: 1350
Location:
USA

Offline

Very nice little study there... you seem to have figured it out nicely.

Galactic Adventures... looks like it's going to be another non-tanned summer!
Prometheus09's Profile
[WWW]
DVDMaster


MouthBreather

Joined: 05/12/2009 22:00:32
Messages: 940
Offline

Khorzho wrote:
Between your video, and my experiences, I can only conclude:

1. When Maxis put collision on building parts, they didn't actually place the collision boundry on the texture layers, but just pumped out an automated code to get collision between the vertices. This is the only way the scaling issue could occur.


I recall reading about the clipping problems with detail parts placed on the mouths of creatures. It turns out that they offload the calculations of the mouth polygon coordinates to the graphic card GPU (they just tell the GPU display this blob with this skin and distortion, and the GPU figures out where the polygons go) and because of this they don't really know the coordinates of the surface on the mouth so they cannot positions the details placed on the mouth correctly. The details are just a fixed offset from the center of the face object. For most mouths the upper jaw is fixed and the lower jaw does the animating. This is why parts attached to lower jaws have such problems.

Maybe the same is happening with buildings. The collision logic is based on the vertices and the GPU is programmed to draw a cylinder with a skin with a certain radius to generate the rounded edge of block (or a plane of a certain thickness).

Has anyone tested to see if the sinking effects are more pronouced with building parts that have rounded corners?

[WWW]
Khorzho


MouthBreather

Joined: 11/03/2008 16:51:35
Messages: 565
Offline

DVDMaster wrote:Has anyone tested to see if the sinking effects are more pronouced with building parts that have rounded corners?


Indirectly I think I have.... the mission I created in my referenced post has large spherical moons. The problem seems to be pronounced enough no one has finished it.





MaxisCactus


Developer

Joined: 09/05/2008 20:28:29
Messages: 2284
Offline

Great, detailed post! You're correct in your hypotheses about placement and awareness. The line-of-sight checks are expensive, so we use bounding boxes in order to speed it up.

Also, the conclusions you made on awareness are not limited to Advanced AI. These hold true for basic and intermediate AI as well.

We've just added some extra notes to the Advanced AI guide that you might be interested in.

MaxisCactus wrote:
Awareness
It is not necessary to use the “aware of” condition unless it is different from the target of the action. For example, “pick up stick if aware of stick” is the same as “pick up stick”. Awareness is built into attack, give and pick up. Follow is an exception, it’s more like tracking something.

First Sighting
First sighting means the first time a creature sees something. The most obvious use is “emote greet when first sighting player”. This will cause the creature to wave once the first time it sees the player, but not upon subsequent sightings of the player.
[WWW]
DVDMaster


MouthBreather

Joined: 05/12/2009 22:00:32
Messages: 940
Offline

Thanks for the information.

So it would seem that single building interiors (floor + walls in a single building) and most floors with built up regions (floor + steps or floor + furniture) will have problems if the interior requires any awareness based AI (basic or advanced AI): attack, pickup, give, and any conditional based. It doesn't appear to prevent the captain from doing this actions, only the NPC's ability to do these things. (the captain can give to the NPC, but the NPC won't give to the captain).

The work around appears to be to for the floor, walls, roof and furnitureto all be separate buildings.

I would think that the bounding box optimization would also apply to path finding -- the path finding algorithms do not see doorways or other opening within buildings, but only navigate arround buildings. Is this the case?

If so, what does that mean for using disguised buildings as gates?
Or, in getting NPC to walk over buildings as bridges?

Are there any exception when NPCs are tasked with following the captain? Or will the captain's follower get stuck too?

I have noticed problems with suing disguised building as gates -- the open state does not remember the orientation or the closed state (here is an adventure that demonstrates the problem: http://www.spore.com/sporepedia#qry=sast-500387856989 ).


[WWW]
Bowdlen


Multicellular

Joined: 02/07/2009 22:41:18
Messages: 379
Location:
District 9

Offline

Very interesting! I never would of had the patience to do all of that xD. and this will help make all of the future Adventures a little better a step at a time

>>> <<<Click if you feel like it.

http://www.spore.com/view/myspore 90% of teens today would die if Myspace had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.>
Rhedd


Multicellular

Joined: 09/13/2008 23:05:45
Messages: 137
Offline

DVDMaster wrote:I would think that the bounding box optimization would also apply to path finding -- the path finding algorithms do not see doorways or other opening within buildings, but only navigate arround buildings. Is this the case?

If so, what does that mean for using disguised buildings as gates?
Or, in getting NPC to walk over buildings as bridges?

Bridges obviously don't work. There's a little side-quest in the very first Adventure Town adventure about leading lost spoffits to the girl who herds them, and you can't possibly do it because she's surrounded by bridges which the spoffits refuse to set foot on. I was astounded to find that the mission designed to show off GA had such a glaring bug, and nobody had caught it during testing.

As for gates, the adventure I'm working on at the moment has a point at which an AI creature must exit a city gate, which I had built as one big building. Having tried many things, I've found the AI will follow the player through the gate, but "move to" and "patrol" commands will make the AI stop at the opening, and go no further.

I found that if I raised the whole gate off the ground far enough for the creature to go under it, it suddenly worked. Although that, of course, couldn't be a solution since the city walls were now floating. Still, it was a useful test.

The final solution was simply to rebuild the gate as two separate side wall pieces and a floating top piece. THREE separate buildings. The gate looks exactly the same, and the AI can suddenly navigate through it with ease.

I think that illustrates the answer to your question.

MarksmanAim


Multicellular

Joined: 09/26/2008 23:57:00
Messages: 492
Location:
Look behind you, I'm the guy with the knife.

Offline

I applaud you for two reasons:

1)You have answered a question for many players.

2)You did it using a scientific approach.

Not to belittle your incredible discovery(it is incredible), but I'm more ionterested in number 2. Not enough people take the time to think about how to test the problem, hypotheisise, experiment, and anylyze to the degree you did. The majority of people I speak to only go as deep as puddles. This is something I would like to see more of.

Once again, kudos to you.

(Sigh, this means I need to COMPLETELY redesign my space station in order to have a battle there...)




Bridges obviously don't work.


Well... they do and they don't. The problem with the bridges in adventure town is that they have part of them, above the actual surface. If you could make the bridges with sepertate from the things(for lack of a better word) that prevent you from walking off the side, then you could potentially herd the Spoffits. It's all because those things(again) raise the bouding box above the actual bridge, essentially making it as high as those things(need... better... word...) for the Spoffits.

I am equally estounded.

This message was edited 3 times. Last update was at 07/09/2009 06:33:43


^READ THE POSTS PEOPLE^
Double_Helix


Multicellular

Joined: 09/16/2008 02:32:31
Messages: 108
Offline

MarksmanAim wrote:




Bridges obviously don't work.


Well... they do and they don't. The problem with the bridges in adventure town is that they have part of them, above the actual surface. If you could make the bridges with sepertate from the things(for lack of a better word) that prevent you from walking off the side, then you could potentially herd the Spoffits. It's all because those things(again) raise the bouding box above the actual bridge, essentially making it as high as those things(need... better... word...) for the Spoffits.

I am equally estounded.


Npc almost always never cross objects from the ground plane to the object. They can't make the transition. IF your npc are already on an object plane and you want them to cross a bridge, then yes that will work if it's built correctly.
Double_Helix


Multicellular

Joined: 09/16/2008 02:32:31
Messages: 108
Offline

oops wrong thread... (delete this)

This message was edited 1 time. Last update was at 07/09/2009 06:53:05

Prometheus09


Civilized Sporeon

Joined: 09/10/2008 01:40:23
Messages: 1350
Location:
USA

Offline

I am incredibly glad I just read the rest of this thread before proceeding with this new mission I've been creating. Gah! I thought I had solved the tedious process of placing/resizing/angling walls, floors and roofs... I had the plan to make as many complete, hollow spaces as possible, but since you've illustrated this bounding box thing, it seems as though this might cause some problems. :/

Back to the drawing board, literally.

Galactic Adventures... looks like it's going to be another non-tanned summer!
Prometheus09's Profile
[WWW]
 
Forum Index » Spore Galactic Adventures
Go to:   
 
Powered by JForum 2.1.8 © ( EA Dev Build 2009-09-21 18:45:57 ) JForum Team