Unreal 4.8 Grass System
I've been trying out the grass system in Unreal 4.8. (To avoid any confusion, I mean the system where the grass density is driven by one of the landscape layers.) It looks very good, a lot like the microfoliage in the Far Cry games, but I've got a few questions:
Thanks for any help you can give!
Be sure the grass mesh you are using has 'Cast Shadow' enabled as well as adding a 'Skylight' as your ambient fill lighting. Also make sure the lightmap resolutions you are using with your procedural foliage are correct. If you would like a different lighting approach take a look at 'Distance Fields' and how they are used to greatly increase rendering performance when combined with the 'Two Sided Foliage' and other lighting techniques for large outdoor areas heavily populated with foliage. How I have my scene set up is totally dynamic and performs as well, if not better, than if I were to use baked static lighting.
First go into your 'Project Settings' and enable the 'Generate Mesh Distance Fields' within the 'Rendering Section'. Save, close, and re-open your project to have the setting applied. Now select the 'Directional Light' within your scene and set it to the values shown below.
The 'Distance Field Shadows' is a lighting technique which helps provide a cleaner and softer shadows at the set distance. Enable this option and read up on the documentation to understand a bit more about how to use this feature.
Ray Traced Distance Field Soft Shadows https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/RayTracedDistanceFieldShadowing/index.html
Here we are using a 'Stationary' skylight which is also casting dynamic shadows. You can turn this off to increase performance, but you will lose a tiny bit of added realism.
This makes your scene only build the dynamic lighting and really helps with iteration times when designing large outdoors scenes.
Distance Field Lighting for Grass Type
Here are the settings I am using for my grass type for the Procedural Foliage Spawner.
Shadows Cast and Received
This is what the grass in my small scene looks like with the Procedural Foliage tool and the settings I have mentioned. This should answer your question as to how to get your shadows to function with the procedural foliage spawner.
Your second question deals with being able to detect collision between your grass mesh and your player character, and modifying the material to squash or move when colliding with one another. This is a more advanced approach, but there is content on the market place that has this functionality already in place. It is called 'Realistic Grass 1' and might take some tweaking to get the effect you are looking for, but it is a start.
Let me know if there is anything else you need help with, or if you have additional questions.
answered Jun 23 '15 at 02:52 PM
The Procedural Foliage Spawner is a new feature and is considered 'Experimental' in its current state. With that said, there are known things that need to be addressed and fixed which we are working to have implemented. In order to verify any issues you might be currently experiencing, be sure you have taken a look at the documentation covering the nuances of the feature and how to set it up correctly.
Procedural Foliage Quick Start Guide
This guide contains a lot of very helpful information that help you find answers to your questions. It will also guide you through the set up process and explain the values you might want to change to create a more dynamic procedurally generated area of foliage.
Let me know if you still have questions or comments after taking a read over the documentation.
answered Jun 22 '15 at 08:00 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here