Page 1 of 1

LPE Library

Unread postPosted: Fri Dec 13, 2019 12:04 am
by esmith
Hello everyone, since we get a lot of questions about LPE OSL syntax I thought I would start a little Tips and Tricks library post. I have attached a project, with some basic custom AOVs, driven by LPE with various OSL expressions for various channels. Next i will add a duplicate set for each Light ID (There is Fill and Key and that's what this project will keep).

OSL for this can be quite daunting, and there are multiple paths to the same result. No doubt I have made some mistakes here, for instance the SubSurface isn't working on my first build, I'll look into that.

If you have any LPEs you think would benefit the community, feel free to download the project, and add your own then re-share. I'll check them out and add them to the main library.

This LPE library should be referecend into all your projects, so that overtime it grows because if you work correctly in terms of Light Path Expression labels, there is never a need to change them once you've made them.

Isotropix LPE documentation examples ... ion_e.html

Autodesk OSL examples for Arnold. ... ssion+AOVs

The LPEs in the LPE_LIB.project, use a combination of both, and should be a great starting off point to cut and paste together some LPEs to get the output you want.


Re: LPE Library

Unread postPosted: Fri Dec 13, 2019 6:00 pm
by esmith
Ok Sam got us the OSL for proper Direct and Indirect Beauty. When added together, this is your beauty.

FULL DIRECT: C([^D]*DL)|([^D]*L|O)

Re: LPE Library

Unread postPosted: Fri Dec 13, 2019 7:50 pm
by sam
It's actually Nico... I'm far to be mastering the art of LPE/RegEx yet

Re: LPE Library

Unread postPosted: Wed Dec 25, 2019 11:47 am
by weindy
I make a change version, now the aov should be the same with arnold way :lol:

But it still have one problem, the volume channel don't match, so please help!

BTW, I make a scene clone version for maya arnold, please check to download. If plus all the aov layer, you can get the beauty!

Re: LPE Library

Unread postPosted: Sat Dec 28, 2019 7:59 am
by sam
Here is a comprehensive introduction to Light Path Expressions which is a must read for anyone that would like to understand how they work: ... h-exp.html