Removing grass and small foliage
This guide shows how to selectively block small foliage such as grass and pebbles, which is generated at runtime for terrain
Last updated
Was this helpful?
This guide shows how to selectively block small foliage such as grass and pebbles, which is generated at runtime for terrain
Last updated
Was this helpful?
WolvenKit
MS Paint
First, find the worldTerrainMeshNode
on which the foliage resides, using RedHotTools
To make this easier, go to the settings tab of the World Inspector window, and set "Show Marker" to always
Copy the mesh path clipboard by middle-mouse-button clicking it
Now, add the mesh file to your WolvenKit project
Open the mesh file
At the top of the mesh view window, you will see a collection of "CBitMapTexture / Texture Preview" headers
Locate the CBitMapTexture
which when hovered shows the file-name ...foliage.xbm
Right click it, and select "Extract Embedded File", and chose a location to save it too (Default is fine)
This texture is used as a mask, to block foliage spawned at runtime based on various other embedded masks, appearing in certain spots
Try and figure out which part of the texture corresponds to what part of the world
Now you must figure out what part of the texture to edit, to do this try and map the texture to the game world
E.g.
Export the .xbm
using WKit's exporter, as .png
Open it in e.g. MS-Paint
Paint the parts of which you want to remove the foliage black
Make sure you use full black, and do not end up with grayscale pixels
Re-import the texture into WKit
Now, make the terrain mesh use your custom foliage mask texture, as follows:
Make sure you set the Flags of the Value
is set to Default
...foliage.xbm
MaskFoliage
of the terrain mesh' perloadLocalMaterialInstances
to point to the modified foliage mask