Announcement

Collapse
No announcement yet.

Material gradient mask on bottom of mesh

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

    Material gradient mask on bottom of mesh

    I'm trying to add a snow material at the base of the trunks of trees. The bark material is tiled, however I only want the snow buildup to show at the bottom of the mesh.

    Does anyone know how to do this?

    #2
    I would try doing it in the material if it's possible. Maybe try putting in a new parameter like "Snow" to turn on a different section in the material to add the snow. just not sure if that will work as the material is tiled. or in that section of the new parameter try to make a layer to turn off and on and have the snow on that layer your turning off and on.

    Comment


      #3
      You could do it with vertex colors. Paint all the vertices black, then just paint the bottom of the tree blue. Then in the material, use Vertex Color's blue channel to lerp from bark to snow.
      Check out Himeko Sutori, the upcoming tactical RPG where you control armies of over 100 unique characters.

      Comment


        #4
        I've found that you can set the "Address Y" to "Clamp" in the texture itself. Works nicely!

        Nathaniel3W How do you go about painting vertices? Do you mean in 3D modelling software outside of UDK?

        Cheers

        Comment


          #5
          Coldscooter you can paint the vertex color in a 3D editor or inside the UDK editor. I would recommend painting the default colors in a 3D editor and then painting individual meshes in UDK for variation.
          Check out Himeko Sutori, the upcoming tactical RPG where you control armies of over 100 unique characters.

          Comment


            #6
            Nathaniel3W Where is the vertex painting tool in UDK? This must have gone under my radar for 5 years

            Comment


              #7
              you can also take the worldposition z minus the actorposition z divided by the height of the mesh (as a param), which will give you a gradient from top to bottom on z. then multiply/bias/etc to get it at the bottom
              Follow me on Twitter!
              Developer of Elium - Prison Escape

              Comment


                #8
                Hello dude. I don't know if my idea can be of any use, however I always try to keep things as simple as possible. In my case, If I yould do snow on the bottom of trees, I would make a simple masked material with a transparent snow texture in photoshop then apply it to a simple, small and very low poly cilinder a bit wider than the bottom of the tree, and then place it at the bottom of that tree.

                Comment


                  #9
                  udkultimate That seems more complicated, as well as adding extra draw calls if you are using more materials. And adds extra geometry to the world.

                  Comment


                    #10
                    I guess it's called Mesh Painting in UDK: https://api.unrealengine.com/udk/Thr...Reference.html

                    But it's still painting RGB onto a vertex. And then your material can use the vertex color for whatever. Very useful for adding some variation to your meshes.
                    Check out Himeko Sutori, the upcoming tactical RPG where you control armies of over 100 unique characters.

                    Comment


                      #11
                      Nathaniel3W Very cool. I can see this could be very useful.

                      Comment

                      Working...
                      X