x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Is it possible to paint landscape layers from code or blueprints?

Is it possible to procedurally paint landscape layers from code or blueprints (or even from within the material)? I do not mean creating a multi-layered material using MatLayerBlend functions, but rather to actually paint the landscape layers?

This would be useful if I want to have different hardness outputs (which affect erosion calculations, no?) based on a procedural test, for better erosion simulation.

Product Version: UE 4.10
Tags:
more ▼

asked Sep 28 '16 at 12:17 AM in Rendering

avatar image

TomShirk
46 2 4 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

It's not possible to procedurally paint landscape from blueprints, but it is possible from C++, although advanced, and only from editor code (not during game, I'm afraid). There are various classes which can edit the landscape, including FLandscapeEditDataInterface.

Alternatively you can pre-generate your layers and then import them into the landscape by right-clicking on layers and choosing "import".

And yes, "hardness" from the layer info affects erosion, I apologise for the lack of documentation on this.

more ▼

answered Sep 28 '16 at 08:25 AM

avatar image TomShirk Sep 28 '16 at 01:27 PM

I figured that would be the case. So what I am thinking is a plug in that would add a delegate to each tick of sculpting, perform some processing to determine results of, say, layer deposition based on the new geometry, then use those results to call the layer painting function. Would that be doable? The class you mentioned has bupkis for documentation online; is there any online commentary documentation that'd clear up how to use that class? Any tutorials or can I get help from Epic...?

avatar image TomShirk Sep 28 '16 at 01:48 PM

My apologies... I was looking at FLandscapeDataInterface not FLandscapeEditDataInterface...that's a bit better. How would I attach my delegate function to be called after a sculpt pass? Is that possible?

avatar image Gareth Martin STAFF Sep 28 '16 at 01:51 PM

There's no easy way to do that, without modifying engine code.

avatar image TomShirk Sep 28 '16 at 01:58 PM

Thanks! So what about creating a plugin to add a new brush to the landscape tools which first calls, say, landscape hydro erosion and then calls the landscape paint to redraw the layers based on the new geometry? I want to avoid editing engine code as I am hoping to make a distributable plugin.

avatar image Gareth Martin STAFF Sep 28 '16 at 02:21 PM

Unfortunately we don't currently support custom brushes/tools from plugins. The interface is there (LandscapeToolInterface.h) but there are no register/unregister tool/brush functions.

avatar image TomShirk Sep 28 '16 at 02:28 PM

Gotcha. Thanks much, Gareth. I'll just leave this a suggested feature, then. Thanks again!

avatar image SalahAdDin Apr 18 '19 at 01:31 PM

Hi, what's about this? I'm looking for something similar: i want to paint a landscape based on procedural an other algorithms in order to get a realistic representation of a real-world location, all of this as an auxiliar to the leveling process, not to runtine gameplay.

What do you think about that?

avatar image TomShirk Apr 23 '19 at 01:55 PM

Yeah, I would love to see some script/code access to the landscape for the same reason. I think part of the issue asking such questions is there's a lot of noise from those who are looking for a runtime solution. Those of us trying to do procedurals in editor time are, I think, getting lost in the fog.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question