VSFX 319 Renderman Portfolio
My shader animation project was inspired by a scene from the film Coco, specifically the one with the marigold bridge. The marigold petals light up when they are stepped on, and I wanted to recreate that in some form with my own shader.
In this article, Pixar explains that the petals are light sources that use Renderman's new "particle light" system. They also make use of a light that sits underneath the petals and is constrained to the movement of the characters to create the glow as the character steps down.
Though I did not have the same amount of time or render resources for this project that Pixar had for Coco, I did my best to recreate the basic appearance of it with my OSL shader.
This shader makes use of multiple custom coordinate systems to create the glow on the ground surface. The user can input a radius, colors, and names for the coordinate systems.
The shader displays colorF on any point beyond radius distance of the coordinate system, and it displays colorT within that distance (creating the areas of glow by the feet).
I struggled trying to integrate a smoothstep function into the shader to create a smoother falloff. I was able to create a smoothstep for just one coordinate system, but I am still looking for a way to create a smoothstep with multiple coordinate systems.
ColorF, the green area, was created using a random object color ramp with a PxrFractal attached to the spline map. The radius is distorted by a PxrFractal as well, which has keyframed variation. ColorT is a solid yellow color.
resultRGB is input into the diffuse color of the grass material. Float value resultMask indicates the areas of glow -- I plugged this into the glow gain of the grass shader, the intensity of a mesh light plane sitting directly underneath the ground plane, and the transmit gain of the dirtmat shader of the ground plane itself (to create a translucent area to allow the mesh light to shine through the ground).
video password is vsfx319
I decided to try using XGen for the first time for this project, which was not a good idea. Though XGen was simple to learn, and it was easy to get the basic look of the grass working quickly, XGen slowed down my Maya file by a lot and somehow increased my render time significantly.
I also wanted to create a collision simulation and show the splines of grass being pushed out of the way or bent/crushed by the cat's feet.
I was fortunately able to get a very rough nHair simulation working, in the video to the right. However, when the nHair curves were converted back into XGen guides, the cat's body (an nRigid passive collider) would no longer move. I eventually needed to delete my hair system, convert my XGen splines into polygons, and delete my XGen collection and description from the file.
I hope to one day get an actual dynamic grass simulation working for this project, but Maya's nHair system is not a very good way of doing it.
I selected one vertex on each foot (and the hips) and constrained a locator to it using a point on poly constraint. I then created a coordinate system, scaled it down, and constrained it to the locator for each foot.
For some of the feet, the motion of the coordinate system was slightly jerky due to some issues with the parent constraint or some very minor bumps in the animation. I eventually baked the simulation to create a key on every frame, and I manually deleted and moved around the keys to edit the movement and create a smoother motion in the animation.
If I had more time with this project, I would do the following things:
Overall, I learned a lot from this project and would love to continue creating custom shaders using OSL and finding a practical use for them in my work. Though I doubt the artists at Pixar took the same approach to this concept as I did, I'm interested in finding more ways to integrate OSL shaders into my lighting & lookdev work.