This is what I have currently, using my new Foliage Lighting mode. Grass still needs a few tweaks, but this runs reasonably well. I would probably drop the number of tris per patch down a little further, but otherwise its good.
Yes its just planes with alpha texture, generated patch in speedtree. My custom foliage lighting is a way to have faked subsurface lighting without it actually being as expensive as doing subsurface lighting. For the grass, it also has a couple of other shortcuts to reduce the complexity of the shader further, allowing for more instances to be pushed out.
I think the polygon technique is the most convincing option for tall grass. But when you need short ornamental grass, it gets tricky when the area is large because the amount of polygons needed to hide the “cards” will be huge and it will kill the frame rate. For now, I’m using the carpet technique. It add some depth to the grass but I’m not totally satisfied yet…
Great!
That’s exactly what I was looking for.
Rabellogp, you aren’t totally satisfied but that’s a perfect compromise between a good look and a good frame rate!
Is there a tutorial anywhere to do this technic? I spent some times analysing the material set up from the market place’s realistic rendering but I don’t understand all of it…
There is no tutorial that I know of… I confess that I don’t fully understand the carpet material either, I can’t reproduce it by myself from sketch yet. But you can learn a lot by tweaking it.
First of all you need a proper mesh to apply this material. Take a look at the carpet mesh from Realistic Rendering and you’ll notice 5 layers of mesh with some space between them. Each layer has a different vertex color. Reading the M_Carpet_Mat comments you can see that the lowest layer color must be blue in order to make it opaque. The other layers must be red gradually fading to black until the layer on the top. After setting this up and importing the mesh into the UE4, remember to check “Replace Vertex Colors” on “Importing Settings” so you can use the colors you’ve set in your 3D software.
Now you just need to replace the textures in the carpet material to get the diffuse color you want. After that, you can create an instance and mess around with the parameters in order to tweak the look of the grass. You don’t need to worry about the BumpOffset configurations if you are using a mesh like the original one used for the carpet (5 layers with those vertex colors).
It’s been about 6 months since the last post here. Has anybody come up with anything new in terms of a nice even spread of short lawn grass?
Something that looks like this:
After experimenting a lot, I ended up electing the plane+alpha technique as the best option for me. It’ll eat some frames for sure, but I think it’s worth for the quality you can get. This is the results I’m getting right now:
Yep. Vertical planes with opacity textures spread all over the terrain with foliage tool. Some work on the materials to get color variation and that’s all.
50~60 fps on this very project with that grass.
100~120 fps without the grass.
The grass is spread all over the terrain though, including the neighborhood. So it can’t get worse than that in terms of performance. I think it’s good enough for archviz.
That does look like a huge improvement. How is the shorter grass looking on larger areas. I’ll be wanting to use this for golf courses. I love the color variations in it.
There is really nothing complicated for that grass.
I bought this pack: https://store.speedtree/product/backyard-grass-ue4/ and used the “desktop” version of it. It’s easy to replicate that speedtree grass, I bought it because I was too lazy to find and work on a decent grass opacity texture (shame on me =P). What I get inside UE4 after importing the model is a cluster of planes with the grass material (diffuse, opacity, normal and a speedtree color variation chained with diffuse).
&stc=1
The only real advantage of the Speedtree model is that you’ll get the wind simulation (which I’m not using, btw, because wind must bee very strong to visually affect short grass like that in real life). After importing this, I distributed it over the surfaces with the foliage fill tool. The individual planes are very noticeable in low density distribution specially with short grass like that. There are two ways to avoid that: 1) increasing foliage density and 2) matching the surface color with the grass color. You must combine both if you don’t want to increase the density too much. Matching the colors is also important if you want to limit the distance of foliage rendering to improve performance.
I didn’t like the Speedtree color variation node, so I got rid of it. The variation of my grass comes from a blend between the blades texture and a macro texture (same from the surface) with world coordinates. Here are the instructions for that: https://forums.unrealengine/showthread.php?64278-Foliage-color-variation
I’m also using that new 4.7 foliage shader. It’s not visible in those pictures, but there are some translucency on those blades when the light comes from behind them.