How to correctly update LandmassBrush?

Hy there,

the last days I´ve been using the landmass plugin and everything is working quite nicely.
Everything but updating the spline, and I think I may be missing some concepts of the engine here. Let’s consider using the standard LandmassCusomBrush and an editor widget in this regard. No runtime update needed.

(1) It starts with spawning a brush using the SpawnActor-node, which will spawn a brush but never update the landscape. This is except you are in landscape-mode, then it will work.

(2) to avoid this I placed a brush in the level and used my widget to update the attributes of it. Calling the given “RequestLandscapeUpdate”-node will set the attributes and also update the landscape. I.e. the “falloff” will change on click.

Except this will not update the shape of the landscape defined by the spline. If I add a new spline point, I have to select the brush in the editor and move it just a litte for it to show the updated shape. Workarounds like changing the actor location will not have the same effect.
But even better: There is an exception to this exception right after I started the editor. In this case the first time I use the widget it will automatically update the shape. Every click after that will only add a new point without updating it.


I also tried some given functions like forceUpdate, updateSpline etc. but those functions do not seem to have an effect. If I add/ reposition a point on the spline in the editor it will of course update.

So I have a few questions:

(1) Is there a way to spawn a brush using a function outside landscape mode? Are there update nodes for the landscape I´m not aware of?

(2) What am I missing here? Which functions are called when I select&reposition the brush in the editor? Does anybody have an idea why the first execution of the widged and the repositioning will work, while the following executions or repositioning the actor using a function won´t?

The dev-talks and tutorials I found seem to skip/not have this problem or just go with the editor repositioning workaround. And the incoherent results described above do make me wonder if the solution is updating the brush correctly or somewhere outside the brush BP in the engine, so to speak.

greetings

1 Like

It sounds like the landscape update isn’t fully triggered when modifying the spline via script. You might need to manually call RequestSplineUpdate or Invalidate on the brush component. Also, try forcing a full landscape regeneration by toggling visibility or reattaching the brush.

But what do you mean by that?
My last resort (ChatGPT) also told me to do that, yet toggling the visibility is not working and would be quite like repositioning it. Invalidation of the brush does not work either. And I already tried to call the updateSpline function as I mentioned.