Getting a list of all available AOVs from a Delegate

Hi,

I am currently trying to determine whether there is a way in the Hydra API to query a list of all available AOVs.
I know there is a way to check whether a RenderDelegate supports known/general AOV types that are contained in the HdAovTokens list.
What I did not find is a way to ask a delegate for AOV types that are not part of the HdAovTokens list, such as AOVs that are renderer-specific and whose names are unknown upfront.

Is there a way to query a delegate for a list of all possible AOVs?

Cheers,

Sebastian

Hi,

I may be wrong, but unfortunately, I think there is no such function.

There is the HdRenderDelegate::GetDefaultAovDescriptor which you can use if you have an aov name.

Usually the list of their aovs is in their documentation…
You may look in their implementation of GetDefaultAovDescriptor in their source code like in Hydra Arnold :

Or Hydra PRMan :

Regards,

David

Hi David,

Thanks for the quick reply.
This seems to be a bummer and quite unfortunate because this means a tool that uses USDHydra requires a priori knowledge about the renderer behind the delegate to offer full functionality and can not query all the needed information from the delegate itself (e.g., if a delegate of a new renderer is added to a system). It seems there is at least some solution for the renderer settings.
Maybe it is worth proposing something similar for AoVs as well.
Some renderers may offer AoVs that are not standard and therefore not part of HdAovTokens, but still valuable for a user.

Cheers,

Sebastian

Hi Sebastian,

I am not sure if it’s possible to have such a function, since with USD render settings and renderVars I can add a custom AOV with a custom name which is using a light path expression if the render delegate supports it.
I guess this will never be caught by a function since it’s created on demand ffrom the render settings of a scene.

Like this .usda file code snippet, look for the “directDiffuse” aov :

def RenderProduct “ProductSecondCam”
{
uniform token productType = “raster”
#This will create a multi-layer exr file with the RGBA channels as well as directDiffuse, id, depth channels as layers in the exr file
uniform token productName = “./Images/testSecond.exr”
rel orderedVars = [
</Render/Vars/color>,
</Render/Vars/alpha>,
</Render/Vars/directDiffuse>,
</Render/Vars/id>,
</Render/Vars/depth>,
</Render/Vars/normal>
]

# For this product, override our RenderSettings camera and resolution 
	rel camera = </Cameras/second_cam>
	uniform int2 resolution = (1024, 768)
}

def Scope "Vars"
{
    def RenderVar "color" {
        string sourceName = "Ci"
    }
    
	def RenderVar "alpha" {
        token dataType = "float"
        string sourceName = "a"
    }
	
	#Using light path expressions
    def RenderVar "directDiffuse" {
        string sourceName = "C<RD>[<L.>O]"
        token sourceType = "lpe"
    }
    
	def RenderVar "id" {
        token dataType = "int"
        string sourceName = "id"
    }
	
	def RenderVar "depth" {
		string sourceName = "z"
    }
	
	def RenderVar "normal" {
        string sourceName = "Nn"
    }
}

}

Regards,
David

So I think knowing the list of AOVs types supported (color/depth/normal/lpe…) by a render delegate would be possible, but not all the names since they can be extended if the render delegate supports LPE.
Regards,
David