Creating leaf shapes with OSL in Cycles

I am working on a leaf shader and the first step in this is creating the shape of the leaf. As you can see in the image below it is then quite simple to add some variation to for example the leaves produced by the Ivy Generator.


The shader and node setups as well as some explantion on how to use the shader with IvyGen are documented in this blog article: http://blenderthings.blogspot.com/2013/01/a-osl-leaf-shape-shader-for-cycles.html

Creating a leaf shape sounds simple but turned out to be quite math heavy (splines, cubic root solving). Those math parts are split off in their own little library (documented in the article) which will be expanded when I enhance the shader to produce leaf veins etc.

Cheers

Wow, I really LOVE this idea… great work!!! :yes:

great idea. will it be faster than mesh leaves made with particles?

Probably not, OSL is for textures, so its probably driving a transparency, which is inherently slower then mesh (when dealing with multiple transparency depths… but memory usage is much better