Community Forum

Explaining mapXX.i3d lines

Forum Overview >> Editor

Created21.12.2019 22:56

Ravlie 21.12.2019 22:56

Someone able to explain few lines:
<Material name="groundDetail_mat" materialId="4" customShaderId="255">
<Material name="groundDetailHeight_mat" materialId="5" customShaderId="257">
<Material name="terrainMaterial_mat" materialId="6" customShaderId="2">

is the materialid some random number I can give to it?

I believe terrainMaterial is connected with: TerrainTransformGroup as well as groundDetail is connected with: <DetailLayer name="terrainDetail" and groundDetailHeight with: <DetailLayer name="terrainDetailHeight" since they're using the same materialId.

I'm not sure about this also:
<Layer name="animalMud01" detailMapId="177" normalMapId="178" unitSize="1.5" weightMapId="176" blendContrast="0.2" distanceMapId="4" attributes="0.155 0.082 0.037 1 1" priority="0"/>

unitsize, blendcontrast, distancemapid, attributes (most important), priority?

Someone knows the answers?

Bilbo Beutlin (BBeutlin) 22.12.2019 02:38
The material IDs are assigned in the section <material>. You can change the IDs, but then you must also change all references in the shapes.
Caution: often shapes use more than one material (ID).

attributes= [RGB color tracks,PS] [track deepness] [ID surface sound]
priority= shader pri to blend different textures
The other should be self-explanatory.

Ravlie 22.12.2019 15:10
That's all I have in <material> section:

<Material name="groundDetail_mat" materialId="4" customShaderId="255">
<Texture fileId="253"/>
<Normalmap fileId="254"/>
<CustomParameter name="dirtAndTextureUVScaleOffset" value="0.04 0.04 0.1875 0.071429"/>
<CustomParameter name="alphaBlendStartEnd" value="75 80 0 0"/>
<CustomParameter name="terrainSizeInvSizeScaleXZScaleY" value="2048 0.000488281 2 0.00389105"/>
<Material name="groundDetailHeight_mat" materialId="5" customShaderId="257">
<Texture fileId="253"/>
<Normalmap fileId="254"/>
<CustomParameter name="dirtAndTextureUVScale" value="0.04 0.04 1.6 0"/>
<CustomParameter name="alphaBlendStartEnd" value="75 80 0 0"/>
<CustomParameter name="terrainSizeInvSizeScaleXZScaleY" value="8192 0.00012207 0.5 0.00389105"/>
<Material name="terrainMaterial_mat" materialId="6" customShaderId="2">
<CustomParameter name="terrainLodBlendInfos" value="0 0 0 0"/>
<CustomParameter name="terrainSizeInvSizeScaleXZScaleY" value="0 0 0 0"/>
<CustomParameter name="terrainPatchOffset" value="0 0 0 0"/>

and what the materialId is pointing to?

It's impossible to point to these files...

<File fileId="4" filename="textures/terrain/ground/distance/acre_fine_distance_diffuse.png"/>
<File fileId="5" filename="textures/terrain/roughDirt01_diffuse.png"/>
<File fileId="6" filename="textures/terrain/roughDirt01_normal.png"/>

Not really sure how the unitSize is calculated will have to play with it in Editor.
Yes, well blendContrast is changing contrast.
distanceMapId no idea... all of the terrain files are using 4 though will have to play with this.
No idea how can I get information RGB of overall picture/material file and what's track deepness. I'm using Photoshop and GIMP. Do you really need to write any RGB information in the attributes or can we leave it 0 0 0?
Tried to look for ID sounds but no idea where can I find them... I was looking inside soundTemplates.xml and found surface sounds but there's no IDs related to them.
priority still can't understand...

Bilbo Beutlin (BBeutlin) 22.12.2019 18:11
The 'materialId' is just a number which the GE uses to assign certain materials to a shape. There you'll find eg. <Shape ... materialIds="1,2,3" what means the shape uses the materials with ID 1,2,3.
The material itself uses mostly more than one texture (or shader) file.
However changing the material IDs is in vain since the GE re-calculates and assigns them often new.
It's only useful if you want to introduce a new material by XML.

The RGB color is in Giants float format. If you want to calculate it from byte values (8bit) use the formula (RGB-value / 255) ^ 2.2
If you leave it 0,0,0 it will appear black.

The sound IDs are usually referenced in map.xml <sounds filename=...

Ravlie 29.12.2019 18:03
Do you know what this means:
Warning (performance): Texture C:/Users/Ravlie/Documents/My FS 19 Mods/FS19_xxx/maps/map/animalMud02_weight.png raw format.

Error: Terrain distance texture 'C:/Steam/steamapps/common/Farming Simulator 19/data/foliage/distance/foliage_wheat_distance2_diffuse.png' must have the same properties as the other textures
Error: Terrain distance texture 'C:/Steam/steamapps/common/Farming Simulator 19/data/foliage/distance/foliage_wheat_distance3_diffuse.png' must have the same properties as the other textures
Error: Terrain distance texture 'C:/Steam/steamapps/common/Farming Simulator 19/data/foliage/distance/foliage_wheat_distance4_diffuse.png' must have the same properties as the other textures

Bilbo Beutlin (BBeutlin) 29.12.2019 22:38
*sigh* The detailed error messages explain already what's wrong.

The "Warning (performance) .." is about inappropriate gfx format. You have a PNG file where a DDS is expected. You should convert it to DDS, eg. by a paint program.

"... must have the same properties as the other textures" means there's also something wrong with the format. Concerns mostly resolution (size), but maybe also something else. Check with a good gfx viewer or paint program by comparing with the other foliage texture files.

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