Announcement

Collapse
No announcement yet.

MatLayerBlend Problem

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

    #16
    I have tried it like that. It paints fine. But when I import a landscape, the sand dunes layer doesn't appear.

    Comment


      #17
      Do you right click on the target layers and import the "splatmap"? I have my splats map broken up in to grey png's, then i did scale em to fit the landscape resolution (2033 *2033 in my case ) then i did right click import em into the target layers. But I do need to say this landscape system is a pain to work with....
      Last edited by Numbat; 10-11-2015, 02:04 PM.

      Comment


        #18
        Ok, this is going to sound like a silly suggestion but I saw something like this before when doing blending.

        Try taking each layer weight and hooking it up to a "Lerp" node into the alpha. You can leave A and B disconnected so it will be a lerp from 0 to 1. Then just hook that up to where the blend weights were. That doesn't seem like it should do anything, but I once had an issue where a tiny amount of the underlying layer was showing when I did not do that step. I will try recreating this setup later. The only other part that I was thinking is a bit strange is how you use the sand as the "bottom" layer in the final blend instead of the top, but it shouldn't really cause a problem since in theory the result is the same as if you inverted (1-x) your blend alpha... so the way you have it should work and save that 1-x instruction.
        Ryan Brucks
        Principal Technical Artist, Epic Games

        Comment


          #19
          I recreated a simplified version of your material. It has 3 layers total but I blend them the same way and using the same height blend method.
          Click image for larger version

Name:	blend1.JPG
Views:	1
Size:	84.4 KB
ID:	1091130


          I am unable to reproduce your blending issue since it seems the colors show up where expected:
          Click image for larger version

Name:	blend2.JPG
Views:	1
Size:	67.3 KB
ID:	1091131

          Looking at the primary colors in photoshop I can confirm it is not bleeding any colors between layers (but oops screenshot is in lit mode not visualize basecolor so dont try to check the above image to confirm)

          At this point I suggest:

          1) Try to reduce your example down to be simpler like mine with only 3 colors, and use only *primary* colors as debug. meaning 1,0,0 and 0,1,0 and 0,0,1.
          2) Then try turning off your height contrast by just plugging the sanddunes layer alpha straight in.
          3) I would also suggest double checking in photoshop if your worldmachine exported weights are actually 100% black and 100% white in the places you assume. Often having a non-saturated value can cause funny results. I don't think this is likely though since your non-height-blended material looked fine.
          4) If all that fails... what if you paint all your layers 100% black with an intense brush and then start one at a time painting a bit of each layer... does the problem show up the whole time or only start appearing once some layers are painted?

          My only other thought is that its the actual tiled import process that is messing up your weightmaps by normalizing them all together since it assumes you want weight blended layers. Maybe the way it does it gives a correct result only when using the landscape layer blend node but not once you modify the contrast. If so you should be able to reimport the layer weights after the initial import to bypass (i hope). I remember at once point that after each reimport it would get slightly more accurate as well due to that same issue.
          Last edited by RyanB; 10-11-2015, 06:12 PM.
          Ryan Brucks
          Principal Technical Artist, Epic Games

          Comment


            #20
            Thanks for the reply Ryan.

            Is there any chance you can fix those attachments? They don't seem to be accessible.

            I will give your previous post a try in the morning and post results when I have.

            Again, thank you so much for the continued help!

            Comment


              #21
              Thanks for clearing that up. I will have a go at setting up my material like that.

              Looking at it, the only real difference is that the last layer on mine is plugged in twice to the last MatLayerBlend.
              Whereas on yours, you have two layers plugged in to the last one.

              I assume doing it the way you suggest would mean that I wouldn't have a paintable layer for the base layer (cliff in my case).


              It's worth mentioning again, just to be completely clear. The material of mine, paints perfectly fine on a landscape. Its only when its an imported landscape.

              I've yet to give this a try, but will be doing so later today when I get a chance.


              Thanks again Ryan.

              Comment


                #22
                Right. Finally got to trying this.

                So here is the material now. Based on your last screenshot material.
                Click image for larger version

Name:	lOpgOX9.png
Views:	1
Size:	289.4 KB
ID:	1091168

                In World machine, I selected all the same areas as before, and none of the layers selected the cliff area. So, in theory it should be left untouched, and show cliff. At least that's what I expected.

                Unfortunately however it doesn't display any cliffs at all and I have to erase other layers for the cliff to then appear.

                Also, for some bizarre reason, the sand dunes layer doesnt appear to exist anywhere either. I can paint it on manually, but it doesn't appear when imported.

                Comment


                  #23
                  Originally posted by Numbat View Post
                  Do you right click on the target layers and import the "splatmap"? I have my splats map broken up in to grey png's, then i did scale em to fit the landscape resolution (2033 *2033 in my case ) then i did right click import em into the target layers. But I do need to say this landscape system is a pain to work with....
                  Not using splatmaps at all. They are completely useless when working with landscapes you want to edit in UE4. Let alone working with tiled landscapes.

                  Comment


                    #24
                    If you are importing and not seeing your cliffs, that means your other weightmaps are strong enough to cover it up.

                    And for the sand, it means your blend modulation may be a bit strong. It is expected when applying blend modulation that the apparent edge will move away from the original edge.. Try removing the modulation and plugging in the straight blend. Then you may want to consider doing an additive scalar param offset before you do the 512 contrast multiply. My guess is that the large multiplier is pushing your alpha values mostly out of range.

                    That is just the nature of height blends. You take a soft masks (which is the worldmachine layer) and then increase the contrast using some other tiling texture (the sand height). The desired goal of that is to make the blend sharp but it can mean that only a certain value shows up. You won'd be able to see a soft feint sand, you are purposefully making it all or nothing.

                    "Not using splatmaps at all."

                    Splatmaps is just a generic term for using masks inside worldmachine. Any time you render out a single erosion map technically you could refer to it as a splatmap. Typically it refers to channel packing the masks into one texture but that distinction is a bit meaningless when we are talking about landscape since you cannot channel pack the masks in a traditional way.
                    Last edited by RyanB; 10-12-2015, 12:03 PM.
                    Ryan Brucks
                    Principal Technical Artist, Epic Games

                    Comment

                    Working...
                    X