I’m trying to create procedural trails/paths using PCG - I’ve managed to use pathfinding to create a path between points A and B, then the landscape is deformed using the landscape patch. My next step is to (try) apply my dirt layer from the landscape mat to the path.
Currently I am able to see the Layer as an attribute and add to that attribute, however, I’m not sure how to visually update the landscape.
Just wondering if anyone else has managed this? and if so any chance of getting some help?
I am not aware of any method of modifying the landscape using PCG. I’ve tried with Landscape Blueprint Brushes, but I am not sure what type of modifications you are doing on it by using PCG.
From what you’ve done it seems that you’ve managed to modify the height and now trying with the weight? If you are using Landscape Patch it might be a landscape patch question rather than a PCG question.
Yeah basically, I have 2 graphs - one is using the pathfinding node to generate a spline from point A to B that avoids slopes, the second is spawning landscape circle patches along the spline to deform the landscape down within the spline boundaries.
I update the Landscape layer attribute for layer2 (soil) from its current weight to a value of 1 within the area of the pathfinding spline (the values in the screenshot).
Just need that attrib update to be applied to the landscape and show the soil layer along the path
“it might be a landscape patch question rather than a PCG question”
Understood. I am looking for a non-destructive way to modify the terrain splatmap/weightmap
for ages (I have a partly gen terrain in WM) and I can say that I haven’t found anything relevant.
Apply both the terrain paint (because afterall if you are using that s*it you need the physical material response off of it) and decals.
In the more sane case in which you switch to using static meshes, you peobably need to still apply some sort of paint dynamically. You can likely do that via render target and still come out on top.
Re the simple question of how you modify the landacape.
Unless they meesed the engine up (which they did, so…) beyond all hope, a spline will suffice.
Go from the pcg to a spline, then from the spline via a quick bluetility call (look it up if lost) and apply the terrain deformation from the spline.
If your spline has wide enough turns it’ll work and look OK. If your turns and details are below a 1m resolution range it wont look too hot.
In that case, just make meshes instead of having to make meshes anyway later for performance reasons…
However, because you are enforced to use a Landscape Edit Layer the problem mentioned in my post still persists, because for some reason the Edit Layers can’t paint the weight fully.
If you find a workaround, please let me know since it would also solve my problem with the terrain editing. Many thanks!
I have no idea if that would work. Let me see if I can make it to also remove the current weight… but I can’t see how that’s possible with Landscape Edit Layers.
Edit: I did not manage to remove the Grass from below to purely add my Earth on top, so that there’s a clean blend. The mentioned solution with terrain-blend splines seems the best approach at the moment.
Edit 2: It still seems to me there’s a layer bug in the landscape, somewhere in the ‘ULandscapeEditLayerBase’ class or some class that composes those layers to obtain the final weightmap. Trying to look through the code on the layer combination part if I might find any problem there.
Edit 3: The problem seems to be related to the GPU blending of the layer weights, located in the shader: ‘/Engine/Private/Landscape/LandscapeEditLayersWeightmaps.usf’(FLandscapeEditLayersWeightmapsMergeEditLayerPS class) however, I do believe that I would require a confirmation before opening a ticket.