Landscape Blueprint Brushes - How do THEY work?

Please pardon the ICP pun.

So I was going to put this in the AnswerHub but it’s been down for two days.

What I’m trying to do is make a blueprint that will go through my level and look for assets of a given type (a house) and then paint the weightmap layer on the landscape I want altered around them (a lawn).

I already have my landscape material set up with the layers. I know I can do this manually but there’s a lot of houses in this level and there’s a lot of levels with similar tasks.

I was looking at the Landmass blueprint brushes and a whole lot of what goes into them seems to be really specific to the effects they are trying to achieve on the heightmap (such as angle blending and curling) to the point they’re a bit hard to reverse engineer, especially with crash bugs when I try to implement the paint layer functionality.

It’s easy enough for me to define a region around my asset. I don’t want or need to worry about angle blends or curling or what have you.

Defining the brush material is easy (and so far I understand it’s a simple alpha output into the emissive color output for the brush).

What I’m having trouble figuring out is how to:

  1. Target a specific landscape material paint layer’s weightmap
  2. Translate a set of world coordinates into weightmap UV cords
  3. Write that brush’s output to the weightmap

Which blueprint node is actually responsible for taking the output from the brush material and painting it onto the weightmap? And will that automatically lower the weight of other layers?

Did I put this in the wrong forum or something? I hate to be a nudge but with the answer hub down (seriously, when will that be remedied?)…

Very interessted in this, btw i love the new layer system, especially for roads

I actually got this working, and it’s so simple it’s ludicrous it hasn’t been documented yet. I don’t feel like pasting any code snippets or BP snapshots because lazy, but I’ll give you a summary.

  1. Overload the rendering function for the inherited landscape brush BP. This method is called by the underlying class (probably within the CPP since I didn’t see any calls to it in BPs) for the heightmap and each weightmap layer by name. Have a reference to a rendertarget with at least the red channel and matching the dimensions of your weightmaps. Return this weightmap as the render function result if the name matches your target layer. Easy peasy.
  2. This was the easiest. Create a rendertarget matching the dimensions of your weightmap. Create a dynamic material instance of a “brush” that will paint to the weightmap. You may need a second material to act as a “flip flop” that will combine the brush results with the current weightmap if you want to paint multiple places. Create a line trace at the world cooords. The XY results can then be combined into a color and passed into your dynamic material as the UV coords of your impact point. Voila, there’s now a “spot” at the pixel of intersection - and you can use a sphere map to make it a fuzzy circle instead of one pixel. Output that dynamic material to your weightmap. Call the landscape update function (this will trigger the render function - see answer #1). Tada. You’ve painted a layer.
  3. Same as #1