Website powered by

Soul Grass

This is a video of an ethereal grass look-dev project that began with a quick 1-2hr proof of concept to see whether instancing a single piece of grass geometry 500k times while deforming every vertex would be fast enough to play back in real-time. I used the (normalized) position of the grass blades in the grid as a uv coordinate to query an animated noise texture to drive the wind effect. I used the normalized height of the blade of grass multiplied by the noise texture to drive the amount of rotation of each vertex, using the base of the grass blade as the pivot point. I added a couple more random rotations to the vertices and then transformed each grass blade to the respective grid position.

I also added shading and lighting, with controls for albedo, scatter, back-scatter, specular and glow. After getting these into a good place I wanted to combine the grass with the volume shader, so I began building a bunch of other utility nodes that would allow me to composite a combination of different nodes in what resembled something like a deferred renderer. I used depth maps and texture buffers to store information about the scene which I then passed into a final composite node that took all the separate textures and calculated depth sorting, lighting and shading as well as some naive post-effects like depth of field and bloom. Instead of calculating lighting and shading in the grass instancer, I simply passed out the surface normals and instance ID into the final composite node.

There was some clever shadow map code I used from someone else's shadow map node to set up the light matrices and transform the camera for the shadow map pass, but everything else, including calculating soft shadows across multiple passes was coded from scratch. It was a really fun project, and I learned an ton of stuff. We showed the Director, Pete Doctor, every different experiment we did in Motif as a live demo, because seeing stuff in real-time is pretty novel at Pixar, and being able to change parameters or settings for the Director was a really big win for quickly getting buy-off on the look.