Feature 10 Post Mortem

Implementing billboards was pretty straightforward after Dr. Johnson’s videos went up.  I experimented with some grass, some dead grass, and some bushes, but in the end I settled on seaweed due to a request.  You just have to imagine that this is a very special desert.  Anyway, I did not use geometry shaders, because for some reason I couldn’t get them to work on one of my machines.  The other method was not really that difficult.  We just ended up needing to store more data (you need to store all 4 vertices and indices if you aren’t using geometry shaders).  I used Dr. Johnson’s code for generating a block of seaweed, but I set each weed’s height by querying my heightmap.  However, I had to create a new QueryHeight() function that did not use linear interpolation in order to avoid oddly-placed blades.  Finally, I made sure that the up and right vectors by which each group of 4 vertices were pushed out were the world up and right vectors in eye-space, instead of the eye’s up and right vectors.  Some of the code that I used is in a screenshot below.  The rest can be found in the videos if needed.


Here are some screenshots:


To prove that my seaweed is aligned with the world’s up vector

Breathtaking underwater utopia shots

Here is the code that I used to create my grass billboards


I posted a video at the following link:


Leave a Reply

Your email address will not be published. Required fields are marked *