#This is PCG-framework adjacent, but I

1 messages · Page 1 of 1 (latest)

fierce bough
#

What I'm doing is using the texture backed render target mode to patch a landscape weight layer. I'm using an Editor Utility Actor with a spline, a dynamic mesh component and a landscape patch component. I use geometry script to triangulate a dynamic mesh from the spline. I then draw those triangles to the render target and stamp the landscape.

#

Step 1. Turn the spline points into a polypath, flatten to 2D and calculate bounds

#

Step 2. Get the landscape patch render target. I think 'mark dirty' is important for this, not sure.

#
  1. Create a dynamic mesh of the flattened spline path, then iterate over its polygons and fill a triangle array.
#
  1. Reposition and scale the patch so that it is slightly larger than the spline (RTmargin)
#
  1. Draw to render target and force landscape update. I also apply a blur function that I hacked out of the PCG blur material, but this isn't necessary.