Announcement

Collapse
No announcement yet.

Foliage color variation

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

    Foliage color variation

    Hi there,

    For instance we have a grass patch placed all over an area, and we'd want to apply some sort of color/luminance variation on them. Not per grass or patch but for example the way we make variation into landscape surface using a macro texture. We can change intensity, scale etc. of the applied variation easily.

    http://8pic.ir/images/qhzqb39b9j3eduu79kz8.jpg

    To explain what I mean more simpler:

    Grass without variation
    http://8pic.ir/images/iqtxr9vcdiul6vpd5882.jpg

    Grass with a cloud texture overlayd on top of the screenshot
    http://8pic.ir/images/smkq2ilcokxplwsyvnep.jpg

    Can we do this to painted foliage via the material/shader ? probably based on world space or something?
    Artstation
    Join the support channel
    Gumroad Store

    #2
    Just overlay a color map with a landscape coordinate set to the size of your landscape.

    Comment


      #3
      If this is what you mean it applies the variation to a single (bush in my case) and the same bush with the same look is everywhere. Not quite what I meant up there.

      http://8pic.ir/images/tm6y1pd1psteu3bi8t8z.jpg
      Artstation
      Join the support channel
      Gumroad Store

      Comment


        #4
        Originally posted by Maximum-Dev View Post
        If this is what you mean it applies the variation to a single (bush in my case) and the same bush with the same look is everywhere. Not quite what I meant up there.

        http://8pic.ir/images/tm6y1pd1psteu3bi8t8z.jpg
        Right, sorry I'm tired.

        Absolute world position -> Mask (R G) ->Subtract by landscape position(x,y) ->Divide by landscape size multiplied by scale -> hook into UV slot on your color map and then just multiply/overlay/lerp it into your foliage texture.
        Last edited by Sitrec; 03-25-2015, 09:16 AM.

        Comment


          #5
          Care to post a screen?

          http://8pic.ir/images/0o9h6nvp0ohx8r6nyrev.jpg
          Artstation
          Join the support channel
          Gumroad Store

          Comment


            #6
            I'm not at home but mAlkAv!An posted this picture earlier:
            Click image for larger version

Name:	landscapegrassblendf3s34.jpg
Views:	2
Size:	293.6 KB
ID:	1071176

            Comment


              #7
              Thank you for your time. I have a nice variation in my instanced mesh now.



              Artstation
              Join the support channel
              Gumroad Store

              Comment


                #8
                Looks great! Glad I could help.

                Comment


                  #9
                  It boggles my mind how everyone seems to be getting this to work, but I'm having absolutely no luck with this process.

                  Comment


                    #10
                    The images I posted of my vegetation are result of doing some small change to the graph Sitrec posted.
                    First of all what that graph is doing is it takes the color information from landscape and blends it to the foliage that's painted on it but I did some slight changes to fit it for my need.
                    For the node that says Landscape Location (X,Y) I wrote the size of my landscape 4033 for X and 4033 for Y.
                    And for the node that says Landscape Size * Scale it's just the amount of tiling of that base color you see it's connected to.
                    Here's my graph I hope it helps you and if it still doesn't work for you we would be happy to troubleshoot it for you if you post a screenshot.
                    Sitrec is a nice vegetation guy he'd probably get to answer you since I'm leaving now.




                    Cheers.
                    Artstation
                    Join the support channel
                    Gumroad Store

                    Comment


                      #11
                      Originally posted by Maximum-Dev View Post
                      The images I posted of my vegetation are result of doing some small change to the graph Sitrec posted.
                      First of all what that graph is doing is it takes the color information from landscape and blends it to the foliage that's painted on it but I did some slight changes to fit it for my need.
                      For the node that says Landscape Location (X,Y) I wrote the size of my landscape 4033 for X and 4033 for Y.
                      And for the node that says Landscape Size * Scale it's just the amount of tiling of that base color you see it's connected to.
                      Here's my graph I hope it helps you and if it still doesn't work for you we would be happy to troubleshoot it for you if you post a screenshot.
                      Sitrec is a nice vegetation guy he'd probably get to answer you since I'm leaving now.




                      Cheers.
                      Hey.

                      I have been testing out UE4 for a couple of weeks now and been sneaking around on the forum.
                      At the moment I am trying to get color variation in my grass that I have painted with the foliage tool.

                      I have bought a pack of grass and have painted some patches of grass for a test. But I really dont undestand all of these nodes in this material and not sure how I make all of them.
                      Could anyone be so nice to explain whats going on in that node tree?

                      And some quick questions for a couple of the nodes -
                      The node that contains the landscape coordinates. What does this do and how do I make it?
                      Does it automatically find where the grass is painted? I could find much info about this.

                      Texture UV sample that is gray.
                      Should it only be a gray bitmap in this? Or am I missing something here.

                      These might be some really stupid questions, but all of this is kinda new to me.

                      Thanks for all the help!

                      Comment


                        #12
                        The texture sample that is grey looks that way because it is scaled up enormously and you are only seeing a very small part of it in the sample window. It's probably something like a PS cloud filter.

                        The absolute world position node samples the XYZ world space of a pixel. The mask (R,G) is discarding the Z information from that result leaving only an X and Y world coordinate that is used to modify the UV coords of a texture sample. This has the effect of creating a planar projection that can be applied to horizontal (and semi horizontal) surfaces and the texture will seamlessly tile regardless of object uvs and Z rotation.

                        Dividing is what determines the extents of your macro texture. In this example the value 5,000 means that every 5000 world units the texture will repeat itself in X and Y (UV)

                        The blend overlay node is used to add contrast and variation to the 2d texture sample of the grass. For an explanation of what happens with overlay mode see this link:
                        http://www.photoshopessentials.com/p...modes/overlay/

                        The subsurface connection is simply to help with the backlighting of the mesh.
                        Last edited by King Mango; 09-17-2015, 05:43 PM.

                        Comment

                        Working...
                        X