KeyCat 131 Posted June 11, 2010 (edited) Need some input/help from you config guru's! The background is this issue here and what I wan't to do is to tweak surfaceType CRForestX to behave similar to surfaceType CRGrass1, CRGrass2, CRGrassW1. I know I can tweak the camoflage value of the sniper/whatever but thats not what I wan't to do since it may skew things in other situations. Couldn't find anything related to "AI detectability" in the config under "class CfgSurfaces" so I wonder if it's possible or is this hardcoded into ArmA II? /KC Edited June 11, 2010 by KeyCat Share this post Link to post Share on other sites
KeyCat 131 Posted June 15, 2010 So I guess this is not possible to tweak and hardcoded? /KC Share this post Link to post Share on other sites
Big Dawg KS 6 Posted June 15, 2010 Where are the surface types defined? Maybe post some snippets of the surface types config. Share this post Link to post Share on other sites
KeyCat 131 Posted June 15, 2010 (edited) Grabbed from config_AllInOne_105.cpp.txt (thanks kju & Co)... class CfgSurfaces { class Default { access = 2; files = "default"; rough = 0.075; dust = 0.1; isWater = 0; friction = 0.9; restitution = 0; soundEnviron = "normalExt"; character = "Empty"; impact = "default_Mat"; }; ... class CRGrass1: Default { access = 2; files = "cr_trava1_*"; rough = 0.11; dust = 0.1; soundEnviron = "grass"; character = "CRGrassClutter"; soundHit = "soft_ground"; }; ... class CRForest1: Default { access = 2; files = "cr_les1_*"; rough = 0.2; dust = 0.2; soundEnviron = "forest"; character = "CRForestMixedClutter"; soundHit = "soft_ground"; }; class CRForest2: Default { access = 2; files = "cr_les2_*"; rough = 0.2; dust = 0.15; soundEnviron = "forest"; character = "CRForestFirClutter"; soundHit = "soft_ground"; }; ... /KC Edited June 15, 2010 by KeyCat Share this post Link to post Share on other sites
Big Dawg KS 6 Posted June 15, 2010 And how does it compare to CRGrass? My guess though would be it has to do with the clutter, and not specifically the surface type. Share this post Link to post Share on other sites
KeyCat 131 Posted June 15, 2010 (edited) And how does it compare to CRGrass? Sorry, added CRGrass1 to post above... My guess though would be it has to do with the clutter, and not specifically the surface type. The testing I previously done showed me that the number/density of actual clutter 3D models did not affect the AI's ability to detect you so I figured it must have to do with the surface type (and performance wise it may make sense) but of course I could be wrong... /KC Edited June 15, 2010 by KeyCat Share this post Link to post Share on other sites
Big Dawg KS 6 Posted June 15, 2010 Well, based on comparison of the configs, I'd say it's either the clutter, or the actual files themselves that determine it. You could always try changing CRForest types to use: character = "CRGrassClutter"; And see if it makes a difference. Share this post Link to post Share on other sites
KeyCat 131 Posted June 15, 2010 Thanks for the input BD thats one thing for me to try and see what happens... /KC Share this post Link to post Share on other sites
bushlurker 46 Posted June 18, 2010 (edited) Hi guys... That chunk of config is found in the Island Config file and is defined differently for each island, user-made islands also define these surface types (the "CR tag" you see on class and filenames says this bit's from Chernarus, Utes has a "UT" prefix, my island has "Bush_*", etc, etc... it's important that each terrain defines its own surface types and clutter, otherwise conflicts occur, as you may have seen with several island betas interfering with clutter on Utes/Cherno/whichever island the author copied the config from but didn't change the tag... As you can see above theres definitions in here for the sound the surface makes underfoot, the amount of dust which can be raised, whether its rough or smooth, soft or hard... Also defined here is the actual texture fileset which is used (eg: "files = "cr_trava1_*") and finally, the clutter "mix" (composition of which is defined elsewhere) which is associated with that particular surface (eg: character = "CRGrassClutter" - which is essentially a predefined percentage blend of various clutter objects suitable for that surface)... All surfaces basically have a texture fileset, values for the other stuff and either a specified clutter mix or no clutter at all (snow, concrete, etc)... So thats what all that stuff is and what it does... the texture is just a texture, basically - theres nowhere that I know of where its given a specific camouflage value, and the odds are against that since its one of those areas where the island maker may well use unique textures - and we certainly don't assign a "camo value" to those textures... I guess that leaves the clutter as the only possible contributory factor... I'm not sure to what extent, if at all, clutter viewblocks AI (the models are binarized so we can't look inside), but theres nothing to stop you patching in different values and seeing what happens... Theres quite a lot of different clutter models, and any particular surface may use a blend of up to 5 or 6 or more... Different clutters are used on different surfaces - eg: grass has several "grasses", some "weeds", etc, whereas forests have slightly different grass and less of it, but may also feature several different types of fern, little baby trees... mushrooms even... so forest clutter IS using mostly different clutter models than basic trava (grass), and if the clutter models DO viewblock AI, to a greater or lesser degree, then different mixes will give different levels of cover... I guess you also have to watch out for "plants" - theres a whole bunch of them too - mostly smaller than bushes.... the "sunflower" may be big and obvious, but "thistle" and "nettles" are less so, and could even be mistaken for clutter... however, they ARE definite proper place 'em one at a time objects - with all the trimmings, including viewblock, I assume... If you're lurking among "plants" in one area and "clutter" in another you're definitely gonna get different results... B Edited June 18, 2010 by Bushlurker Share this post Link to post Share on other sites
Synide 0 Posted June 18, 2010 (edited) Most of the clutter type models (be they plants or rocks) don't have ViewGeom LoDs I believe. So, consequently won't be affecting the AI's ability to see you. I've never come across a 'surface' related config entry that relates to AI being able to see you. But, things may have changed in that regard. As Bushlurker pointed out the more individualized models tend to have ViewGeom LoDs. But things like this should be easy enough for a mod team to develop their own versions of models for clutter and not rely on BIS default content. The trouble with clutter having ViewGeom's though is that there is usually a great deal of 'clutter' lying about and of varying forms. Which may impact on performance if you started adding ViewGeom to everything. But, I've never stress-tested that so it's just a opinion. So, just to clarify... ca\plants2\bush - most would have ViewGeom ca\plants2\clutter - most would not have ViewGeom ca\plants2\misc - most would ca\plants2\plant - most would ca\rocks2 - most would Edited June 19, 2010 by Synide Share this post Link to post Share on other sites
KeyCat 131 Posted June 20, 2010 (edited) Thanks for the input guys. Most of the clutter type models (be they plants or rocks) don't have ViewGeom LoDs I believe. So, consequently won't be affecting the AI's ability to see you. Thats what variuos tests have me to belive as well and I think they used another way to calculate the AI's ability to detect you while prone in the clutter. My "theory" is that the engine uses the different surfaceTypes and then somehow calculate the AI's ability to detect you. That approach would also work if you are playing with terrain detail set to very low where no grass/clutter is rendered. As an example see picture below... In above picture I use a simple mod that lower the grass height/density but I'm still able to stay undetected 9 out of 10 time if I stay completeley still - IMO as it should be since I'm in a ghillie. I did the exact same test in the woods (and even modded in 10x more clutter than normal just to test) but the AI detects me at ~40 m 100% of the time (approx. the same distance they detect you if you try to hide with ghillie on a tarmac). I personally think this is a bug and was just curious if I could find a "quickfix" myself. I've never come across a 'surface' related config entry that relates to AI being able to see you. But, things may have changed in that regard. Thats what makes me belive it is somehow hardcoded. ...Which may impact on performance if you started adding ViewGeom to everything. I guess this is the main reason why the clutter models don't have ViewGeom and handled in a more generic and "resource friendly" way. For me it really doesn't matter how it's done as long as it's convincing enough and you are able to perform somewhat realistic tactics when fighting the AI. As said before I do belive this is a bug and it looks like it will take BIS to fix it. /KC Edited June 20, 2010 by KeyCat Share this post Link to post Share on other sites
Big Dawg KS 6 Posted June 21, 2010 That approach would also work if you are playing with terrain detail set to very low where no grass/clutter is rendered. I don't think this supports your theory. Even if it's not rendered it can still play a role in AI's ability to see you in it. Thats what makes me belive it is somehow hardcoded. Based on the config there's no way it can be hardcoded. If it was hardcoded the engine would have to look for surfaceTypes with specific classnames, and since you can define the classnames as whatever you want it would seem that it can't be hardcoded. I'm still convinced that it's the type of clutter. You tested with different amounts of it, but you did not try changing which surfaceTypes use which clutter. Maybe that should be your next test. Share this post Link to post Share on other sites
KeyCat 131 Posted June 21, 2010 (edited) I don't think this supports your theory. Even if it's not rendered it can still play a role in AI's ability to see you in it. As always my "theory" is really only me guessing so I can be totally wrong of course. And if I am, it's not the first time ;) Based on the config there's no way it can be hardcoded. If it was hardcoded the engine would have to look for surfaceTypes with specific classnames, and since you can define the classnames as whatever you want it would seem that it can't be hardcoded. With hardcoded I mean that the AI's ability to spot you in the clutter is somehow tied to the surfaceType you currently are on and that specific parameter doesn't seems available via the config. I'm still convinced that it's the type of clutter. You tested with different amounts of it, but you did not try changing which surfaceTypes use which clutter. Maybe that should be your next test. I still plan to do that as soon as I recieve a free timeslot big enough, will keep you guys posted. /KC Edited June 21, 2010 by KeyCat Share this post Link to post Share on other sites
bushlurker 46 Posted June 21, 2010 (edited) With hardcoded I mean that the AI's ability to spot you in the clutter is somehow tied to the surfaceType you currently are on and that specific parameter doesn't seems available via the config. I think what Big Dawg, (and I) mean, is that - in that case - the "hardcoding" would have to have a "list of surfaceTypes" to look up... eg: Unit is standing on "Surface Type X", therefore his camo rating will be "Z" This requires the engine to "understand" the definition "Surface Type X"... What if I make a new one for an island and call it "Surface Type BagOfPeanuts" ? - how is the engine going to know what camo value to give the surface? - it isn't on it's "list", how will it know that it's actually a "Forest" type? or a "Beach"? As islandmakers - we define our own surface types - using only the config parameters we've already discussed... heres one from my current work-in-progress island... class Bush_RoughgrassSurface : Default (could be any name whatsoever) { files = "bush_roughgrass_*"; (could be pictures of my cat) rough = 0.11; (a definite engine parameter) dust = 0.1; (another definite engine parameter) soundEnviron = "grass"; (... and another) character = "Bush_RoughgrassClutter"; (a mix of clutter objects I defined elsewhere) soundHit = "soft_ground"; (another engine-specific parameter) }; Now... this is the ONLY info the engine has about this surface type - specific values for camo for this surface type can't be hardcoded into the engine - 'cause I just made it up a minute ago! How would BIS know what surfaces I'm going to define tomorrow? or next week? The engine goes with the only information it has - which are the parameters in the config... which are... What texture fileset? How rough or smooth? (eg: offroad driving) How much dust will a vehicle raise? What it sounds like when you walk on it What small clutter mix grows on it What it sounds like when you shoot it ... thats the only parameters a surfaces possesses... apart from those few params concerning sound, dust, etc... it's just a texture file... I really could use a picture of my cat, and it might look wierd, but the engine wouldn't even notice, nor would the AI... B Edited June 21, 2010 by Bushlurker Share this post Link to post Share on other sites
KeyCat 131 Posted June 21, 2010 Thanks for clarifying Bushlurker, think I understand your POV better now. Anyway upcoming test where I swap the clutter will hopefully shed some more light over it... /KC Share this post Link to post Share on other sites
bushlurker 46 Posted June 21, 2010 (edited) OK Here's a quick patch... Download : ScrewUpTheClutter.pbo You can open it up - its just a textfile inside the .pbo - and change things to your hearts content... Currently Forests are Grass, and grass is forest, but you can change 'em as you like... It'll swap all these clutters to whatever ones you set in that config - on Chernarus only - as long as its loaded.... remember to disable it afterwards! ;) Let us know what you discover!!! B Edited June 21, 2010 by Bushlurker Share this post Link to post Share on other sites
KeyCat 131 Posted June 21, 2010 Thanks for taking the time BL! Will do some tests tomorrow and let you know... Thanks again! /KC Share this post Link to post Share on other sites
KeyCat 131 Posted June 22, 2010 (edited) Test with swapped clutter made no difference at all to AI's behavior!? Test 1 - Hide_in_grass.Chernarus using forrest clutter objects ----------------------------------------------------------- 95% of the time the Russian AI squad just passes by within a meter or two and does not detect me (as it should be since I'm wearing a Ghillie suit and are lying completely still in vegetation). Test 2 - Hide_in_woods.Chernarus using grass clutter objects ----------------------------------------------------------- Doing the same procedure as above and the Russian AI squad always detects me 100% of the time at ~40 m!? Something is clearly wrong here! I think this rules out clutter 3D models having anything to do with AI's ability to detect you and my guess is still on the surfaceType, comments? Link to testmissions: http://keycat.no-ip.com/files/A2_Hide_in_clutter.zip /KC Edited June 22, 2010 by KeyCat Share this post Link to post Share on other sites
Big Dawg KS 6 Posted June 22, 2010 Two possibilities I can think of then: 1. It's defined in the config, but not in the surfaceTypes. Perhaps somewhere else that references all of the surfaceTypes. Check the entire config to see if there are any other references to the surfaceTypes. 2. It's a property of the texture files. Seems kind of an unintuitive approach, but who knows. You can try swapping the texture files around to test this. There is of course the possibility that it's not the surfaceType at all, but something else that always accompanies each of the surfaceTypes. For example, the trees in the forest. I'm not sure if the trees really make a difference, but I'm just using them as an example. Whatever it is, further testing will be needed to get to the bottom of this. Share this post Link to post Share on other sites
bushlurker 46 Posted June 23, 2010 (edited) Sadly it's not possible to simply swap the ground textures around with a patch like we did with the clutter... there might be another way... I'll ponder that awhile, but I don't really think so, since the Island Tool effectively lays out the layers during the island creation process... so what goes where is basically integral to the island... I could be wrong about that, and/or it might be possible - for testing purposes only of course - to just hack open Chernarus - physically rename the texture files themselves to "be" each other, then reassemble - and load the edited version via a modfolder - it would just overwrite the stock Cherno in memory and allow you to test... if it worked in the first place... Another suggestion.... maybe you could try your basic "now they see me, now they don't" test on a User-made Island... preferably one where the ground textures themselves are user-made, rather than just the stock BIS ones retagged, re "surface type defined" and reused... I think Podagorsk uses custom ground textures, for example... It would be interesting to see whether surfaces behave as you'd expect, or if you find similar anomalies... Just an idea... I'll ponder the cherno ground texture hacking idea further... There is of course the possibility that it's not the surfaceType at all, but something else that always accompanies each of the surfaceTypes. For example, the trees in the forest. I'm not sure if the trees really make a difference, but I'm just using them as an example. This is also a strong possibility.... It could be that theres no elusive "parameter" at all, and it's simply a quirk in the engine somewhere, or with the AI routines... something like... prone+"defined forest area"=decrease "chance of being seen" prone+multiple tree proximity=decrease "chance of being seen" or whatever... (you can tell I'm not a programmer :D) whereas what's happening is actually the opposite... ("defined forest area" IS a legitimate terrain parameter by the way - Cherno has LOTS of them, though - as far as I'm aware - they're just used to define areas where fir, or broadleaf or olive tree "symbolled areas" appear on the in-game map). B Edited June 23, 2010 by Bushlurker Share this post Link to post Share on other sites
KeyCat 131 Posted June 30, 2010 Whatever it is, further testing will be needed to get to the bottom of this. Yes, would be interesting to know the cause behind this. Another suggestion.... maybe you could try your basic "now they see me, now they don't" test on a User-made Island... preferably one where the ground textures themselves are user-made, rather than just the stock BIS ones retagged, re "surface type defined" and reused... I think Podagorsk uses custom ground textures, for example... It would be interesting to see whether surfaces behave as you'd expect, or if you find similar anomalies... I actually did discover this behavior first on Raunhofers beauitiful Thirsk island. Can't remember if Thirsk use it's own texture but will test on Podagorsk and see what happens there. This is also a strong possibility.... It could be that theres no elusive "parameter" at all, and it's simply a quirk in the engine somewhere, or with the AI routines... something like... prone+"defined forest area"=decrease "chance of being seen" prone+multiple tree proximity=decrease "chance of being seen" or whatever... (you can tell I'm not a programmer :D) whereas what's happening is actually the opposite... ("defined forest area" IS a legitimate terrain parameter by the way - Cherno has LOTS of them, though - as far as I'm aware - they're just used to define areas where fir, or broadleaf or olive tree "symbolled areas" appear on the in-game map). Time will tell I guess but as I already mentioned I think this is a bug and hopefully BIS will look into it someday. BTW, if any of you are fluid with CIT2 feel free to make a ticket there. I've tried but have issues with my browser (IE8) it seems... /KC Share this post Link to post Share on other sites