Announcement

Collapse
No announcement yet.

Q: Procedural Terrain Material + Clutter Layer Masks?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Q: Procedural Terrain Material + Clutter Layer Masks?

    Hi,

    I'm trying to figure out a way to generate masks from a procedurally drawn landscape material to use with clutter layers.

    If I'm correct on how clutter layers work, I need to somehow screenshot my landscape with the procedurally drawn terrain, using black and white masks that I can lerp over the heightmap of the terrain to create a mask that I can save (somehow). If I can figure out a way to do that, then I can setup a traditional "paintable" landscape material and then import the mask into each paint layer to have the engine fill in that specific landscape layer based on the imported mask. Then I can use that info layer mask to setup the clutter layers.

    Anyone have any ideas? Perhaps I'm missing something simple and over complicating things for myself as I have a tendency to do so.

  • #2
    Do you mean "foliage" when you say "clutter layers"? A clutter layer is simply applied to an entire area where a certain material is applied.
    Here is a video showing the process of adding clutter layers .

    Comment


    • #3
      Yup the clutter layers are based on the masks that you create by painting on a landscape blend layer. Not quite was I was asking though.

      If you create a material that auto selects which textures you want to use based on terrain height and slope, then as far as I know so far there's no way to auto generate the landscape shared info layer id. In current UE4 there's a grass tool that pretty much does the same that clutter layers do, but since those are accessible via material nodes it allows you generate procedural masks to plug into the grass tool node.

      I did find a few work around, but it's a bit hackish. If I create a landscape layer node for each type of clutter that I want, I can then insert my procedural layer into each of those layers which allows you to visually paint on just clutter as if it were done via the foliage tool. After you're done painting on the clutter you can unplug (but don't delete) the landscape blend layer node inputs and just simply bypass them. The engine will still remember where those layers were painted and you can still access the layer ids to use w

      Comment


      • #4
        The version of UE4 these guys are using doesn't allow you to use foliage layer masks, unfortunately. You have to paint by hand.

        Comment


        • #5
          Originally posted by ambershee View Post
          The version of UE4 these guys are using doesn't allow you to use foliage layer masks, unfortunately. You have to paint by hand.
          Sort of. In terms of foliage you're correct as far as I know, though that could possibly be worked around via creative blutility use. How good the blutilities work in UE 4.5 is probably another discussion as they barely work in the current versions lol.

          I'm talking about "clutter" though, which is essentially Ark's version of the Grass Tool. Clutter is bound by the landscape paint layer. If you read the last paragraph of my previous reply you'll see that you can fake the paint layer to create a mask by plugging in a layer (inside the material), painting with said layer, then unplugging the layer again (but don't delete the layer). This gives you a mask that you can use for your clutter layer.

          None the less after some testing with my procedural landscape material (basically a LAM type material based on height / slope / masks) the shader complexity started growing rather fast. With 3 - 4 layers the landscape is already in the red.

          Now I'm back to trying to figure out how to create masks (splatmaps more or less) from my procedural landscape material to basically create traditional landscape paint layers that I can import into the landscape. I tried to get the SceneCapture2D to work as stated by the user named "plastictrash" in UE4 16.2 https://forums.unrealengine.com/show...olor-for-grass but have had no success yet (it doesn't do anything so obviously I have the camera or rendertarget set up incorrectly).

          Do you happen to have any experience using SceneCapture2D to create a texture from an orthoviewed landscape?

          The funny part is that in this time I probably could have sculpted and painted an entire landscape by now. However I find high value in figuring out a way to auto paint landscape layers efficiently. I've already scrapped 1 landscape due to scaling being way off.

          I'm 100% certain that what I'm currently attempting to do is possible, I'm just mucking up the process

          [edit: I figured it out. The link I referenced above works perfectly fine .... when I was viewing the generated texture I had the alpha channel enabled so the texture was showing up blank. I'm so noob sometimes lol. I'll try to post a tutorial somewhere when I get the exact workflow completed.)
          Last edited by axenation; 07-23-2017, 01:55 AM.

          Comment

          Working...
          X