I have a landscape section that has too many layers, in the sense that the shader does not compile properly for it. Is there any way to list what layers are active on a section, or to remove individual layers and replace them with something else?
I’ve discovered that I can use Paint->Use Target Value 0 in order to remove a specific layer, but I can’t restrict it precisely to that one landscape section, I’m limited to somewhat-inaccurate tools. A list of things I’d love to see:
If you’re willing to edit your engine source, yes, this can be done hackily and easily.
In LandscapeComponent.h, add the ENGINE_API prefix to the declaration of ULandscapeComponent::GetLayerAllocationKey() (line 443 as of 4.5.1).
In LandscapeEdModeComponentTools.cpp, find FLandscapeToolStrokeSelect::Apply(). After the call to LandscapeInfo->GetComponentsInRegion(), iterate over NewComponents, outputting the result of GetLayerAllocationKey() as you go.
This will hook up the “select” tool in the terrain modifier to dump an ugly but servicable list of used layers to the console whenever you select a chunk.
Delete specific layer out of a chunk
Technically, no. But an easy workaround: choose the “paint” tool, choose the layer you want to obliterate, check “Use Target Value”, set it to 0.0, ramp the tool strength up, and start obliterating that layer. If there are spots you can’t obliterate you may need to paint a little of a different layer on top first, since it can’t delete a layer when that’s the only layer involved.
Not a clean solution, but an effective one, at least.