2022-02-02T06:39:00Z Updated.
Note: this applies to both terrainDetailHeight_density.gdm and cultivator_density.gdm which is used for multi terrain angle.
After you finish edits in below tutorial, GRLE converter will crash when you attempt to convert cultivator_density.gdm image. This means that yes you technically could just keep GIMP XCF source image for fields, but if at any time you need to bring GE cultivator_density edits back into GIMP... you are out of luck, it cant be done. So make sure you backup your original cultivator_densigy.png or better yet GIMP XCF image.
One example why you would need to bring GE edits back to GIMP is to patch utility pole holes into fields, or tweak some field edges which get too close to roads or buildings etc.
It is just a very bad idea to have yourself locked in this situation where you cannot freely convert GDM to PNG anymore. Advice is; don't do it.
Convert terrainDetailHeight_density.gdm to PNG using GRLE Converter.
Open TERRAIN.i3d in proper text editor and find "map/terrainDetailHeight_density.gdm", change its extension to PNG.
Then search for line: <DetailLayer name="terrainDetailHeight"
Change numDensityMapChannels="11" from 11 to 12. Then change three more values as follows.
Change compressionChannels="5" to 6.
Change combinedValuesChannels="0 5 0;5 6 0" to "0 6 0;6 6 0"
Change heightFirstChannel="5" to 6.
Save and close TERRAIN.i3d in text editor, then use GE to open TERRAIN.i3d and save it to save that PNG image to GRLE format. When done delete the PNG image.
Open TERRAIN.i3d in text editor again and change PNG to GRLE.
Go to Farming Simulator 19 install directory, in data\shaders\ you'll find groundHeightShader.xml file, copy it to your terrain directory, place it to "TERRAINROOT\maps\shaders\" directory.
Then in TERRAIN.i3d file find $data/shaders/groundHeightShader string.
Change its path from "$data/ to simply "shaders/ so this file is read from your terrains shader directory.
Next open groundHeightShader.xml in text editor, search for "../shared/groundHeightNoise.png", change "../shared/" to "$data/shared/".
Next find "globals.groundType *= 31;" and change 31 to 63.
Save the XML and close it.
Create new LUA script file with file name "modMap.lua" and place it to your terrain projects root directory. Open modMap.lua in text editor, copy paste the following there:
modMap.lua:
ModMap = {} local ModMap_mt = Class(ModMap, Mission00) function ModMap:new(baseDirectory, customMt, missionCollaborators) local mt = customMt if mt == nil then mt = ModMap_mt end local self = ModMap:superClass():new(baseDirectory, mt, missionCollaborators) self.terrainDetailHeightTypeNumChannels = self.terrainDetailHeightTypeNumChannels + 1; return self end
If you already have multi terrain angle or other features in your terrain that modMap.lua exists, then just add the following script line to it:
self.terrainDetailHeightTypeNumChannels = self.terrainDetailHeightTypeNumChannels + 1;
You can skip next step if you already have modMap.lua in your terrain, because modDesc.xml has already been edited.
Next open modDesc.xml in text editor and in <maps> property has line which says something like this:
<map id="PMC_Iowa_Garden_City_8km" className="Mission00" filename="$dataS/scripts/missions/mission00.lua" configFilename="maps/PMC_Iowa_Garden_City_8km.xml" defaultVehiclesXMLFilename="defaultVehicles.xml" defaultItemsXMLFilename="defaultItems.xml">
Change className from Mission00 to modMap and filename from $dataS/... to modMap.lua, below you see our example line with edited properties:
<map id="PMC_Iowa_Garden_City_8km" className="modMap" filename="modMap.lua" configFilename="maps/PMC_Iowa_Garden_City_8km.xml" defaultVehiclesXMLFilename="defaultVehicles.xml" defaultItemsXMLFilename="defaultItems.xml">
All done, congrats for increasing terrainDetailHeight_density