Jump to content
Sign in to follow this  
kroni

A Little Help With Some Clutter Troubleshooting

Recommended Posts

Okay so i have created my own world, sat maps and height maps, and loaded them all into game without an error! But the main problem for me is that i cant seem to get any type of clutter working ingame. For example i load my world, after following mutliple tutorials on the subject and no grass/rocks, weed thistle what ever it may have been actually loads. Now im not 100% Which cfgs relate to clutter, so i'm just posting on what i may think might help anyone fix this issue if they have to the time to do so. Just pointing out anything that looks suspicious would be of a great help because i have read my cfg's and cpp's many times and have had no success.

Layers.CFG

class Layers
{


class kv_rock
 {
   texture = "tut\khavania\data\kv_rock_mco.paa";
   material= "tut\khavania\data\kv_rock.rvmat";
 };
class kv_sand
 {
   texture = "tut\khavania\data\kv_sand_mco.paa";
   material= "tut\khavania\data\kv_sand.rvmat";
 };
class kv_slope
 {
   texture = "tut\khavania\data\kv_slope_mco.paa";
   material= "tut\khavania\data\kv_slope.rvmat";
 };



};

class Legend
{
 picture="tut\khavania\source\mapLegend.png";
 class Colors
 {


   kv_rock[]={{196, 177, 123}};
   kv_sand[]={{220, 210, 102}};
   kv_slope[]={{228, 215, 137}};



 };
};

CFGClutter

  class KV_BrushHard: DefaultClutter
  {
   model = "ca\plants_E\Clutter\c_Brush_Hard_EP1.p3d";
   affectedByWind = 0.4;
   swLighting = 1;
   scaleMin = 0.9;
   scaleMax = 1.3;
  };
  class KV_BrushSoft: DefaultClutter
  {
   model = "ca\plants_E\Clutter\c_Brush_Soft_EP1.p3d";
   affectedByWind = 0.8;
   swLighting = 1;
   scaleMin = 0.75;
   scaleMax = 1.4;
  };
  class KV_PlantsViolet: DefaultClutter
  {
   model = "ca\plants_E\Clutter\c_Plants_Violet_EP1.p3d";
   affectedByWind = 0.7;
   swLighting = 1;
   scaleMin = 1.0;
   scaleMax = 1.25;
  };
  class KV_PlantsWhite: DefaultClutter
  {
   model = "ca\plants_E\Clutter\c_Plants_White_EP1.p3d";
   affectedByWind = 0.7;
   swLighting = 1;
   scaleMin = 0.85;
   scaleMax = 1.1;
  };
  class KV_WeedThistle: DefaultClutter
  {
   model = "ca\plants_E\Clutter\c_Weed_Thistle_EP1.p3d";
   affectedByWind = 0.7;
   swLighting = 1;
   scaleMin = 1.0;
   scaleMax = 1.25;
  };

CFGSurfaces

class CfgSurfaces 
{
class Default {};
class KhavaniasandSurface : Default
{	
	 files = "kv_sand_*";
	 rough = 0.1;
	 dust = 0.1;
	 soundEnviron = "dirt";
		 soundHit = "hard_ground";
	 character = "KV_sandClutter";
};

class KhavaniaslopeSurface : Default
{	
	 files = "kv_slope_*";
	 rough = 0.1;
	 dust = 0.1;
	 soundEnviron = "dirt";
		 soundHit = "hard_ground";
	 character = "KV_slopeClutter";
};
class KhavaniarockSurface : Default
{	
	 files = "kv_rock_*";
	 rough = 0.3;
	 dust = 0.05;
	 soundEnviron = "rock";
		 soundHit = "hard_ground";
	 character = "Empty";
};



};

class CfgSurfaceCharacters
{
class KV_sandClutter
{
 probability[] = {0.06,0.05,0.005,0.005};
 names[] = {"KV_BrushSoft","KV_BrushHard","KV_PlantsWhite","KV_WeedThistle"};
};

class KV_slopeClutter
{
 probability[] = {0.1,0.05,0.01,0.01,0.01};
 names[] = {"KV_BrushHard","KV_BrushSoft","KV_PlantsWhite","KV_WeedThistle","KV_PlantsViolet"};
};

};

Cinfig.cpp

#define _ARMA_

//Class config.bin{
class CfgPatches
{
class Khavania
{
 units[] = {"Khavania"};
 weapons[] = {};
 requiredVersion = 1.0;
 requiredAddons[] = {"Takistan"};
 version = "05/09/2011";
 fileName = "Khavania.pbo";
 author = "Hell Bound Soldier's Comunity";
 mail = "www.hellboundsoldiers.org";
};
};
class CfgWorlds
{
class CAWorld;
class Takistan: CAWorld
{
 class Grid;
 class DefaultClutter;
};
class Khavania: Takistan
{
 cutscenes[] = {"KV_Intro1"};
 description = "Khavania, A HBS production.";
 worldName = "TUT\Khavania\Khavania.wrp";
 pictureShot = "TUT\Khavania\data\kv_menu_ca.paa";
 startTime = "07:00";
 startDate = "05/03/2001";
 startWeather = 0.2;
 startFog = 0.0;
 forecastWeather = 0.6;
 forecastFog = 0.0;
 centerPosition[] = {5120,5120,500};
 seagullPos[] = {5120,5120,500};
 longitude = 65;
 latitude = -34;
 elevationOffset = 2000;
 midDetailTexture = "TUT\Khavania\data\kv_middle_mco.paa";
 minTreesInForestSquare = 2;
 minRocksInRockSquare = 2;
 ilsPosition[] = {1024,1024};
 ilsDirection[] = {0.5075,0.08,-0.8616};
 ilsTaxiIn[] = {};
 ilsTaxiOff[] = {};
 drawTaxiway = 0;
class SecondaryAirports {};
class OutsideTerrain
     {
       satellite = "TUT\Khavania\Data\kv_satout_co.paa";
       enableTerrainSynth = 1;
       class Layers
       {
         class Layer0
         {
           nopx = "TUT\Khavania\Data\kv_sand_nopx.paa";
           texture = "TUT\Khavania\Data\kv_sand_co.paa";
         };
       };
     };
 class Grid: Grid
 {
  offsetX = 0;
  offsetY = 20480;
  class Zoom1
  {
   zoomMax = 0.15;
   format = "XY";
   formatX = "000";
   formatY = "000";
   stepX = 100;
   stepY = -100;
  };
  class Zoom2
  {
   zoomMax = 0.85;
   format = "XY";
   formatX = "00";
   formatY = "00";
   stepX = 1000;
   stepY = -1000;
  };
  class Zoom3
  {
   zoomMax = 1e+030.0;
   format = "XY";
   formatX = "0";
   formatY = "0";
   stepX = 10000;
   stepY = -10000;
  };
 };
class Clutter
	{
		#include "cfgClutter.hpp"
	};
	class Names
	{
		#include "Khavania.hpp"
	};
};
};
class CfgWorldList
{
class Khavania{};
};
class CfgMissions
{
class Cutscenes
{
 class KV_Intro1
 {
  directory = "TUT\Khavania\Data\scenes\intro1.Khavania";
 };
};
};


//SURFACES
#include "cfgSurfaces.hpp"

Edited by Kroni

Share this post


Link to post
Share on other sites

Try removing the quotation marks from around the names. Also this might be from me just copying your config but make sure that last clutter name doesn't have that space in between the K and the V.

Also you can check your rpt logs and see if anything shows up in there

names[] = {"KV_BrushSoft","KV_BrushHard","KV_PlantsWhite","K V_WeedThistle"};

Edited by M1lkm8n

Share this post


Link to post
Share on other sites
Okay so i have created my own world, sat maps and height maps, and loaded them all into game without an error!

Congratulations!!! - No Mean Achievement!!! Seriously Well Done!!!

Your config files look just fine - neat and solid, and vaguely familiar ;) - no problems there as far as I can see...

Clutter is relatively straightforward...

The basic models are given classnames of your choice and a few parameters associated with them in your cfgClutter.hpp - Check!

That .hpp becomes a clutter section in your final config by being "#included" in your main config.cpp - Check!

Clutter "mixes" are defined in your cfgSurfaces.hpp "Surface Character" section, and which mix is associated with which surface is defined above that in the main Surfaces section - Check!

The whole Surfaces caboodle also becomes part of your final config via another "#include" for the cfgSurfaces.hpp - Check!

I can't see anything wrong here at all!

With a bit of luck, one of the full-on config gurus like Kju will wander by, check things over and verify that, but the fact that your terrain seems to work 100% - apart from clutter, is suspicious...

Wild Guess Time!

Did you follow my Beginners Guide? - Specifically, did you follow it all the way thru, with the Sample Files - changing my trusty Afghan Valley (AV_tag on lots of files/classes) terrain to "Khargar Valley" (KV_tag on lots of files/classes)?

Did clutter work for that?

Is THAT terrain loaded at the same time as your own one???

Waay back in the early Arma 2 days when we didn't know better, some of the earliest community terrains caused an odd effect - they "suppressed clutter" on some of BI's Default Terrains!

So - you loaded a new community terrain and suddenly Utes had no grass!

This was caused, not by "inheriting" from Utes (which is a perfectly good technique), but by using a "straight copy" of Utes's clutter definitions - complete with the "ut_" (or whatever it was) "tag" on all the classnames...

This caused a conflict which it took us ages to figure out :(

The reason I mention this is because you're using a "KV_" tag on all your clutter, and in that Beginners Guide I recommend that tag for Khargar Valley... If you made that tutorial terrain, and it's being loaded at the same time as your new project - you could conceivably be causing that old "clutter conflict" bug...

Told you it was a Wild Guess...!

PS

"K V_WeedThistle"

Well spotted by M1lkm8n there! - However, I think this might be a "forum artifact" - it's always best to use "code" tags for configs and stuff on the forums - any other kind of text runs the risk of spaces being inserted as it tries to format the text to suit the page layout.....

If there IS a space there, then fix that, definitely - though it shouldn't cause a total clutter no-show....

B

Edited by Bushlurker

Share this post


Link to post
Share on other sites

Thank you for pointing that out M1lkm8n i will change that imediatly.

And bushlurker i followed your geotypical terrains tutorial (pdf) religously. I did EVERYTHING it said, and it is by far the most in depth explanation of this process i have ever found, and i am extremly delighted to have you of all people respond in my time of need (:

A few things... I made khargar valley and renamed everything that was in red, and all the files names, just as you would expect it was real easy for me and i had not once single error, but still no clutter... so i decided to start a tottaly knew map rename evrything, made my own height map etc etc still no clutter.. i kept the prefix of KV becuase that was coincidently the initials of the knew terrain tittle i had given.. Maybe this could conflict some how? but even if it did i still recive no such clutter on the Kharghar valley map.

Sorry for my spelling and lack of in depth explanation of my problems but its quater past noon here right now, and i have been working on my terrain for well over 24hrs on/off without any winks of sleep!

P.S i put the code in a spoiler becuase the code tags werent working correctly for me my aplogies!

---------- Post added at 11:35 ---------- Previous post was at 11:17 ----------

Also another note... when i binarize my wrp to test ingame.. it tells me there is an error in Khargharvalley - config.cpp but the map is khaviana in its own folder with its own config.. so why is binpbo looking for a different config? This may not be the issue but this strange..

Edited by Kroni

Share this post


Link to post
Share on other sites

Sometimes I would get strange errors like that and after removing the temp folder in bin_temp it would work fine. Takes a bit because then you have to rebinarize everything but worth a shot.

Share this post


Link to post
Share on other sites

Just took your advice M1lkm8n into considoration re binarized and voila - http://i41.tinypic.com/2s8gtg8.jpg

Now whilst im on the subject of annoying you guys, and considering your suggestions have just magically fixed a massive problem, could you care too take another look at a question of mine?

This right here is my height map in l3dt http://i40.tinypic.com/hrd6q0.png - but as you can see in my picture above the terrain is extremley flat, now i dont know how or why. but maybe its to do with something i once vaguely remeber reading about maximum heights and pbl files? Which im not fimilar with becuase i exported and imported into vistor as XYZ file.. yet the rolling hills shown in L3DT just simply cease to exist in buldozer, or ingame for that matter. Once again thanks for all help!

Share this post


Link to post
Share on other sites

Well in l3 that blue is the water table so your terrains rolling hills are under water :)

I think there's a setting in l3 somewhere to lower the water table. I'm not at my computer now maybe bushlurker can way in there as to exactly where it is

Share this post


Link to post
Share on other sites

I see so the error is more then likely down to l3dt settings before i export, and not down to my failure to import into visotor3? Thank you for your help i will investigate further, many thanks!

Share this post


Link to post
Share on other sites

Did u run the water table function (can't remember exactly what's is called now) but its in the same drop down menu as create mask and texture mask in l3dt?

Now that I think about it if you didn't realize it and made the hills underwater you'd have to raise the entire terrain so it's not submerged.

See what bushlurker thinks. If he doesn't get back to you today ill check when I get home.

Edited by M1lkm8n

Share this post


Link to post
Share on other sites

I went into operations> Water Table > Flood water table and cleared all previous water maps and replaced it with -20 water map (if this makes any sense to you, then you deserve a medal) and imported into visitor and its still flat as a pancake.. please tell me more about this finding height automaticaly though, this may head me in correct direction thanks again milkman!

---------- Post added at 12:40 ---------- Previous post was at 12:30 ----------

I have changed around the water settings even set the water to -50 but ingame its in the same place.. is it possible its something to do with the max height being to low, or am i just getting this whole water thing completely wrong

Share this post


Link to post
Share on other sites

No my mistake. That will help with the mask and sat map generation. Read my revised post. You'll have to see if you can raise the entire terrain so it's not under water

It's strange tho because if your hills go underwater that flat area should be ocean. And since you imported it in via xzy visitor should pick that up

Edited by M1lkm8n

Share this post


Link to post
Share on other sites

I cannot find anything at all about raising the entire terrain, or even lowering the sea level i am completly lost, and its too late to even change my map name to pancake land.. hmm

Share this post


Link to post
Share on other sites
I cannot find anything at all about raising the entire terrain, or even lowering the sea level i am completly lost, and its too late to even change my map name to pancake land.. hmm

Lol. Don't fret about it. Can you throw the exported xyz up somewhere so I can check it out for you. dont panic I'm sure it's an easy fix.

Share this post


Link to post
Share on other sites

Thanks alot, ile be at work for a couple hours more anyways, if you can help me get this sorted, or if anyone could for that matter i would be extremly grateful!

Share this post


Link to post
Share on other sites

So much for my wild guess earlier then... :(

heheh... Yeah - flushing bin_temp can fix a multitude of oddities once you've binarized a few things and it's getting cluttered in there... the folder gets BIG too, so it's worth clearing the decks occasionally, even if it does cost you a little time rebinarizing the next time...

Anyhow - it's odd that your terrain appears totally flat in Visitor - I took a look at the heightmap and it loads into L3DT just fine...

It's a little.... exotically proportioned...

Currently, it's a 1024 x 1024 with 2 meter spacing. That'll make a 2x2km VERY detailed terrain!

The height values range from -239 meters to + 109 which means that currently, only about 25% of your landmass should be above water...

VertRange_zps503bc833.png

This options window in L3DT (under Operations/Heightfields) will let you mess with that...

you have minimum and maximum height values here, plus, in the histogram, you can see "0 meters" - thats Default Sea Level - here and in Visitor... Sea level stays constant at 0 meters, you can compress or expand and move your heightmap up and down just by changing the max and min figures...

First thing to realise is that with height variations of 400 m + over a 2km area - those mountains are Huge Cliffs - or should be...

Make a backup!! then try messing with these values in L3DT - for gently rolling terrain with no sea try settings like...

minimum 100m - maximum 250m

The 2 meter spacing is pretty small - bordering on dodgy FPS territory if the map itself wasn't so small at only 1024 cells... 5 meter spacing might be a better all-round beginners size - that would give you a 5.1km x 5.1km terrain using the same heightmap - it would also "stretch out" the landscape a little and allow for that greater dynamic range with the Big Hills, if that's what you're after...

Take a look at these sample heightmaps - the "Vertical range" is listed for each, plus they're that slightly larger scale 1024 x 1025 x 5 meter size...

They're provided in .png format with a matching .pbl file... It might be worth your while taking a look at those... You could try exporting your final terrain from L3DT in .png format - copy and edit one of those .pbl files to match it - try importing it into Visitor that way...

B

Edited by Bushlurker

Share this post


Link to post
Share on other sites

Hey I just looked at his config again b.

Under grid spacing he has 20480. Maybe he is trying to make the map that large but isn't exporting the xyz out of l3dt correctly.

Can you put your whole l3dt project folder up if its not to large?

Edited by M1lkm8n

Share this post


Link to post
Share on other sites

Thankyou again Mr lurker for another great in depth explanation, you seem to be rather good at them. I will try messing arround with those settings, but i have been doing so and i have had no results. Yes the map is suposed to be 20480x20480 metres wide, or atleast that was the plan, maybe exporting from l3dt is wrong, what size sould i be exporting at? for that size terrain? I think milkman is right im deffo doing something wrong when exporting. As for uploading the project folder, i didnt know i have one, all i have is the l3dt proj file its self, and that is here http://www.filedropper.com/terrain Thanks again guys, you really are saving my butt!

Share this post


Link to post
Share on other sites

I can't view that file. I think I need the entire folder. Anyway I just wanted to see why it was turning your map into flat plains. At any regard I would follow bushlurkers advice and start smaller at least until you get a terrain down pat.

If you want to see if the exporting is your problem with your height field selected click on the tab and export active map layer. When that box pops up change the fields to 2048x2048

This way you can see if that's the problem.

In visitor when you set up it up did you set the size to 2048x2048 by 10 Meter grid cells?

Then you can see if that was the problem at least.

Either way I would definitely follow bushlurkers advice. It sucks because you have to start over for a bit but it's so worth it to keep your sanity and continue learning.

Share this post


Link to post
Share on other sites

Yeah here's the thing i created the smaller map by following bush lurkers tutorial and had amazing results, its only now that i'm going bigger that i'm having the problem, I can try exporting at that size and see where it gets me. Hmm i belive i did, set it to that size with that grid cells but maybe i have it all completely wrong, i often get confused with this sort of malarkey and i'm still learning so bare with me why i try out your suggestions!

---------- Post added at 05:35 ---------- Previous post was at 05:27 ----------

the terrain grid is 2048x2048 and the cell size is 10 (m) which reusults in 20480x2480 metres size map. So if thats correct i must be exporting from l3dt incirectly..

Share this post


Link to post
Share on other sites

Dude,

send me the L3DT project, let me take a look at it too!

D

Share this post


Link to post
Share on other sites

How could i upload the whole folder? Where is located im not even sure what you mean by the L3DT project folder, i feel so stupid right now!

Share this post


Link to post
Share on other sites

so check it out, when you first open L3DT and go to File -> Open you get a dialogue box pop up with [Recent projects] in, if you click on that file once it should highlight it up and then in the Project file space near the top of the box it should show you the path to that file, send me that file.... I think that should be enough for now... it should end in ".proj"

Share this post


Link to post
Share on other sites

Thanks for working through this with me through email, it has really helped

But can anyone tell me possibly why clutter seems to work before, and then fail after importing a knew sat map?#

EDIT: This is the error i get after binerzing and then loading ingame - http://i43.tinypic.com/9uz19c.jpg

EDIT: I was silly and mised p3d on the end in the cfg... i am a rookie :(

Edited by Kroni

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
Sign in to follow this  

×