jens198 0 Posted June 10, 2012 (edited) Hi guys, please take a look at clutter configs and tell me if this is as it's supposed to be or if I'm doing anything wrong here 1. Ingame This is how my test-clutter looks right now ingame Everything's in a neat row. Nice, isn't it? But this is the US Army NTC in California and NOT Her Majesty the Queen's garden!! 2. Background data 2.1 cfgClutter.hpp class j198_ntc_2012_ForestFern: DefaultClutter { model=ca\plants2\clutter\c_fern.p3d; affectedByWind = 0.2; swLighting = true; scaleMin = 0.2; scaleMax = 0.9; }; class j198_ntc_2012_betulaHumilis: DefaultClutter { model=ca\plants2\bush\b_betulaHumilis.p3d; affectedByWind = 0.1; swLighting = true; scaleMin = 0.2; scaleMax = 0.8; }; 2.2 cfgSurfaces.hpp class CfgSurfaces { class Default {}; class j198_ntc_2012_cyanSurface : Default { files = "j198_ntc_2012_cyan_*"; rough = 0.1; dust = 0.1; soundEnviron = "sand"; character = "j198_ntc_2012_cyanClutter"; }; class j198_ntc_2012_whiteSurface : Default { files = "j198_ntc_2012_white_*"; rough = 0.5; dust = 0.8; soundEnviron = "sand"; character = "j198_ntc_2012_whiteClutter"; }; class j198_ntc_2012_greySurface : Default { files = "j198_ntc_2012_grey_*"; rough = 0.2; dust = 0.3; soundEnviron = "sand"; character = "j198_ntc_2012_greyClutter"; }; class j198_ntc_2012_brownSurface : Default { files = "j198_ntc_2012_brown_*"; rough = 0.1; dust = 0.1; soundEnviron = "sand"; character = "j198_ntc_2012_brownClutter"; }; }; class CfgSurfaceCharacters { class j198_ntc_2012_cyanClutter { probability[]={}; names[]={}; }; class j198_ntc_2012_whiteClutter { probability[]={0.01, 0.01}; names[]={"j198_ntc_2012_ForestFern", "j198_ntc_2012_betulaHumilis"}; }; class j198_ntc_2012_greyClutter { probability[]={}; names[]={}; }; class j198_ntc_2012_brownClutter { probability[]={}; names[]={}; }; }; 2.3 config.cpp class CfgPatches { class j198_ntc_2012 { units[] = {j198_ntc_2012}; weapons[] = {}; requiredVersion = 1.03; requiredAddons[] = {"Utes"}; version = "2012-05-29"; fileName = "j198_ntc_2012.pbo"; author = "j198"; mail = "j198@googlemail.com"; }; }; //--------------------------------------------------------------------------------------- class CfgWorlds { class CAWorld; class Utes: CAWorld { class Grid; clutterDist = 290; clutterGrid = 2; noDetailDist = 40; fullDetailDist = 15; class DefaultClutter { scaleMin = 0.9; scaleMax = 1.4; }; }; class j198_ntc_2012: Utes { description = "Ft. Irwin - US Army National Training Center (NTC)"; worldName= "\j198\j198_ntc_2012\j198_ntc_2012.wrp"; pictureShot = "\j198\j198_ntc_2012\data\j198_ntc_2012_Picture_ca.paa"; centerPosition[] = {2720,2462,500}; seagullPos[] = {2720,2462,500}; longitude = 30; // positive is east, in degrees? latitude = -45; // positive is south, in degrees? drawTaxiway=false; class Clutter { #include "cfgClutter.hpp" }; class Names { #include "j198_ntc_2012.hpp" }; }; }; //--------------------------------------------------------------------------------------- class CfgWorldList { class j198_ntc_2012 {}; }; //--------------------------------------------------------------------------------------- class CfgMissions { class Cutscenes { class j198_ntc_2012Intro { directory = "j198\j198_ntc_2012\data\scenes\Intro.j198_ntc_2012"; }; }; }; //--------------------------------------------------------------------------------------- #include "cfgSurfaces.hpp" 2.4 layers.cfg class Layers { class j198_ntc_2012_cyan { texture="j198\j198_ntc_2012\Data\j198_ntc_2012_cyan_tk_hlina_mco.paa"; material="j198\j198_ntc_2012\Data\j198_ntc_2012_cyan_tk_hlina.rvmat"; }; class j198_ntc_2012_white { texture="j198\j198_ntc_2012\Data\j198_ntc_2012_white_tk_polopoust_mco.paa"; material="j198\j198_ntc_2012\Data\j198_ntc_2012_white_tk_polopoust.rvmat"; }; class j198_ntc_2012_grey { texture="j198\j198_ntc_2012\Data\j198_ntc_2012_grey_tk_valouny_mco.paa"; material="j198\j198_ntc_2012\Data\j198_ntc_2012_grey_tk_valouny.rvmat"; }; class j198_ntc_2012_brown { texture="j198\j198_ntc_2012\Data\j198_ntc_2012_brown_tk_trava_mco.paa"; material="j198\j198_ntc_2012\Data\j198_ntc_2012_brown_tk_trava.rvmat"; }; }; class Legend { picture="j198\j198_ntc_2012\source\mapLegend.png"; class Colors { j198_ntc_2012_cyan[]={{212,196,194}}; // hellbraun - wüste j198_ntc_2012_white[]={{227,232,230}}; // weiß - strassen j198_ntc_2012_grey[]={{174,187,194}}; // grün - vegetation j198_ntc_2012_brown[]={{97,104,100}}; // braun - verteilt }; }; satelliteMap="sat_lco.png"; layerMask="mask_lco.png"; //rvmatBinary=true; rvmatBinary=false; 2.5. mask_lco.png (cut out part of it) I know all the background stuff on the config files from the tutorials, but no matter what I do, I always end up with these stupid hedgerows. Of course, the mask_lco in that area is only made of a single color. Maybe the probability (if a certain clutter-p3d show up in a certain spot or not) is only determined once? Maybe someone can give me some config files, hints or explain how exactly how this works. I'll go to bed now ... Jens Edited June 10, 2012 by jens198 typo Share this post Link to post Share on other sites
mugaben 10 Posted June 10, 2012 (edited) Hi Jens. It looks like theres a lot of colors on that mask in total? The whole mask_lco.png needs only to be the colors that the game needs. For instance if you where only to have grass and sand you would have green for the grass and yellow for sand and NO other colors. There must be nothing else than those two exact colors on that picture. If colors are fading when you are zoomed in, there will be alot of different colors in total. I allways check by changing my picture to Index Color. My photoshop is in danish, but directly translated I choose "Exact" in the first drop down, and "Forced = None" in the next. It shows me exactly how many colors there is on the picture. Edit: Why can I only see what appears to be betulaHumilis in that picture and not the "forestfern"? Are forestfern to small to be seen on the picture? Either way, they should appear in the same amount that betulahuilis when their probability is the same. Edited June 10, 2012 by MugAben Share this post Link to post Share on other sites
jens198 0 Posted June 11, 2012 Hi Jens. It looks like theres a lot of colors on that mask in total?The whole mask_lco.png needs only to be the colors that the game needs. For instance if you where only to have grass and sand you would have green for the grass and yellow for sand and NO other colors. There must be nothing else than those two exact colors on that picture. If colors are fading when you are zoomed in, there will be alot of different colors in total. I allways check by changing my picture to Index Color. My photoshop is in danish, but directly translated I choose "Exact" in the first drop down, and "Forced = None" in the next. It shows me exactly how many colors there is on the picture. Edit: Why can I only see what appears to be betulaHumilis in that picture and not the "forestfern"? Are forestfern to small to be seen on the picture? Either way, they should appear in the same amount that betulahuilis when their probability is the same. The total number of unique colors in the mask_co is 4 (and I plan to use four different types of clutter) every "betulaHumilis" has a "forestfern" right by his side, but they are hard to see in the screenshot Jens Share this post Link to post Share on other sites
bushlurker 46 Posted June 11, 2012 (edited) class j198_ntc_2012_whiteClutter { probability[]={0.01, 0.01}; Try turning these probabilities up a little... they're awfully low... Try probability[]={0.45, 0.45}; don't change anything else... rebinarize and see what it looks like ingame.... P.S... Technically, it's not strictly necessary to only have the exact number of colours on the mask... when you import, Visitor will interpret any colour it finds - which isn't defined in layers.cfg, as one or the other of the colours which are defined in layers.cfg... it'll use the "next nearest colour" - according to the "mapLegend.png"... In practise however, it's usually safer to limit the palette to the colours you want... Visitors "interpretations" of what texture goes where may not be what you intended... For a full explanation of what mapLegend does, see this post B Edited June 11, 2012 by Bushlurker Share this post Link to post Share on other sites
jens198 0 Posted June 12, 2012 class j198_ntc_2012_whiteClutter { probability[]={0.01, 0.01}; Try turning these probabilities up a little... they're awfully low... Try probability[]={0.45, 0.45}; don't change anything else... rebinarize and see what it looks like ingame.... With a 0.45 setting it looks something like this: I even did some experiments with mask_lcos with more than 4 colors, but I always get these rows of clutter. BTW: What is a good/normal setting for these variables: clutterDist / clutterGrid Jens Share this post Link to post Share on other sites
bushlurker 46 Posted June 12, 2012 Looks better and more random up close now.... thats good. It only starts to get repetitive in the distance... You're right... you have the clutter showing out to too far a range... for fps purposes if nothing else its better to limit the clutter distance a little.... Try... clutterGrid = 1.0; clutterDist = 125; again - just change that and nothing else - rebinarize and have another look... B Share this post Link to post Share on other sites
bushlurker 46 Posted June 17, 2012 :) Sorted! - and looking good! B Share this post Link to post Share on other sites
.kju 3245 Posted June 18, 2012 Dont set values in Utes class. Only base class definitions for inheritance are allowed in there. Share this post Link to post Share on other sites
jens198 0 Posted June 18, 2012 What was it? reduced clutterGrid and clutterDist increased the number of different "names" in the class "CfgSurfaceCharacters" (cfgSurfaces.hpp) reworked the mask_lco.png @PvPscene: You're saying, that I should inherit my own class from utes and set the values here? Something like this? class CfgWorlds { class CAWorld; class Utes: CAWorld class j198_ntc_2012:Utes { class Grid; clutterDist = 125; clutterGrid = 1.0; noDetailDist = 40; . . . Jens Share this post Link to post Share on other sites