Jump to content

Recommended Posts

It could, certainly for grass surfaces because I can't think of any other way of getting them.  My main concern always with this script though will be to ensure that the script remains lightweight and not to pile things on where they don't make a significant difference. Certainly though a soldier in camo should be less easily spotted in a grass field than in the middle of a runway for example so I can see the argument for trying to add this in. After I change the script to allow other calc methods my next step will be shadows because this makes it a game changer not only for hiding beneath trees in the middle of the day but also for daylight urban issues in and out of buildings. I would probably be looking to add the terrain type after that either as a direct factor or a switch something that moderates the impacts of other factors. I do think shadows though will be a real step forward because although the general factors still work in an urban environment the shadows will deal with all sorts of stuff like being beside a shadowed wall or being in a building or in the shadow of a building. It's all on my agenda though.

  • Thanks 1

Share this post


Link to post
Share on other sites

Oh Lordy Pierre! You may have just saved me a few days work but you've given me a dilemma. He seems to have exactly what I need in that suite of functions to do the shadow test. My dilemma is that I wanted my script to be all my own work but that seems silly when there is already something on the face of it that might do the job efficiently. My problem is does that mean I would have to distribute the whole of his package with my package? How would that work if I start packaging things into an editor module because I'd have to have that in it as well if I was using his functions. I guess first thing is I need to see if I can get hold of the author and see what his views are about code reuse ( with suitable credits). That's a great find though! 

  • Like 1

Share this post


Link to post
Share on other sites

Btw guys if I don't get an update out before the weekend you can forget it until next week -  I'm a Liverpool supporter and Liverpudlian and I'm going home for the big match and whatever the result I'll be out of action Friday to Monday!  Just sose ya know.

  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites
3 hours ago, zagor64bz said:

That would be a very,VERY good start. Even 3 or 4 types would suffice: Desert/Arid, Semi-Arid, lush and Jungle. An added bonus could be snow😋 

 

 

I took a glimpse at the "surface type" @pierremgi mentioned...it returns what surface type is at the given/player position. Could that be useful? 

No, it's not. It's useless. It's inconsistent across terrains and doesn't reliably tell you anything about the place where you're standing

  • Like 2

Share this post


Link to post
Share on other sites
2 minutes ago, Tankbuster said:

No, it's not. It's useless. It's inconsistent across terrains and doesn't reliably tell you anything about the place where you're standing

I'm not an expert, but I see what's youìre saying man....  

  • Like 1

Share this post


Link to post
Share on other sites

I've had a quick look again. It might actually do for this application, though it's still imprecise. If you want a simplified idea of the colour of the ground at a position, this might well be good enough.

I spent time mapping what surfacetype there was across the island and it didn't seem helpful to me. I don't have the scripts that I used to do that any more so I can't recreate those results.

If it helps, I use selectbestplaces and getEnvSoundController to get this sort of data.

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Tankbuster, can you say a little more about those two commands in relation to this? As I recall the soundcontroller one had been the one I'd spotted previously  as potentially useful because sound is varied by the engine in response to environment surroundings and , if my memory serves ( it may not as I'm an oldie) there were terrain features accessible through the sound commands?  Select best places is also an interesting one and I hadn't thought of using that one. Roughly I suppose it would be 

X= types of places to influence camo.

 Findbestplaces  listed in x within n meters of unit

if result not zero or null then impact camo.

yes?

Share this post


Link to post
Share on other sites

I had an interesting thought last night at work, (yes i work 3rd shift 🙂

The thought or idea came to mind rather when the guy i was working with placed a rack on the floor (a steel 10ft x 4ft wide board we put freight on) with his forklift,

at the same time i had dropped a box which was somewhat heavy, normally it would make a loud metal thud sound, but you didn't hear the sound of the box i dropped because the other sound was louder.

    If we translate that in terms of killing an enemy, example you are a sniper, a loud explosion, or sound goes off in the area at a certain time, you time this and shoot your enemy, yet no one hears your shot

because...... you had used the environmental sound to mask your shot, this in other words is another form of camouflage.

 

Now this isn't a new concept, im sure most people who've played any fps shooter game understands this concept, and experienced/used it directly or indirectly,

a game that comes to mind that has this and allows you to use it is the Sniper elite game series.

Im wondering now, if this could be applicable in arma3 someway, and or would or does it work against the AI, or is the AI's hearing not like ours?

Bunc you know, anyone know for sure that something like this could work?

 

The thing is and a problem really is what sound would actually be made to mask your own shot, unless its an explosion, or a shot of another,

maybe a silenced pistol shot next to a car that is running. Its an idea but whether its worth using in terms of implementing, i mean its really a timing tactic, but whether it works or not is what im pondering.

  • Like 4

Share this post


Link to post
Share on other sites

 @Gunter Severloh   At least, your idea can enter the hall of fame for "You play too much Arma when..."

 

I'm not sure that, in term of AIs hear, you can mask a sound by another one... and what a "noise" is for them. For example, do AIs perceive thunder, environment? That's a waste of code. For players, the weather is not so much synced. You can't say that everyone will show the same thunder striking the same place. It's just an ambient weather with a rate of thunder. Is rain start/stop even synchronized? So, all environment sounds are probably... local.

For generated sounds (engines, shots, explosions), you're probably right. For a player's ear, there is a mix of all of these 3D sounds and you can probably mask a weak one by another louder, in some circumstances.

  • Like 3

Share this post


Link to post
Share on other sites

That's a really interesting idea Gunter but in general I think Arma is probably a bit "sound light". Its only really a noisy environment when there's a battle on. Following your train of thought, being in a noisy battle should make it very hard for enemy to spot you by sound . But I've no idea how I would detect a noisy battle.

 Certainly any AI firing their own weapon have their hearing detection abilities impaired arguably, and same for anyone suffering near grenade etc. There must be lots of ways to link "what's going on in the environment" to " impacts on units traits, behaviours or abilities". Another aspect that comes to mind is speed of sound transmission for a shot sound to reach a sniper distance target. They could ( maybe ) see muzzle flash if they were happening to look in the right direction but without that the first indication they would get would be a sound sometime after the shot was actually made. I've no idea if the engine already handles (or fakes) any of these types of things.

  • Like 1

Share this post


Link to post
Share on other sites
19 minutes ago, Gunter Severloh said:

If we translate that in terms of killing an enemy, example you are a sniper, a loud explosion, or sound goes off in the area at a certain time, you time this and shoot your enemy, yet no one hears your shot

because...... you had used the environmental sound to mask your shot, this in other words is another form of camouflage.

taking advantage of the environment and his sounds is a widely used tactic by the military forces in RL..so having that implemented in Arma would be a welcome addition...

20 minutes ago, Gunter Severloh said:

a game that comes to mind that has this and allows you to use it is the Sniper elite game series.

..well...THAT was pushing it over the limit, and VERY unrealistic sometimes, but the concept it's all there...

20 minutes ago, Gunter Severloh said:

Im wondering now, if this could be applicable in arma3 someway, and or would or does it work against the AI, or is the AI's hearing not like ours?

..I'm afraid you touched a sore point here...I'm not an expert, but I see AI behaving inconsistently on sound inputs...but I'm also ready for a more skilled Arma scripter to say something about it...

21 minutes ago, Gunter Severloh said:

Its an idea but whether its worth using in terms of implementing, i mean its really a timing tactic, but whether it works or not is what im pondering.

THAT will be awesome to have it in Arma. It will be a game-changer for sure! 

  • Like 2

Share this post


Link to post
Share on other sites

@Gunter: yeah no thats good stuff for immersive gameplay. Played around abit with major thunderstorms and loud trucks masking CQB movement in the Vietnam maps -was pretty cool stuff

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, pierremgi said:

At least, your idea can enter the hall of fame for "You play too much Arma when..."

Ha 😄 https://forums.bohemia.net/forums/topic/199974-youve-played-to-much-arma-when/?do=findComment&comment=3359410

2 hours ago, pierremgi said:

For generated sounds (engines, shots, explosions), you're probably right.

This is what im thinking tho, would have to do a test to determine if the AI actually didn't hear your shot while masking it with something.

So i would think the first aspect of this test would be to determine what sound that is common enough that is consistent,

that could be loud enough and used to mask a weapon firing, i mean the whole idea behind masking is to have a sound that is louder then your gun firing,

only thing that would come close would be an explosion of some sort.

 

The other thing is to see in @Greenfist AI detection tool is somehow gauge or show with icons, or numbers that the AI had, or is hearing your footsteps, shots, ect,.

that feedback alone could determine if something with sound from you is being heard/detected by the AI, this would open up a new understanding and approach to the AI if you knew what

they are capable of.

You know the meter that move on a stereo system, the lines move with the beat, and the loudness, what would be neat is something like that with the detection tool,

then you can determine at what level or how loud of a noise your making based on their response.

 

So for the masking part, you would have distance and loudness (volume) of the sound to AI, vs the distance, and loudness of the sound from you, if your sound is

muffled or not detected but the other sound is then we can be sure the AI cant hear your sound (shot).

 

So is there someway to implement a sound meter, or reading that can tell you if the AI is hearing the sound, and it would have to be gauged in a way where distance would be a major contributing factor.

Problem with this is idk if the AI's hearing is like a switch, like its either they can hear you or they cant, on or off, its not he can hear you but the sound is faint, or he can hear you,

and somewhat detects you but cant determine the side your on, or he can hear you and identify the sound and thereby turns in the sound's direction.

So i beg to ask the question is the AI's hearing on and off like that, or is it realistic where its distant based like in real life?

2 hours ago, The Real Bunc said:

But I've no idea how I would detect a noisy battle.

By responses, watch how and what to do the AI respond too.

Heres a thought, what does the AI in question hear when an enemy shoots his gun vs a friendly, how does the AI decipher whos the enemy from either of the gun shots fired?

Is it the gun's sound, like a Csat katiba vs an Nato MX rifle, they both have different sounds, but does the AI recognize the difference?

 

So when the AI actually detects a sound, like from an enemy gun what in the code is being executed, that allows, or enables the AI to respond to it in a way that it can determine if its friend or foe?

Do we determine that through the FSM, or how does that work, maybe @genesis92x @snkman who are know for their AI enhancement mods among other members can give us a better understanding in this.

 

2 hours ago, The Real Bunc said:

Certainly any AI firing their own weapon have their hearing detection abilities impaired arguably, and same for anyone suffering near grenade etc

What comes to mind here is in ACE mod you have a flash grenade that not only blinds you, but deafens you, i dont recall as its been a while if the AI are effected by this, i believe they are, but the same concept would

apply there i would think where we would want to know at what level ar, or is the AI impaired, like what happens some code goes to 0 (zero) or turns sound = false on them or something, 😄

 

Lots to think about, ideally we need to be able to measure it, once you know what the AI are capable of then you can determine how to code it so that a shot you fired during an explosion nearby is not actually

heard because the explosion sound either deafened

the AI's hearing or reduced it in terms of a drop in skill if you will to where your shot isn't even recognized, hence a masked shot.

 

In Ghost recon Wildlands, there is this grenade i forget the name dammit but it distracts the enemy AI, it makes a firecracker sound, and has a puff of smoke, which draws the AI's attention to the area of the grenade.

So a deterrent sound, a distraction of some sort to distract the AI would also be another method of "masking" provided the other sound is either louder or enough of a distraction that it forces the AI

to look in the direction of it, so mask by distraction, and not so much mask by a sound that is louder then yours.

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, Gunter Severloh said:

Heres a thought, what does the AI in question hear when an enemy shoots his gun vs a friendly, how does the AI decipher whos the enemy from either of the gun shots fired?

Is it the gun's sound, like a Csat katiba vs an Nato MX rifle, they both have different sounds, but does the AI recognize the difference?

 

So when the AI actually detects a sound, like from an enemy gun what in the code is being executed, that allows, or enables the AI to respond to it in a way that it can determine if its friend or foe?

Do we determine that through the FSM, or how does that work, maybe @genesis92x @snkman who are know for their AI enhancement mods among other members can give us a better understanding in this.

 

What comes to mind here is in ACE mod you have a flash grenade that not only blinds you, but deafens you, i dont recall as its been a while if the AI are effected by this, i believe they are, but the same concept would

apply there i would think where we would want to know at what level ar, or is the AI impaired, like what happens some code goes to 0 (zero) or turns sound = false on them or something, 😄 

 

I always remind myself that the Ai only know what the engine lets them know. So when an enemy reacts to your shot it depends entirely what information the enemy is given by the engine and whether this is really modelled or "fudged" ( I'm not against fudging BTW as imho if you can get a good useable effect with a simple method then the extra cycles for a more complex method may arguably provide little added benefit. So just for example in this specific case it could be that the engine simply passes a knows about value to the Ai when a shot by an enemy unit is made in some near region. If that knows about value was small and was passed a largish error of position as well then you end up with a result that looks to all intents and purposes like the enemy ai has heard the shot and identified the rough location of the firing unit. I'm not saying that's how its done of course. The fact that AI respond to sound arguably too accurately makes me think something like that is the case rather than anything close to modelled hearing. if it was modelled hearing you might expect detection by sound to be compromised in certain environments ( eg very hilly areas )- which I've never really seen evidence of. ( one of the lines of thought that lead me to doing this script). 

Your comment about the ACE flash grenade is interesting. If it does indeed stop you hearing for a while then clearly its possible to impact hearing. They might of course just have some method like turning of the sound but if they don't then perhaps they've some way to impact the individual units hearing, if so that makes the interesting possibility of impacting AI "hearing" by the same method.

 

It would be really interesting to find out how the engine handles the implementation of ai "hearing" and if it can be manipulated to any extent on the hearer side. My script impacts the unit "making the noise" ( ie basically making the unit quieter or harder to hear)  not the unit doing the hearing. It would be good to have access to the units hearing ability.

  • Like 1

Share this post


Link to post
Share on other sites
Quote

 

By responses, watch how and what to do the AI respond too.

Heres a thought, what does the AI in question hear when an enemy shoots his gun vs a friendly, how does the AI decipher whos the enemy from either of the gun shots fired?

Is it the gun's sound, like a Csat katiba vs an Nato MX rifle, they both have different sounds, but does the AI recognize the difference?

Well guess ARMA A.I. engine will trigger as soon as enemy side fired its weapon maybe by using some commands like getFriend which will clearly tell if 1 side is enemy or friendly to the other.

This also could be used by what i explained down below to make for example A.I. unit(s) react to enemy gunfire only.

 

Quote

So when the AI actually detects a sound, like from an enemy gun what in the code is being executed, that allows, or enables the AI to respond to it in a way that it can determine if its friend or foe?

Do we determine that through the FSM, or how does that work, maybe @genesis92x @snkman who are know for their AI enhancement mods among other members can give us a better understanding in this. 

Well this is bit of an illusion...

 

The way i do it is by adding the Event Handlers "FiredMan" to the unit(s) which fired weapon(s) should be detected / heared.

This E.H. will trigger every time the unit where it was assigned to fired its weapon(s).

 

Next you have to check all unit(s) and which are within a specific defined range to the E.H. unit.

 

All unit(s) within the defined range will be able to react to the fired shots.

 

Of course this can be made much more complex by checking different weapon types, ammo, magazines, sides, enemy, friendly and so on...

You will be able to detect / filter almost everything with it by using the right conditions.

  • Like 3

Share this post


Link to post
Share on other sites

You'll probably have to cope with the abilities of AI anyway. To me, that means playing with the disableAI parameters, what else?

Not saying you can't alter  "checkvisible" on a "sound" condition.

Share this post


Link to post
Share on other sites

Well I had a little idea and I struck gold I think.  I was trying out a remote designator secretly placed near a large group of enemy units for designating them as a target for a static MK6 mortar in my squad.  But the enemy AI always immediately spotted my Designator. So I thought, " I wonder if …" so I set the unittrait camouflage Coef to zero to see what would happen. And Lo my remote designator did become a disguised invisible designator.  This means that I could build a script that would provide dynamic camo for vehicles that would depend on whether they were in trees and perhaps by camo type(?) it also means vehicle audibleCoef can probably also be set on a vehicle dynamically. Im now wondering about guns and other stuff.  Don't forget this impacts ai to ai interaction as well. Obviously in practice I wouldn't want to be calculating cam and audcoeff constantly while vehicles are moving because movement detection overrides that anyway really . But it might be good to park a comoed tank in trees and know it was really camoed.

  • Like 1

Share this post


Link to post
Share on other sites

Set a Blufor tank with crew with you as commander right in front of a few squads of Opfor.  setUnitTrait CamouflageCoef to zero for yourself the crew AND for the tank. if your engines of and you don't move the tank they wont see you  at all. Once you open fire its a different story. So camo for tanks works and could be set dynamically. That means a proper stealth helicopter is a real thing too.

Edit : it only needs to be set for the tank. The Ai don't detect you in the tank even if camocoef isn't set for you. This is potentially good. Im now going to test windowed vehicles and see if they detect non camoed player in camoed vehicle.

Update - For open vehicles you still seem to be covered by the vehicles camo. In a Prowler Im effectively invisible to the enemy AI when in the vehicle and they spot me and shoot me when I get out.

 

Updated again - I can get in the gunners position in a prowler and take out near enemy ai and they don't see me because im still in the camoed vehicle and not moving just firing.

 

 

  • Like 1

Share this post


Link to post
Share on other sites
16 hours ago, The Real Bunc said:

Set a Blufor tank with crew with you as commander right in front of a few squads of Opfor. 

Ideally imo that would be more suitable for a tank that is approaching an area where enemy tanks or vehicles are around, tanks are like snipers, they dont need to be sitting 50m from the enemy to kill them,

they have a 1-2000m range if they can see the target, whats better is if the tank can vanish at their range after firing and while the enemy is looking but cant see them.

  • Like 2

Share this post


Link to post
Share on other sites

You may be right Gunter, but I was only doing that to test if setting camcoef worked on vehicles. And it does. In spades.  I'm trying to think through what the best approach is to offering dynamic camo for vehicles. One thing I'm sure about is that factors such as the enivironmental ones I've used in the main dynamic script will have to be toned down for vehicles. I'm thinking the main factor for vehicles should be their camo, their movement ( no dynamic camo when your moving maybe except for stealth helis?).

Distance is more complex as a factor in itself because, obviously the enemy ai may be all at different differences. I'm inclined to take an approach very similar to DynamicCamo for foot units and make it so it's about how hard a unit is to see and hear and leave the perception side of things, how well a unit hears or sees something, to a distinct script or scripts. I've tried the heli out and stealth helis defintiely do work. I flew across a Statis strewn with anti air teams. In a standard heli I was blown out the sky almost immediately. With camocoef set ( just manually) I could fly back and forth. I did eventually get shot down. I think they got fed up me taking the pi** out of them. 😂 😂 😂 

  • Haha 1

Share this post


Link to post
Share on other sites

Yes, they both use the same cloak script which essentially does a "hide object" and replaces you with a particle field for a defined time. Its an interesting and visual approach but not at all what I'm aiming for. I'm aiming to use the environment and other factors to give a real sense of your camouflage changing more realistically as conditions change and as you move from cover to cover. I would say I'm looking more to a realism script as opposed to an effect script. Don't get me wrong I'm not against effect scripts at all, they're great. Just a different type of thing. Along those lines I had an idea for a slightly different "tech" type camouflage. It would consist of a small screen that a sniper could erect in front of him. The sniper would have a small camera mounted to the rear of his helmet. The camera would relay the position behind the snipers head to the front screen. In effect it would be like looking through the sniper. I reckoned you'd have to carry extra batteries as a sniper to use this kit though because a camera and a screen really burns up the electric bill.

Share this post


Link to post
Share on other sites
56 minutes ago, The Real Bunc said:

The camera would relay the position behind the snipers head to the front screen. In effect it would be like looking through the sniper.

Nice idea, thats like a similar concept used by the military where a soldier wears like a special blanket or cover, which has special cameras if you will that takes the

background of the soldier and puts it in front of him basically making him blend in, like this:

 

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

×