Announcement

Collapse
No announcement yet.

Realistic grass

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

    Realistic grass

    Hello!
    I can't find out how to achive such grass that blends nicely to any kind of terrain. In my sceene bellow, I achived the result I was aiming for, exscept it uses too much memmory. Also, you can look through the grass and that shouldn't be. I use a translucent material in my case. If anyone has a clue on how to make such grass, or how the material should be, let me know.

    #2
    -Use the "opacity mask" mode instead of transculent
    -create grass that just consists of 2-4 planes
    -also add a "wind effect"
    -add a little bit subsurface scattering or a custom lighting

    Comment


      #3
      Hey matjo, =)

      Using a masked material instead of a translucent one is generally the way to go for large areas of grass. I've found it's one of the more difficult things to do in UDK to be honest. When blending grass, it's good to know what sort of material will lie underneath the grass itself - this is I assume a grass texture, so one way to blend grass is to match the colour of the grass material on the ground, to the colour on the plane, as closely as possible.

      To improve the overall look of the grass, don't use a flat plane with 2 triangles. Using a flat plane will render some grass planes invisible when viewed from the side, and it's also inefficient when using masked materials. You should model the plane around the actual amount of space that the material takes up, and the mesh should bend slightly, as shown below, so that the grass is visible from all angles:


      It may appear that because the plane is more tessellated, the grass will now eat up more resources, but it's actually more efficient, because UDK is spending less time calculating the invisible and visible parts of the masked material applied to the mesh. Also, when you are happy with the mesh you're using for the grass, edit the normals of the model so that they are all pointing upwards. The screenshot above is from a 3D Motive tutorial video series that teaches the proper techniques of grass rendering. It does cost to view, but it covers a lot. Just as a sort of 'sneak peek', here's a look at a very similar material that is covered in the tutorial series:


      Hope I could give you some advice. =)

      Comment


        #4
        You'll be surprised how much you can get away with using a quad. Use a quad for the lowest LOD, so when your screen is rendering thousands of grass meshes, they'll be simple quads instead of tessellated meshes.

        Comment


          #5
          Depending on your texture and target platform there is usually a sweetspot between a simple plane and a highly subdivided one. It is a good idea to make your plane vertices follow the grass texture shape to reduce the alpha masking area, but you shouldn't overdo this. Having more than 2 triangles also means you can deform the mesh to get a more natural look as with simple upright planes.
          On that example above you could easily remover the lower horizontal edge loop and probably also merge the 3 upper vertices, so it would be 6 triangles instead of 12.

          Comment


            #6
            Originally posted by mAlkAv!An View Post
            On that example above you could easily remover the lower horizontal edge loop and probably also merge the 3 upper vertices, so it would be 6 triangles instead of 12.
            Good point. I like to experiment with different the model, to try and have a good balance between performance and how natural the grass looks. I also always like to make the grass quite dense on the texture, to make less of an alpha masking area too. It's good to experiment, see what's best for the environment your making and for what hardware it will be running on.

            Comment


              #7
              Thomasmul10 thanks for the reply, helped soo much!
              I tried the technique you suggested and it yields quite good results. Made some vertex displacement animation and it looks nice . Thanks again!

              Comment


                #8
                Oh and for anyone who's looking for a more detailed example that shows how the lighting is constructed, here's the link http://udn.epicgames.com/Three/CustomLighting.html .I used the bottom technique.

                Comment

                Working...
                X