AOV per each light

   10262   14   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 - 2021年1月4日 21:20:46

Attachments:
per-light.png (4.7 KB)

Albert
User Avatar
Member
697 posts
Joined: 8月 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
697 posts
Joined: 8月 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: 8月 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 - 2021年5月17日 12:11:09
User Avatar
Member
697 posts
Joined: 8月 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: 8月 2016
Offline
Yes of course)
Edited by AlexCubor - 2021年6月2日 17:45:04

Attachments:
solaris_lightgroup_example.hip (356.2 KB)

User Avatar
Member
697 posts
Joined: 8月 2013
Offline
Hi. Thanks!
User Avatar
Member
76 posts
Joined: 2月 2017
Offline
Hey guys! Is there anything new on this after 19.5 realease?
User Avatar
Member
8041 posts
Joined: 9月 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
スタッフ
411 posts
Joined: 2月 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
82 posts
Joined: 5月 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
8041 posts
Joined: 9月 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.
User Avatar
Member
1 posts
Joined: 8月 2014
Offline
How in Karma to split custom aov per light? In standard aov we have checkbox for splitting. For custom aov i can't find it.
User Avatar
Member
697 posts
Joined: 8月 2013
Offline
Hi.

There are two stages

Drop down a LPE tag node (I tend to tag using light name)

In Karma under the AOV's tick "split per LPE tag"

That's it. It should now work.

Best
  • Quick Links