Jump to content
The Dark Mod Forums

Minimizing AAS Areas


grayman

Recommended Posts

While working on various issues over the past year, I've become more familiar with AAS areas.

 

Recent work on elevators showed me that the AAS compiler can create areas in unexpected--and unwanted--places. In the case of elevators, the extra areas can prevent AI from using an elevator.

 

If you have a cabinet, and you don't want AI to bump into it, you surround it with monster_clip. Some people make the clip the same height as the cabinet, and some make it rise to the ceiling.

 

What you might not realize is that one or more AAS areas could be created at the top of the shorter clip brush, because AI are allowed to walk on horizontal clip surfaces. So--even though the top of the clip brush is way off the floor--the AAS compiler will probably lay down a few AAS areas up there.

 

Windowsills, tops of windows, tops of switch backplates, cupboards, tables, etc. Any worldspawn surface that isn't vertical or near-vertical can generate AAS areas.

 

This is a good example of what can happen. The guard walks from an AAS area at the bottom of the column to its "neighbor" at the top. In fact, all of the outer-wall tops in that map have AAS areas. A liberal use of monster_clip all along the tops of the walls would have prevented the problem.

 

(Don't be misled by the aas32_flood entity that we use in conjunction with elevators to get AI to walk to an otherwise unreachable section of the map. A section is unreachable if the AI can't walk there, but if the section is reachable, then any horizontal or angled surface inside that section is a candidate for AAS areas. Even when an AI isn't supposed to be able to get to the generated areas.)

 

So, what can you do?

 

Add this line to your DoomConfig.cfg file:

 

bind "b" "_impulse27"

 

In the game, whenever you press the b key, you'll see the AAS areas near you. Walk around your map, looking for any sets of areas you weren't expecting. Tops of tables, tops of cabinets, windowsills, etc.

 

When you find unexpected areas that your AI don't need, fix the surfaces that generated them. Lift the tops of monster_clip brushes to the ceiling. Lay a horizontal m_c brush across the top of your room to eliminate a bunch of surfaces from clipped furniture. Fill in the gap above a windowsill with m_c.

 

I had a room I fixed this morning that had monster_clip columns that were 256 off the floor (it's a tall room) and I had a couple dozen AAS areas sitting up there. Extending the columns to the ceiling eliminated these areas.

Link to comment
Share on other sites

Could this be related to the issue of AI running to a different floor? Could they be trying to reach a surface that is in the same room but off the ground?

Link to comment
Share on other sites

Could this be related to the issue of AI running to a different floor? Could they be trying to reach a surface that is in the same room but off the ground?

 

Related, but not the root cause of that problem. The hiding spot code picks spots for the AI to go to during a search. If a spot is not in an AAS area, but is "close enough" to be moved to a "nearby" AAS area, the spot is moved into that AAS area. There doesn't appear to be a check on how far the spot gets moved, and the new destination doesn't have to be part of the same room/cluster/leaf. So AI can sometimes end up going upstairs or downstairs.

Link to comment
Share on other sites

Just had a look at Business and found AAS in loads of places where there shouldn't be, this is a very hand tool, just wish the AAS indicators would stay toggled on instead of disappearing after a few seconds etc.

 

I think it would be a more useful tool if it toggled on and off by hitting the key. That way you could turn it on, walk around the map, and have a constant picture of the area near you each frame. Toggle it off when you're done.

Link to comment
Share on other sites

Oh, and the different colors indicate different clusters.

 

Cluster = leaf = room.

 

A white AAS area is a portal.

 

Clusters are usually separated by visportals, though I've found that a working visportal won't always create different clusters on either side, choosing instead to let them be the same cluster.

Link to comment
Share on other sites

Clusters are usually separated by visportals, though I've found that a working visportal won't always create different clusters on either side, choosing instead to let them be the same cluster.

Next time you spot one, have a look to see if there's an entity touching the VS. I've noticed this happening with trim in passages and gutters - generally long things passing through multiple portals.Also if you ever feel the need to delve into re-doing the AAS stuff - http://code.google.com/p/recastnavigation/ is well written and quite interesting to read through for other reasons too :)

Link to comment
Share on other sites

I think it would be a more useful tool if it toggled on and off by hitting the key. That way you could turn it on, walk around the map, and have a constant picture of the area near you each frame. Toggle it off when you're done.

I would rather it stayed on untill i toggled it off like you currently do with r_showportals for example.

Link to comment
Share on other sites

Next time you spot one, have a look to see if there's an entity touching the VS. I've noticed this happening with trim in passages and gutters - generally long things passing through multiple portals.Also if you ever feel the need to delve into re-doing the AAS stuff - http://code.google.c...castnavigation/ is well written and quite interesting to read through for other reasons too :)

 

I posted his a few years back, good to see this is still going strong - and now we have the source, so we might be able to plug it in. The blog is here:

 

http://digestingduck.blogspot.com/

 

and a fascinating read, too!

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I checked in a change for 1.08 so the AAS display can be toggled on/off, instead of just being painted for one second.

 

As you move around, the screen paints the AAS in your neighborhood.

 

Rather pretty to watch them appear/disappear as you move through an area. B)

Link to comment
Share on other sites

Nice one!

 

Btw, regarding the automatic reduction/removal of unreachable AAS areas: This is not as easy as it sounds, because these areas could be "reachable" by the AI via teleportation, so if we change this, we also must check all old maps (I don't think any uses this, but I could be wrong) and clearly indicate to authors that if they want AAS on an area which has no AI in it, they need to add an AAS flood fill entity.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Next time you spot one, have a look to see if there's an entity touching the VS. I've noticed this happening with trim in passages and gutters - generally long things passing through multiple portals.

 

Outpost has a large cluster that includes the top floor hallway, the stairs going down to the main floor lobby, the main floor lobby, and the stairs going down to the basement. It has 3 visportals that should break it into 4 clusters, but they don't. r_showPortals shows that these visportals open and close as expected.

 

There are no entities touching or passing through these 3 visportals.

 

That's not to say that entities couldn't cause this problem; just that this example doesn't involve entities.

Link to comment
Share on other sites

Btw, regarding the automatic reduction/removal of unreachable AAS areas: This is not as easy as it sounds, because these areas could be "reachable" by the AI via teleportation, so if we change this, we also must check all old maps (I don't think any uses this, but I could be wrong) and clearly indicate to authors that if they want AAS on an area which has no AI in it, they need to add an AAS flood fill entity.

 

I'm not advocating automatic reduction/removal. (Perhaps that's mentioned in the links provided above, but I haven't read them yet.) There may be valid reasons for AAS areas to exist, such as your teleportation example.

 

My intent here is to let mappers use this tool to identify the extraneous areas they know AI won't be using, and to use monster_clip to knock those areas out of their maps.

Link to comment
Share on other sites

I don't think it will help compile times or file sizes.

 

I monster clipped the hell out of everything in The Rift thinking less places for ai to go = smaller file size. AAS file might've gotten a little smaller but map size got noticeably larger. Mostly likely just due to more and larger brushes.

 

Most likely clipping better will just make the ai be less buggy, ie: pick better spots to run to, not try to get to spots they can't get to. Possibly not levitate up walls.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

I don't think this will reduce compile times or map load times, but it should improve pathing decisions, especially when searching.

 

And if mappers start using more elevators, it's essential to a working elevator that these extraneous AAS areas be flushed. Otherwise the pathing algorithm could end up ignoring the elevator. We have to remove a few of these areas in Saint Lucia for its 1.08 re-release so the AI can use the elevator. All other elevators in existing FMs that are usable by AI don't have Lucia's problem; they work fine.

 

I don't mean to pick on Sons of Baltona, but its levitating guard caused me to start this thread. If you noclip up near the top of its walls, you'll see hundreds of AAS areas where the guards aren't supposed to go. Beds in the house have AAS areas on them. Barrels are covered in AAS areas. While the map works fine (apart from the possibility of levitation), I have to believe that hundreds of extra AAS areas can't be a good thing.

 

If we ever rewrite the AAS compiler, we might be able to address these situations, so mappers don't have to deal with them. (Well, mappers don't have to deal with them now if they don't want to.)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 0 replies
    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
×
×
  • Create New...