March 12, 2017

[Week 6] Nature rendering



Back to schedule!

This week I've been mainly working on the grass. I went with the geometry shader aproach. Each terrain chunk has a list of points where grass will grow, I stored it in the chunks so I could reuse the results from the frustum culling pass.

To generate the grass, first I calculate a LOD value, with this value I decide the number of triangles that the blade will have.
Then, I generate the blade, I made an algorithm that works with as much triangles as you want, so if I want to reduce of number of tris I dont have to rewrite it.
Finally I randomly rotate it so it looks more natural and also I animate it.
To simulate the wind, I'm mixing a few sin and cos waves which gives a constant wind effect with some bursts.



I also started working on a custom sky system... I couldn't make work O'Neils implementation with the postprocessing so I just decided to implement it. Right now I have the basis of it working: sun and color of the sky. Futher tweaking should be made so it looks ok.

Finally I started making a first person walker that will be used to explore the scene. I'm sampling the current height of the terrain acording with the position of the camera (an aplying a lerp so it's smooth) but I have a bug that I'll solve next week.

In the following weeks I will be working mostly on tweaks and solving bugs more that anything.
See you!