Solaris AOV - Arnold cheat sheet?

Solaris AOV - Arnold cheat sheet?

am_wilkins
Collaborator Collaborator
4,864 Views
20 Replies
Message 1 of 21

Solaris AOV - Arnold cheat sheet?

am_wilkins
Collaborator
Collaborator

Hey everyone,

 

While doing research I've noticed that setting up the Arnold AOV inside Solaris is quite a manual setup. (Of course ideal to automate this) Having to set the Data Type, Format and Filter etc. for each one.

 

Red Shift have this great "cheat sheet" to assist with the setup, but noted that there is nothing for Arnold?

Link: Houdini Solaris AOVs 

 

Does anyone know of a similar documentation for Arnold?

Or more information on these Data Types.

I've only found the "Render Var" docs, but the information isn't nearly as clear:
Houdini Solaris - Render Var 

 

If the Red Shift docs are referenced matching to the Arnold equivalent AOV, would that work?

 

 

All the best.

0 Likes
Accepted solutions (1)
4,865 Views
20 Replies
Replies (20)
Message 2 of 21

am_wilkins
Collaborator
Collaborator

PS. For those who perhaps read this post and shared similar annoyance with the approach to AOV.

 

In the new update from Arnold (HtoA 6.2.1.0), a new Arnold Render Settings node has been created which pretty much solves the above problem of handling AOV.

 

  • Arnold Render Settings LOP: A new LOP in Solaris allows you to quickly edit Arnold render settings, such as AOVs, cryptomatte, and more. HTOA-1524

 

Regards,

Andrew

Message 3 of 21

info
Contributor
Contributor

tested today and it's finally easier to create Aovs', I didn't find any solution to render out RGB per Light group. any idea? thanks 

0 Likes
Message 4 of 21

Stephen.Blair
Community Manager
Community Manager

@info wrote:

tested today and it's finally easier to create Aovs', I didn't find any solution to render out RGB per Light group. any idea? thanks 


You have to set up each light group AOV individually. There's no way to get them all with just RGBA_*
If that is what you are asking?



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 5 of 21

info
Contributor
Contributor

Tried to add new renderVar node with  ‘RGBA_ key’ but doesn’t work. 

0 Likes
Message 6 of 21

Stephen.Blair
Community Manager
Community Manager

You have to use the full LPE for the light group, and give the light a Light Group name

 

light_group_aov.jpg



// Stephen Blair
// Arnold Renderer Support
Message 7 of 21

am_wilkins
Collaborator
Collaborator

There is an additional problem with this, if you're using the new "Arnold Render Settings" node (and most people would want to do this) then it doesn't seem possible to append any custom render var to that Arnold Render Settings "Render Product"?

ie. placing a new "Render Var" before or after the "Arnold Render Settings" node and adding the custom AOV to the same prim path doesn't appear to work. Unless there is another way?

01.jpg


Ideally, the "Arnold Render Settings" node could be updated to allow custom AOV to be added to it...

 

Karma Example:
This method looks cool, because you don't have to have a tool or setup support which will automatically generate all the AOV you need based on the LG names—just does it all for you. But even the old "Arnold ROP" method would be great.
02.jpg


All the best,

Andrew

0 Likes
Message 8 of 21

info
Contributor
Contributor

hi, working fine on my side !

info_0-1682333372666.png

 

0 Likes
Message 9 of 21

am_wilkins
Collaborator
Collaborator

Great, that's good news.

Yeah a bit of a work-around? Since you're avoiding the new "Arnold Render Settings" node—but it works which is good!

 

And at a bigger scale, we'd require some extensive "Render Var" setup for artists. (Why I'm angling for a better out of of box solution from Arnold)

0 Likes
Message 10 of 21

info
Contributor
Contributor

 you are right, it seems it doesn't get the Arnold render vars  if you use "Arnold render Settings" That's weird!

 

0 Likes
Message 11 of 21

am_wilkins
Collaborator
Collaborator

Hello,

 

Just bumping this thread to see if there is any progress from Arnold crew on a solution for adding Light Group AOV within the new "Arnold Render Settings" node.

 

As far as I can see, we'd simply need to be able to change the "Source Type" to "LPE" on a newly created AOV and that should solve the problem?

arnold_render_settings.jpg

 

Ideally however (as mentioned above) if we do have a better solution from Arnold to adding Light Groups based on all the LPE tags on lights in the scene automatically (Skip over anything that doesn't had a tag) that would be awesome!

We shouldn't have to have an artist create all of the AOV manually.

All the best,
amwilkins

Message 12 of 21

Stephen.Blair
Community Manager
Community Manager
Accepted solution

Hi

 

For reference, the ticket for this is HTOA-2205 "Support light group AOVs in the Arnold Render Settings LOP"

 

 



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 13 of 21

am_wilkins
Collaborator
Collaborator

Thank you!
That's great news 👍🏻

0 Likes
Message 14 of 21

queengranded
Community Visitor
Community Visitor

Why is Arnold Cryptomatte in Solaris still such a headache?

Is it just me, or is the Cryptomatte workflow in HtoA/Solaris still way more painful than it needs to be?

If you switch over to Karma, you just drop a Cryptomatte LOP and you're done. It handles the manifest, the layers, and the metadata perfectly. In Arnold, we’re still stuck manually messing with Render Vars, routing AOVs, and crossing our fingers that the manifest actually shows up correctly in Nuke.

It feels like we're still using a legacy workflow in a USD environment that's supposed to be modern. We really need a native Arnold Cryptomatte LOP or at least a "one-click" setup in the Render Settings that matches the ease of use in Karma.

0 Likes
Message 15 of 21

am_wilkins
Collaborator
Collaborator

I would recommend checking out the "Arnold Render Settings" HDA again, it's been working much better in new versions.
Allows you to check "Use Cryptomatte" and should work well from there.
arnold_render_settings.png
Otherwise, there is also the "Arnold Cryptomatte AOV" if you just want to add them in separately

4de0db89-7e83-4d6a-8c51-742fe4b7c066.png

0 Likes
Message 16 of 21

Stephen.Blair
Community Manager
Community Manager

It's one click in the Arnold Render Settings LOP. There's a check box Use Cryptomatte

 

https://help.autodesk.com/view/ARNOL/ENU/?guid=arnold_for_houdini_solaris_ah_File_Output_html#crypto...



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 17 of 21

dostlerBYA35
Community Visitor
Community Visitor

This script when placed in a Python LOP will create an AOV for each light in your scene.  Works perfectly for me so far, but I've only been testing for about a week:

 

from pxr import UsdRender, Sdf
import hou
import re

stage = hou.pwd().editableStage()

# --------------------------------------------------
# Settings
# --------------------------------------------------

render_var_root = "/Render/Products/Vars"
skip_dome_lights = True

def safe_name(name):
name = re.sub(r"[^A-Za-z0-9_]+", "_", name)
name = re.sub(r"_+", "_", name)
return name.strip("_")

def is_light(prim):
type_name = prim.GetTypeName()
if not type_name:
return False

if skip_dome_lights and type_name == "DomeLight":
return False

return "Light" in type_name

def set_attr(prim, name, type_name, value):
attr = prim.CreateAttribute(name, type_name)
attr.Set(value)
return attr

def apply_husk_render_var_api(prim):
prim.SetMetadata(
"apiSchemas",
Sdf.TokenListOp.CreateExplicit(["HuskRenderVarAPI"])
)

def create_light_lpe_render_var(light_group):
aov_name = "light_" + light_group
lpe = "C.*<L.'{}'>".format(light_group)
path = "{}/{}".format(render_var_root, aov_name)

# IMPORTANT:
# Remove the old prim first so previous script attributes do not remain.
if stage.GetPrimAtPath(path):
stage.RemovePrim(path)

prim = stage.DefinePrim(path, "RenderVar")
rv = UsdRender.Var(prim)

apply_husk_render_var_api(prim)

# --------------------------------------------------
# Standard RenderVar attrs
# --------------------------------------------------

rv.CreateDataTypeAttr("color4f")
rv.CreateSourceTypeAttr("lpe")
rv.CreateSourceNameAttr(lpe)

# --------------------------------------------------
# Arnold attrs matching your manual example
# --------------------------------------------------

set_attr(prim, "arnold:cryptomatte_filter:filter", Sdf.ValueTypeNames.Token, "gaussian")
set_attr(prim, "arnold:cryptomatte_filter:noop", Sdf.ValueTypeNames.Bool, False)
set_attr(prim, "arnold:cryptomatte_filter:rank", Sdf.ValueTypeNames.Int, -1)

set_attr(prim, "arnold:diff_filter:filter_weights", Sdf.ValueTypeNames.Token, "box")
set_attr(prim, "arnold:farthest_filter:domain", Sdf.ValueTypeNames.Token, "first_hit")

set_attr(prim, "arnold:filter", Sdf.ValueTypeNames.Token, "gaussian_filter")

set_attr(prim, "arnold:heatmap_filter:maximum", Sdf.ValueTypeNames.Float, 1.0)
set_attr(prim, "arnold:heatmap_filter:minimum", Sdf.ValueTypeNames.Float, 0.0)

set_attr(prim, "arnold:variance_filter:filter_weights", Sdf.ValueTypeNames.Token, "box")
set_attr(prim, "arnold:variance_filter:scalar_mode", Sdf.ValueTypeNames.Bool, False)

set_attr(prim, "arnold:width", Sdf.ValueTypeNames.Float, 2.0)

# --------------------------------------------------
# Driver attrs matching your manual example
# --------------------------------------------------

set_attr(prim, "driver:parameters:aov:format", Sdf.ValueTypeNames.Token, "color4f")

set_attr(prim, "driver:parameters:aov:husk:channel_lower_rgb", Sdf.ValueTypeNames.Bool, False)
set_attr(prim, "driver:parameters:aov:husk:channel_prefix", Sdf.ValueTypeNames.String, aov_name)
set_attr(prim, "driver:parameters:aov:husk:clearValue", Sdf.ValueTypeNames.Float, 0.0)
set_attr(prim, "driver:parameters:aov:husk:format", Sdf.ValueTypeNames.Token, "color4f")
set_attr(prim, "driver:parameters:aov:husk:multiSampled", Sdf.ValueTypeNames.Bool, True)

# Your manual example uses $OS here.
set_attr(prim, "driver:parameters:aov:husk:name", Sdf.ValueTypeNames.String, aov_name)

set_attr(prim, "driver:parameters:aov:husk:OpenEXR:compression", Sdf.ValueTypeNames.String, "zips")
set_attr(prim, "driver:parameters:aov:husk:OpenEXR:dwa_compression", Sdf.ValueTypeNames.Int, 85)

set_attr(prim, "driver:parameters:aov:husk:output_colorspace", Sdf.ValueTypeNames.String, "")
set_attr(prim, "driver:parameters:aov:husk:source_colorspace", Sdf.ValueTypeNames.String, "")

set_attr(prim, "driver:parameters:aov:name", Sdf.ValueTypeNames.String, aov_name)

return path

# --------------------------------------------------
# Assign Arnold light groups and create matching AOV vars
# --------------------------------------------------

light_groups = []

for prim in stage.Traverse():
if not is_light(prim):
continue

light_group = safe_name(prim.GetName())
if not light_group:
continue

# The light group name must match the name used inside the LPE.
set_attr(
prim,
"primvars:arnold:aov",
Sdf.ValueTypeNames.String,
light_group
)

light_groups.append(light_group)

# Remove duplicate light group names while preserving order.
light_groups = list(dict.fromkeys(light_groups))

created = []

for light_group in light_groups:
created.append(create_light_lpe_render_var(light_group))

print("Created Arnold light LPE RenderVars:")
for path in created:
print(" " + path)

0 Likes
Message 18 of 21

queengranded
Community Visitor
Community Visitor

Still no luck on my end. I followed several YouTube tutorials and tested both the 'Arnold Render Settings' HDA and the separate 'Arnold Cryptomatte AOV' node, but the Cryptomatte channels are still completely empty in my renders. Is this working out of the box for anyone else?

 Could someone break down the exact step-by-step process to get these AOVs to output properly?https://postimg.cc/gallery/x2ngWsP 

0 Likes
Message 19 of 21

Stephen.Blair
Community Manager
Community Manager

There's no preview in Houdini. Check the EXR in Nuke



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 20 of 21

queengranded
Community Visitor
Community Visitor

https://postimg.cc/gallery/RqnLQK7  Thanks for the tip. I’ve checked the passes in Nuke, but I’m still not seeing the expected result. Since I’ve had no issues with this workflow in SOPs, would you mind guiding me through the proper setup in LOPs? I want to make sure I haven't missed a critical step in the Solaris pipeline.
Thank you.

0 Likes