I'm not on my pc so i can't give the peace of code ... But both of them are used with featureGenerator and TerrrainGenetor in CvMapGenerator.py . This is two values used for fractals to make the terrain realistic . Make one or two tests with them : More the value is high -> more the peaces of terrain of the same type or the groupement of forest for an example is little . I think you want to set them for a big sizes of map . So , just test some values to check the size of desert and forest , you will see how these values are involved . You can also take a look in my scripts at generateTerrain() and genrerateFeature() with the scripts i've added some big size of maps ( continents for an example) . I calculate the grain in function of the size ( but some tests by yourself should be easier ) .
an example : you set 40% of forest -> 40 % of the plots where you can have forest (except equator ) will have forest . The grain change the size of the forest . i don't remember the initial value or iFeatureGrain , let's say 3 . On a tiny map you will have some little forest of maximum 5*5 tiles of forest . But if you left 3 for a huge map you will have some huge forest without seperation of 50*50 , and bigger the size is , bigger the size of the forest will be . That's why there are these grainChange . this is made to unconcentrate the values of fractals (mathematical objets) .
So higher the grainChange is , smaller the section of forest or desert will be (but this does not affect the percentage of forest or desert you will have ) .
To test that , just launch a huge map (lakes is a good example to test that) , one time with FeatureGrainChange to 0 and one time with 10 . You will see the difference for the forest quickly .
Tcho !
PS : sorry , this is difficult for me to give clear explainations in english .
Sto - for having English as a second language you're doing terrific. I appreciate your effort
I thought a higher grain # would increase the clumped area. For example, on a Gigantic map a grain of 1 gave a 50 tile forest. A grain of two would give a 75 tiel forest.
But if I'm understanding your thread correctly it's the opposite. Smaller grain ona larger map equals a greater dimensions of said terrain-type?
I was experimenting with those numbers earlier tonight, on a Huge map setting. When I reduced them from 1 to 0, I noticed that I was getting larger areas of each terrain type. However I didn't really see any difference when I increased it to 2. However I didn't examine the map in great detail so the effect may have been more subtle than I noticed at the time.
I was experimenting with those numbers earlier tonight, on a Huge map setting. When I reduced them from 1 to 0, I noticed that I was getting larger areas of each terrain type. However I didn't really see any difference when I increased it to 2. However I didn't examine the map in great detail so the effect may have been more subtle than I noticed at the time.
Don't forget that what you change is not iTerrainGrain (i think 3 buy default) but iTerrainGrainChange that is added to iTerrainGrain . The fractal for terrain and for feature is used the same way . To Make a test , just change iFeatureGrainChange and look at the forest ... you will have a better result .
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.