Jump to content
The Dark Mod Forums

Monsterclipping


Fidcal

Recommended Posts

I'm just collecting a few bits of info about how to do monsterclipping. Please post your confirmations, corrections, tips. I'm very busy but I'm hoping someone might then make this into a wiki article with images.

 

AI can only see worldspawn brushwork and moveables and other AI and the player so all other entities and vertical patches will obstruct them but they can't see them so will just try to moonwalk through them forever. So we surround them with worldspawn brushwork with the texture common\monsterclip.

 

Vertical monsterclip surfaces are like solid visible walls to AI

 

Horizontal surfaces are not so simple. Over or under a sloping horizontal patch it enables the AI to walk on the patch so their feet actually correctly contact the patch and it simplifies pathfinding to have one large monsterclip surface over many complex surfaces including entities (someone might care to expand this.) Other areas can be completely monsterclipped if AI cannot go there at all. I once tried making an invisible bridge from monsterclip. Didn't work. Seems to need something below.

 

Monsterclipping simplifies pathfinding and helps performance. I notice quite a few maps have monsterclipping neatly covering desks and crates etc. but that creates pathfinding on top of them (does it? anyone?) We should aim at producing a simple worldspawn maze for the AI to navigate through. So it is recommend to raise the monsterclip to the ceiling (even to the sky if outdoors.) Here are before and after shots. Note that one big monsterclip fills the far wall covering chair and chest and even the awkward corner. If an AI ever went in there he would probably get stuck anyway. If the player is there the AI can still attack him. So there seems little point in pathfinding there (confirm anyone?)

post-400-126337806216_thumb.jpg post-400-126337807992_thumb.jpg

Here's the same room from another angle. I've reduced the central pillar so you can see the oil lamp. It's easy to focus on the ground and forget that any overhead would also block AI if they are tall enough. Even a painting or banner on a wall if an AI can walk close by.

post-400-126337808736_thumb.jpg post-400-126337809767_thumb.jpg

But spot my mistake? I monsterclipped the little table but no AI can get behind in that small gap so maybe I should extend that monsterclip right back to the wall. If there were rats then I should consider that gap - maybe even let them under the table

Link to comment
Share on other sites

Yeah, that's basically how I'd do it.

 

You just have to look at it in very simple terms. If it's something the AI can snag on, clip it. I'd take that table one all the way back and probably fill the nook with the banner too. It's only about a foot deep or so, so whether an AI can get in there doesn't really matter, they still could fight the player. I assume their arms could probably reach through and swing a sword, they just think they can't walk there.

 

Here's my dining room. I made a cube around the table then cropped the corners so they were as close as possible to the table/chairs. The chairs stick out a little, and AI 'might' get caught on them, but they are moveables so hopefully not. Still it's better than no clip at all imo.

I also clipped the corners where the lamps are, just rounding out the room a bit.

 

post-1981-126341437003_thumb.jpg

 

Another thing you can do is put clip in doorways to make them thinner, or around corners of hallways to make them thicker. This makes the AI walk closer to center of doorway, or away from wall when rounding corners.

It simplifies the patrol routes becuase you don't need to put a path_corner in every doorway, at every corner.

post-1981-126341437325_thumb.jpg

in that pic there is the world spawn doorway, the doorway with an object, the doorway with monster clip. Without the clip the AI's center point will aim for the straightest path, which is actually through the doorframe trim model. Will lead to 'scraping'. The green lines indicate where the Ai will aim to get through due to the monster clip. They still might scrape a little, but it will be more like a shoulder bump, not 'I'm dumb and trying to push right through the wood frame'. I like to make it a little smaller than the wood area so there's some extra clearance.

 

Typically TDM AI behave exactly like T2 AI in pathing. They patrol from one point to the next in as straight a line as possible. So if you don't put path corners at each corner they will 'scrape' along a wall to take the shortest path. Looks pretty bad.

Not too big of a deal if you plan out paths and the AI never chase the player off the path, but I like random patrols and it gets really complicated to have random patrols without them scraping walls.

If you monster clip corners good you can have 3 random points and the ai will never scrape getting to them.

post-1981-126341437525_thumb.jpg

 

this pic shows (blue line) how an Ai would try to get from point A to B without clip. His center line (ie:nose) will aim for the straightest line, which leaves his shoulders (those things sticking out past his circular head) aimed for the corners. Most likely he'll bump the corner, scrape a bit, then get around corner only to do it again on the next corner.

Putting clip in the doorway and at the corner makes him swing wide. His shoulders will probably pass through the clip a bit, but that'll look like airspace to the player, so it'll make the guard look smart enough to not run into the wall. (stupid guards).

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Monsterclipping simplifies pathfinding and helps performance. I notice quite a few maps have monsterclipping neatly covering desks and crates etc. but that creates pathfinding on top of them (does it? anyone?)

Yes, It is true that a pathfinding (AAS) area is generated on top of monsterclip brushes. But the AI pathfinding code is still smart enough to avoid blocks of monsterclip, whether it's as tall as the ceiling or only as tall as the furniture.

 

By raising all those monsterclip brushes up to the ceiling, you will just not generate that redundant AAS area. This can reduce the file size of your mapname.aas**. There really is no significant performance difference while playing. The smaller .aas** file may make load/save times slightly faster, if anything.

 

It's only about a foot deep or so, so whether an AI can get in there doesn't really matter, they still could fight the player. I assume their arms could probably reach through and swing a sword, they just think they can't walk there.

This sometimes requires testing. If the player walks too far into a monsterclip brush, the AI will think that you're inaccessible, as if you're behind glass. (And he might even start throwing stuff at you.)

yay seuss crease touss dome in ouss nose tair

Link to comment
Share on other sites

True, it all needs tested in game, but you gotta figure the player is simple a 2x2 foot cube. So if the player is inside a 1 foot clip area, half of him still sticks out. Anyway, that's my theory. If an Ai started throwing bottles in game I would deffinately make that clip smaller.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Another thing worth mentioning is that without monsterclip a room might look spacious and the AI can walk freely around. But it can be deceptive especially with angled furniture that slopes away. Humanly we only need room for our lower legs to get past a low stool next to a chair. Sometimes we sway and bend to get past obstacles. But after monster clipping you can suddenly realize that the AI can't get around at all. After monsterclipping I sometimes move furniture and monsterclip a little to give them some space to get through. Probably need a block to represent an AI to tell if he can get through.

 

A completely separate tip: Try as far as possible to let the player get between gaps between furniture and posts and walls etc. Better to have no gap than a 'nearly-wide enough' gap that the player tries to get through (and knows he could in RL) but it just obstructs so he has to go another way. Or even climb over furniture because the gap is 1 unit too small around his 33 unit wide ankles. :D (I've always wished the player could be narrower front to back; seems it might be cool to slip sideways through some narrow gaps.)

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

      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.
      · 2 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...