Isotropix Forums

LPE Library

Clarisse related tips and tricks

LPE Library

Unread postby esmith » Fri Dec 13, 2019 12:04 am

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.

Documentation:
Isotropix LPE documentation examples
https://www.clarissewiki.com/3.6/useful ... ion_e.html

Autodesk OSL examples for Arnold.
https://docs.arnoldrenderer.com/display ... 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.

Capture3.JPG
Attachments
LPE_LIB.project
(69.96 KiB) Downloaded 44 times
User avatar
esmith
 
Posts: 162
Joined: Mon May 22, 2017 4:11 pm

Re: LPE Library

Unread postby esmith » Fri Dec 13, 2019 6:00 pm

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)
FULL INDIRECT: C(.*DO)|(.*D.+L|O)
Attachments
LPE_LIB.project
(70.01 KiB) Downloaded 42 times
User avatar
esmith
 
Posts: 162
Joined: Mon May 22, 2017 4:11 pm

Re: LPE Library

Unread postby sam » Fri Dec 13, 2019 7:50 pm

It's actually Nico... I'm far to be mastering the art of LPE/RegEx yet
Sam Assadian
Isotropix
CEO/Founder
User avatar
sam
 
Posts: 1463
Joined: Fri Jan 25, 2013 11:33 pm

Re: LPE Library

Unread postby weindy » Wed Dec 25, 2019 11:47 am

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 https://drive.google.com/drive/folders/1w-F7di0TFjUD6d2Dgk_d4cD-2KtsRhAJ?usp=sharing to download. If plus all the aov layer, you can get the beauty!
Attachments
LPE_LIB.project
(65.29 KiB) Downloaded 37 times
Last edited by weindy on Sat Dec 28, 2019 8:29 am, edited 1 time in total.
weindy
 
Posts: 3
Joined: Tue Feb 19, 2019 5:12 am

Re: LPE Library

Unread postby sam » Sat Dec 28, 2019 7:59 am

Here is a comprehensive introduction to Light Path Expressions which is a must read for anyone that would like to understand how they work:
https://www.clarissewiki.com/4.0/introd ... h-exp.html
Sam Assadian
Isotropix
CEO/Founder
User avatar
sam
 
Posts: 1463
Joined: Fri Jan 25, 2013 11:33 pm


Return to Tips and Tricks