Jump to content
Raining6

ACSTG AI Cannot See Through Grass

Recommended Posts

                                                                                                                          ACSTG3.jpg

 

With this mod the AI will lose sight of the player if its line of sight (LOS) is obstructed by grass. Unlike with Real Engine and Dynamic Camo mods, this means you can be hidden while on tarmac, bare ground, with wrong camouflage, you can be prone, crouch or standing upright - and remain hiddenIF enemy AI's LOS to you is obstructed by grass.

 

It's been a long time coming, but it is finally in Arma 3. The mod was tested on default maps - Altis, Stratis, etc, but should work on any map that has a string "grass" in grass texture files. The first two videos below are with the Mod, the 3rd video is default Arma3 (for an easy comparison).

How it is without the mod in vanilla Arma3 right now: AI has X-ray vision through grass. It is able to spot the player through the grass and, once spotted, maintain lock despite the player being obstructed by grass and changing directions hundreds of meters away. Playing without grass is not an option (very ugly), same with short grass mods (ugly ). Being unable to disengage and use grass for cover is also boring, as is being relentlessly pinged by the omniscient AI after the first shots have been fired, and our Dynamic Camo mod/Real Engine mod cover is blown. Short/medium grass looks great in Arma 3 and allows for deeper tactics - when this grass isn't ignored by the AI that is 🙂

 

  • Move slowly and make use of LCtrl+W and LCtrl+S to gradually change your stance to carefully peek around and through the grass. Fast, abrupt movements can blow your cover.
  • All (?) AI mods are compatible with this mod, as it does not change anything in the AI logic.
  • The mod is doing quite a few calculations, but I notice no fps drop with 20 AI simultaneously swarming the player. 

 

Steam link: https://steamcommunity.com/sharedfiles/filedetails/?id=2946868556

 

PS Many thanks to @pierremgi, @johnnyboy and @EO for your great help with different bits of the mod! A separate big thanks to @Greenfist for the cool AI detection test tool! 

 

 

 

 

 

 

  • Like 9
  • Thanks 2

Share this post


Link to post
Share on other sites

Many thanks for this great mod. It has the potential to bring A3 to a new level.

 

Care to elaborate a bit more on how it is working internally?

E.g Which properties of grass are taken into account by the algorithm?

And what would be needed to extend it to other types of clutter or foliage?

  • Like 1

Share this post


Link to post
Share on other sites
16 hours ago, oldy41 said:

Many thanks for this great mod. It has the potential to bring A3 to a new level.

 

Care to elaborate a bit more on how it is working internally?

E.g Which properties of grass are taken into account by the algorithm?

And what would be needed to extend it to other types of clutter or foliage?

Thanks for the kind words. The algorithm is covered in this thread: https://forums.bohemia.net/forums/topic/241358-towards-the-ai-cant-see-through-the-grass-holy-grail/

Basically, the algo takes coords of the player and an AI enemy and then calculates the line of sight that connects them, this LOS is split into sections. It then finds heights AGL of these sections. If LOS section height is below grass height and there is grass texture at that point, an invisible roughly grass-high wall is spawned at these coords. 


Other types of clatter are often objects (unlike Altis grass, which is not an object. We had these discussions in the thread above) so there are probably better and faster ways of dealing with them. Also I found Arma 3 does a decent job with bushes and trees obscuring player. Although, I've not done too much research into clatter, I focused on the picturesque and tacticool Arma 3 grass that the game designers wanted me to turn off (or so it seems 🙂 )

  • Thanks 1

Share this post


Link to post
Share on other sites

I just replayed a small skirmish mission in Altis grassland. Before I just liked the setting, but always felt a bit cheated by Ai seeing through grass.

For missions like that the mod is really enhancing overall immersion dramatically!

Also no detectable performance impacts for me, though it was only two squads of opfor AI against two squads of mine with a single human player.

 

=> I love it! 😊

A pitty we had to play all those years without it.

And I really DO hope A4 will be better in that regard!

 

  • Like 1

Share this post


Link to post
Share on other sites
13 hours ago, oldy41 said:

I just replayed a small skirmish mission in Altis grassland. Before I just liked the setting, but always felt a bit cheated by Ai seeing through grass.

For missions like that the mod is really enhancing overall immersion dramatically!

Also no detectable performance impacts for me, though it was only two squads of opfor AI against two squads of mine with a single human player.

 

=> I love it! 😊

A pitty we had to play all those years without it.

And I really DO hope A4 will be better in that regard!

 

Doesnt this just spawn an invisible object between "player"  and AI or is it AI to AI aswell? if the latter,id imagine thered have to be a performance hit somewhere.

 

Nevertheless an amazing mod this far into Arma3's life.

  • Like 1

Share this post


Link to post
Share on other sites
12 hours ago, redarmy said:

Doesnt this just spawn an invisible object between "player"  and AI or is it AI to AI aswell?

Just the player and the enemy AI, the computation is too costly to run for all AI units (plus there would be other snags - with the current version at least).

Share this post


Link to post
Share on other sites

@Raining6:

I played around a bit more, and observed some strange things, which may or may not be related to your mod:

 

1. Is it possible, that the invisible viewblock walls interfere with the players kill statistics? Maybe bullets passing through the wall are no longer counted as belonging to the player? Recently I kill as many AI as always, but at mission end only one or two are in the score. That is not very important to me, but I am just being curious...

 

2. And is it possible, that the players UGL grenades sometimes cannot pass the viewblock walls? I have observed that when firing prone many grenades drop directly before me, though I am pretty sure that I aimed sufficiently above the ground.

 

 

 

 

Share this post


Link to post
Share on other sites

@oldy41 I have no idea about the kill statistics (what a weird bug that /is/was/would be :)), but the grenades bounce may have been an issue because of my hacky use of the disableCollisionWith and SetObjectScale functions. Apart from the grenades' issue, this also lead to a problem where the mod worked only in Eden Editor missions. I've updated the mod today with a bespoke custom made wall object that allows the mod to function in Campaign missions, and has no collision box whatsoever - so the grenades should fly freely again.

  • Thanks 1

Share this post


Link to post
Share on other sites
On 3/23/2023 at 1:16 PM, oldy41 said:

1. Is it possible, that the invisible viewblock walls interfere with the players kill statistics? Maybe bullets passing through the wall are no longer counted as belonging to the player? Recently I kill as many AI as always, but at mission end only one or two are in the score. That is not very important to me, but I am just being curious...

 

Do you use TPW Fall?  I've had kill stats come down (in SP missions I've made) after one of the recent updates.  I don't think all of the deaths actually get recorded as caused by the players now as a way to stop the random AI pop up/fall downs when they get shot.

  • Thanks 1

Share this post


Link to post
Share on other sites
21 hours ago, gatordev said:

 

Do you use TPW Fall?  I've had kill stats come down (in SP missions I've made) after one of the recent updates.  I don't think all of the deaths actually get recorded as caused by the players now as a way to stop the random AI pop up/fall downs when they get shot.

That would really explain that issue. I am a big fan of TPW_FALL and can't play without it, so I will have to live with that small slight to my ego 😁

 

  • Like 2

Share this post


Link to post
Share on other sites

Hey man, your mod was featured in a video by Viper1Zero:

He included my SOG AI mod also, which resulted in a spike of 500 subscribers in 2 days.  I bet you're seeing a nice spike also.  

  • Like 2

Share this post


Link to post
Share on other sites
On 10/17/2023 at 1:04 AM, johnnyboy said:

Hey man, your mod was featured in a video by Viper1Zero:

He included my SOG AI mod also, which resulted in a spike of 500 subscribers in 2 days.  I bet you're seeing a nice spike also.  

Howdy, it's been a while 🙂 Thanks for the heads-up, I also made a reminder to myself to try your SOG AI. The subscribers lark... I sometimes feel like I've got a new pet that needs regular attention 😂. And I've only got a couple mods (one really). Heaven knows how you manage with your little pet/script zoo of "50+ and growing" haha.

  • Haha 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×