Soul Terrain

On the Pixar feature film Soul, I was lucky enough to spend a few months working in the art department to help with look-development. I chose to lean into graphics coding because I'd spent a few months previously learning GLSL code for our newly integrated pattern generating tool Motif and knew it could be a great way of quickly prototyping some of the looks they wanted in the film. A lot of the film takes place in a nebulous ethereal place so I took some of the ideas from the film and started to explore one of the areas that featured heavily in the story; a place where Soul's are made. The video's you see below are just a couple of my interpretations and experiments with volume ray marching and geometry instancing.

This video shows one of my ray-marching look-dev ideas for the 'Astral Plane' in Soul. Initially I created a simple homogenous ray marcher that took two textures from a previous depth pass to calculate the front and back faces of some geometry- in this example I modelled a simple polygonal mesh with 'hills' to match an early concept from Art- and marched a ray uniformly through the mesh to accumulate a volume (I actually got a lot of help from Epic's Ryan Brucks Shaderbits blog where he detailed some of the lighting calculations needed to process a ray as it moves through a volume from an old white paper on raymarching clouds!). After creating a simple volume I started to experiment with 3D fractal noises from my previous experiments, and came up with some interesting patterns using both worley and perlin noises, as well as experiments with distorting 3D space with sine waves to create nice warping patterns on the noise signals. All this combined to create some really interesting cloud patterns and, because of a main story point, I experimented with a portal opening up from the center too. There are obviously some drawbacks to calculating volumes based only on the closest front-facing and furthest back-facing faces of geometry, as you don't calculate any in-between geometry 'holes' or shapes, and so Kees Rijnen, who wrote Motif, added an SDF node to generate a 3D volume of any geometry in the scene, and a filter to specify which geometry to isolate, in the shader. Using this SDF node at a reasonably low resoltion of 256x256x256 and plugging it into my ray march node, I was able to query if I was inside or outside of the geometry and with this functionality, I could create more accurate transparent volumes with nice soft edges that could show partially occluded geometry.