AOV per each light

   8083   12   6
User Avatar
Member
168 posts
Joined:
Offline
In mantra we could "export variable for each light" with 'all' vex variable, which would automatically create AOVs per each light.


How can we do so using Karma ? (having 100 lights in the scene, would rather avoid setting each one of them manually)
Edited by tmdag - Jan. 4, 2021 21:20:46

Attachments:
per-light.png (4.7 KB)

Albert
User Avatar
Member
642 posts
Joined: Aug. 2013
Offline
Hi.

It is a bit manual right now.

You can add a light path expression in the Karma LOP node..
https://www.sidefx.com/docs/houdini/render/lpe.html [www.sidefx.com]
and in the light LOP under the Karma tab you can add the name of the light LPE if you change the tab to "set or create" (at the bottom).

Best

Mark
User Avatar
Member
168 posts
Joined:
Offline
Thanks, this is what we are doing at this moment, but with lots of lights, it is a lot of manual work
Albert
User Avatar
Member
642 posts
Joined: Aug. 2013
Offline
Hi. 3Delight has the best setup for this out of all the render engines I have used. You just tick "multilight" and that is it (non-USD workflow).

As a side note, if you are trying this in Renderman USD side, Renderman's light tab light name does not work... but if you add a LPE light name on the Karma tab of a light. Renderman can then pick up AOV's per light as well. Renderman does not seem to support deep of cryptomatte right now. There are a lot of false starts still with USD right now.

There must be an easier way to do AOV's per light in USD somehow although I would prefer SideFX to prioritize Karma render speed.

Best
User Avatar
Member
14 posts
Joined: Aug. 2016
Offline
You can used for Each nodes. I think It's logical for USD philosophy.

For getting name light-group I was use python:
stage = hou.pwd().inputs()[0].stage()

prim_path = hou.contextOption("ITERATIONVALUE")
light_aov = stage.GetObjectAtPath(prim_path + '.primvars:arnold:aov')
return 'diffuse_' + light_aov.Get()


P.S I think It’s working similar for Karma too
Edited by AlexCubor - May 17, 2021 12:11:09
User Avatar
Member
642 posts
Joined: Aug. 2013
Offline
Hi Kubor.

This is super useful. Thank you. Would you be able to provide a hip file?

Best
User Avatar
Member
14 posts
Joined: Aug. 2016
Offline
Yes of course)
Edited by AlexCubor - June 2, 2021 17:45:04

Attachments:
solaris_lightgroup_example.hip (356.2 KB)

User Avatar
Member
642 posts
Joined: Aug. 2013
Offline
Hi. Thanks!
User Avatar
Member
76 posts
Joined: Feb. 2017
Offline
Hey guys! Is there anything new on this after 19.5 realease?
User Avatar
Member
7737 posts
Joined: Sept. 2011
Offline
ProceduralFrankie
Hey guys! Is there anything new on this after 19.5 realease?

I don't know about 19.5, but in 19 they added the 'split per lpe tag' checkbox for each AOV on the karma render properties node. Check the box and each unique light LPE tag will get a separate AOV.
User Avatar
Staff
356 posts
Joined: Feb. 2008
Offline
You'll need to first create LPE tags for your lights (the LPE Tag LOP node is there to help with that), then enable Split per LPE Tag options for the various AOVs.

Attachments:
PerLightAOV.hip (723.8 KB)

User Avatar
Member
55 posts
Joined: May 2013
Offline
Isn't that what the LPE Tag parm in a light's Karma folder is for though, or does the LPE Tag LOP do something additional?
User Avatar
Member
7737 posts
Joined: Sept. 2011
Offline
j00ey
Isn't that what the LPE Tag parm in a light's Karma folder is for though, or does the LPE Tag LOP do something additional?

yes. I think the lpe tag lop is an alternative method.
  • Quick Links