This sprint was all about polish. My main two goals were to implement the feedback given to me about the rock wall and create a more diverse forest with things other than trees and ferns. I believe I was successful in both of those goals and then some.
Firstly, learning PCG for this project has been amazing and I won't be putting it down any time soon.
With that out of the way, let me explain what the main feedback of the wall was. Basically, the wall was too noisy and didn't leave any room to rest the eye, which made it painful to look at. I decided to go for a "in-between" rock approach that treated smaller rocks as a type of grout that connects bigger rocks together. For the small rocks, I made a system similar to how I have the grass spawning, creating circular point grids that vary in size. Overall, it came out very nice in my opinion.
For the environment PCG, I was tasked with adding more to the environment. With the help of Nick Galan and Beryl Van Ness, we gathered about 15 different assets from the FAB marketplace to scatter around the environment. Myself and Nick created a "priority" list for spawning that put trees and branches/stumps at the top and rocks near the bottom. Mushrooms were also added and spawn near stumps in a similar pattern to the grass.
The most important thing I changed was making the PCGs now run on the GPU! I found a way to convert certain nodes (like sampler and mesh spawner) into GPU nodes without having to completely rewrite them in HLSL. That improved the framerate in editor from 10fps to a steady 30fps. I will definitely be using that trick from now on to not bog down the CPU.
Included in the images are some examples of how the branches and grass spawn.
 |
The ENTIRE Environment PCG |
Branch Spawning
 |
Check to see if spawning branches is turned on. |
 |
Get rid of any points in the "No Spawning" spline and set a max and min height to spawn. |
 |
Apply random noise to the points and take in User defined parameter to keep a percentage of them. Then, set their density based on their normal value.
|
 |
Only keep points that are on flat surfaces (normals between 0.9-1), remove the points if intersecting with other meshes or stumps, and spawn. |
Grass Spawning
 |
Check to see if grass is allowed to spawn, and create a point grid based on user defined size. Copy the point grid to the points determined by the surface sampler. |
 |
Apply random noise to the grass and get rid of points by user input. Then, calculate the distance between every initial point (before the point grid is applied) |
 |
Scale the center point the largest going out and project it onto the landscape. |
 |
Check the grass' normals and filter based on how flat it is. Then exclude it from other meshes and predefined anti-spawn area. |
 |
All the rock wall parameters. |
 |
Rock wall with little rocks in between |
 |
All new meshes spawning, with trees and branches having priority |