Community Forum

map.i3d, map.xml (foliages)

Forum Overview >> Editor

CategoryEditor
Created27.02.2021 02:53


Ravlie 27.02.2021 02:53
Hello,

I'm trying to understand how it works (posted by LS09God]):
<groundTypeMapping type="grass" layer="GRASS" paintableFoliageId="1" />
<groundTypeMapping type="grass2" layer="GRASS2" paintableFoliageId="2"/>
<groundTypeMapping type="grass3" layer="GRASS3" paintableFoliageId="3"/>
<groundTypeMapping type="grass4" layer="GRASS4" paintableFoliageId="4"/>
<groundTypeMapping type="grass5" layer="GRASS5" paintableFoliageId="5"/>
<groundTypeMapping type="grass6" layer="GRASS6" paintableFoliageId="7"/>
<groundTypeMapping type="grassTown" layer="GRASSTOWN" paintableFoliageId="6" />

<paintableFoliages>
<paintableFoliage id="1" layerName="grass" firstDensityMapChannel="0" numDensityMapChannels="4" value="4" />
<paintableFoliage id="2" layerName="bush01" firstDensityMapChannel="0" numDensityMapChannels="4" value="1"/>
<paintableFoliage id="3" layerName="bush01" firstDensityMapChannel="0" numDensityMapChannels="4" value="3"/>
<paintableFoliage id="4" layerName="decoFoliage" firstDensityMapChannel="0" numDensityMapChannels="4" value="5"/>
<paintableFoliage id="5" layerName="decoFoliage" firstDensityMapChannel="0" numDensityMapChannels="4" value="6"/>
<paintableFoliage id="6" layerName="decoFoliage" firstDensityMapChannel="0" numDensityMapChannels="4" value="9"/>
<paintableFoliage id="7" layerName="decoFoliage" firstDensityMapChannel="0" numDensityMapChannels="4" value="8"/>
</paintableFoliages>

<Layer name="grass01" detailMapId="41" normalMapId="42" unitSize="1.5" weightMapId="40" blendContrast="0.2" distanceMapId="4" attributes="0.208 0.11 0.056 1 2" priority="0"/>
<Layer name="grass02" detailMapId="44" normalMapId="45" unitSize="1.5" weightMapId="43" blendContrast="0.2" distanceMapId="4" attributes="0.208 0.11 0.056 1 2" priority="0"/>
<Layer name="grass03" detailMapId="47" normalMapId="48" unitSize="1.5" weightMapId="46" blendContrast="0.2" distanceMapId="4" attributes="0.208 0.11 0.056 1 2" priority="0"/>
<Layer name="grass04" detailMapId="50" normalMapId="51" unitSize="1.5" weightMapId="49" blendContrast="0.2" distanceMapId="4" attributes="0.208 0.11 0.056 1 2" priority="0"/>

<Layer name="grass02_01" detailMapId="41" normalMapId="42" unitSize="1.5" weightMapId="212" blendContrast="0.2" distanceMapId="4" attributes="0.208 0.11 0.056 1 2" priority="0"/>
<Layer name="grass02_02" detailMapId="44" normalMapId="45" unitSize="1.5" weightMapId="213" blendContrast="0.2" distanceMapId="4" attributes="0.208 0.11 0.056 1 2" priority="0"/>
<Layer name="grass02_03" detailMapId="47" normalMapId="48" unitSize="1.5" weightMapId="214" blendContrast="0.2" distanceMapId="4" attributes="0.208 0.11 0.056 1 2" priority="0"/>
<Layer name="grass02_04" detailMapId="50" normalMapId="51" unitSize="1.5" weightMapId="215" blendContrast="0.2" distanceMapId="4" attributes="0.208 0.11 0.056 1 2" priority="0"/>

<CombinedLayer name="GRASS2" layers="grass02_01;grass02_02;grass02_03;grass02_04" noiseFrequency="2"/>
<CombinedLayer name="GRASS3" layers="grass03_01;grass03_02;grass03_03;grass03_04" noiseFrequency="2"/>
<CombinedLayer name="GRASS4" layers="grass04_01;grass04_02;grass04_03;grass04_04" noiseFrequency="2"/>
<CombinedLayer name="GRASS5" layers="grass05_01;grass05_02;grass05_03;grass05_04" noiseFrequency="2"/>
<CombinedLayer name="GRASS6" layers="grass06_01;grass06_02;grass06_03;grass06_04" noiseFrequency="2"/>[/code]

This one is first:
<groundTypeMapping type="grass2" layer="GRASS2" paintableFoliageId="2"/>
"groundTypeMapping" is connected to?
"layer" I believe is connected to "CombinedLayer name" from map.i3d
"paintableFoliageId" is the number in order in which you paint in-game?

<paintableFoliage id="4" layerName="decoFoliage" firstDensityMapChannel="0" numDensityMapChannels="4" value="5"/>
"layerName" it's connected to foliage layer in GE?
"firstDensityMapChannel" no idea?
"numDensityMapChannels" again?
"value" layer state/foliage channel, how do you read it?

<Layer name="grass01" detailMapId="41" normalMapId="42" unitSize="1.5" weightMapId="40" blendContrast="0.2" distanceMapId="4" attributes="0.208 0.11 0.056 1 2" priority="0"/>
"grass01, 2, 3, 4" is sharing the same detailMapId and normalMapId as all of the 5 new layers added grass02_01 ~~~~
"weightMapId" should I just set some random number (this one doesn't share the same id number).

There's actually 11 deco foliages in GE editor but how do I read the channels?
Important: Why grass02_01~~ grass03_01~~ etc. etc. doesn't require xxx_weight.png files attached to them as well as diffuse and normal?

Important questions:
1. What happens if I do this on map I'm actually playing and there's tons of buildings in map.i3d with their IDs?
2. Do I run the map.i3d when I do these changes in GE and save the map again?
3. How do I change the images in-game so I don't see grass in all 6 layers?
4. Can I do something so in-game it will show names?

Thanks.

Bilbo Beutlin (BBeutlin) 27.02.2021 13:59
To answer some of your most important questions:

>> "groundTypeMapping" is connected to?
To the ground textures. Like in editor "terrain detail texture"
<paintableFoliages> is merely a special form of groundTypeMapping which additionally paints a certain foliage to the ground texture.
The 'paintableFoliageId' refers to the id in <paintableFoliages>. The order doesn't matter, only the id.

All values refer to map.i3d section <TerrainTransformGroup name="terrain"
The <groundTypeMapping .. layer= is the <CombinedLayer name=
The <paintableFoliage .. layerName= is the <FoliageMultiLayer> <FoliageType>
The <paintableFoliage .. value= is the type index of foliage. See for reference associated "foliage.xml".
'firstDensityMapChannel' is the bit-offset, 'numDensityMapChannels' the channel width for the density map. Notation as usual in map.i3d.

Certainly the ingame terrain paint mode does not change the original map files, only the related savegame files.
To display ingame paint mode you'll need a custom script. Some maps use such, like eg. "Ravensberg" (on ModHub). If you want to use it for distribution, ask the author.

Ravlie 28.02.2021 20:12
Okay, I got it done.

I have another question how can I change grass foliage texture so it's the same as on Ravensberg? I tried to looking for the .dds, .png files but it's pointing to FS19 original folder? I want the grass with nice flowers and textures...

Bilbo Beutlin (BBeutlin) 01.03.2021 02:21
Look into the map.xml of the "Ravensberg" map.
There is used the "decoFoliage" for flowers, weed, etc.
Also the "bush01" for different sizes of bushes.
The kind of foliage you select with <paintableFoliage .. value=..
For reference see the associated foliage xml's. Calculate the values according given bitmasks.

Of course you need all the related files also in your map folder "foliage".

Ravlie 20.03.2021 18:37
I have few more questions:
1. You can find in $data$ original FS19 folder files like: weedLOD_ba_papaverRhoeas_diffuse_H (+3 more types - sd, sm, bd) which looks like a perfect fit to use with seasons but I tried adding them in the file and whenever season changes same type of weed, flower keep appearing nothing changes, what can it be the cause?

2. Why in-game the game shows me I have to plough a field when it's painted with plough state foliage layer in GE? I mean the field is added as field in GE so it have corners and number and foliage layer (ploughed) but in-game it just randomly adds seeded, harvested, cultivated? What's wrong with this? When I delete in GE field corners and number in-game it's okay but it's says it's ploughed and also it needs to be ploughed? Any ideas?

Ravlie 20.03.2021 18:39
I have few more questions:
1. You can find in $data$ original FS19 folder files like: weedLOD_ba_papaverRhoeas_diffuse_H (+3 more types - sd, sm, bd) which looks like a perfect fit to use with seasons but I tried adding them in the file and whenever season changes same type of weed, flower keep appearing nothing changes, what can it be the cause?

2. Why in-game the game shows me I have to plough a field when it's painted with plough state foliage layer in GE? I mean the field is added as field in GE so it have corners and number and foliage layer (ploughed) but in-game it just randomly adds seeded, harvested, cultivated? What's wrong with this? When I delete in GE field corners and number in-game it's okay but it's says it's ploughed and also it needs to be ploughed? Any ideas?


Note: Log in to post. Create a new account here.