Hey everyone,
I've been working heavily on the scenery of BrambleLash.
There has been a lot of work on both the technical front as well as the art side with regards to this.
I put together shaders that allow for the grass to interact with scene objects. They allow grass to move when walked through, wave in the wind, and bloom flowers or scorch and die depending on whether players or enemies walk upon it.
Separate cameras render objects on the deformation layers. Here is an example of a render image used to create the grass depressions when instances walk over it.
The two players zip around, avoiding the bullet and then kill the enemies.These renders are then given to the shader which performs a vertex deformation to distort the grass. Also the main textures of the grass and scenery objects are interpolated between either a decay texture, default texture or blooming texture.
As well as adding these dynamics to the scene we are now using the Unity terrain system with triplanar shaders (to avoid stretching) to create the landscape. The intention is to hasten our level development process significantly.
While this provided a number of benefits there was still a need to be able to quickly populate our levels with grass, rocks and other prefabs. As such I dived into the poorly documented world of Unity editor scripting and spent a night getting together an object painter that could handle our requirements.
We can now paint instances onto the terrain. They can be told to align with the surface and/or only fall on certain angles as well as randomise their scale, or rotation. You can also delete items you have painted on the terrain and a number of shortcuts were created to make things easier. Finally once all the work is done you can hit composite and batch all the instances into a single mesh for better performance. After batching the old instances are kept, but disabled and stored as a backup should we want to go back and change things.
Adding a simple click to create or delete multiple instances to speed development along.We intend to expand the number of environments the player will be in and create around 4 different sets. Up until now we have been pushing to see exactly how much we should include with the first set to give some idea as to how much more to add.