Showcase & Discover Creative Work
Hiring Talent?

# Procedural Tree MEL + Pixar's Renderman

• G743
• F13
• D0
• Procedural Tree

In order to color a full set of leaves with different color variations we can take advantage of a simple shader in created in RSL to create a slim template that will allow us to create quick variations of multiple geometry a only using one main shader.
• Responsible for all aspects except tree trunk model.
• TECHNICAL BREAKDOWN
• Final Image.

Modeled in Autodesk Maya
Shaded and Rendered with Pixar's Renderman
Composited in NukeX
• For this tree grooming tool, I thought it was crucial to introduce a form of direct communication between the artist and the script. I used the "Vertex Paint" tool feature in Autodesk Maya to provide this dialog between artist and script. The main idea is that using vertex paint the artist can paint with the mouse or stylus the vertices on the mesh. In my case I made the convention that black is a candidate to have a branch grow and white is not. So this way the artist can interactively choose where the script is going to attempt to grow some branches.
• The images show the different variations that can easily be achieved using this script. From a full set of trees to more individualized and art directed distributions, and even an Ivy type distribution.
• How are the Branches Created?

In this case i used a simple idea of translating the leaves on the normal of the face. So basically I create a leaf and then I move along the face normal where it was created by a spread amount. There I create the next one.

How do the branches curve?

One of the main flaws of moving along the normal is that we get these straight un-natural looking branches. To chance that I used a simple concept of usint the negative parabola of x^2 (x square). We can control the arching of this function dividing x^2 by a factor (or multiplying it by the inverse factor).
Here is a visual example of what happens with this function:
• So what we need to do is each time we move along the face normal, we change the y component for:
y = -archingFactor*x^2.

We wanted to create a leaf shader that was a little more complex than just a texture on a plane. The basic parts we wanted to have after looking at some references were:

Front and Back :Leaves have two differentiated parts in terms of texture, the back that is normally more shiny and the back that is normally lighter and more matte.

Specularity: For the front part of the leaf as we said before we wanted to have some specularity.

Translucence: Leaves are translucent when sunlight shines through them so we wanted to incorporate this to our shader.
• Main texture used to create the double sided leaf shader
• Capture of the Slim Shader Network created to simulate leaves
• #1 Front Leaf Color
• The texture for the front leaf color that will be combined with our utility shader.

• This is where all the magic happens. This node outputs a color based on the name of the object it is attached to and an average color decided by the user.

#3 Back Leaf Color
• For the back of the leaf we have a different texture file.

#4 Leaf Alpha
• We use this alpha to cut out the shape of the leaf from the plane where the shader is assigned.

#5 Specular Map
• We control the specularity of the front part of the leaf with this black and white maps.

#6 Facing direction
• This node is used as a mask to reveal the back leaf color file if we are looking at the back of the leaf.

#7 Mix Colors
• These two nodes mix the color from the ColorByName Shader with the two front and back leaf textures.