On this page |
Tip
This information for developers of third party renderer plugins for Houdini. It is not currently possible to customize the stats displayed for Karma.
Overview ¶
In Houdini 21.0 and later, third party render delegates can display their render stats in the stats panel (the stats sidebar in the render gallery and MPlay).
Note
The third party render delegate must implement the GetRenderStats()
delegate method. The panel can only display stats included in the output of that method.
There are two ways of displaying stats from a third party renderer.
-
The delegate can return stats with certain well-known names (like with the viewport render stats), and Houdini will plug them into a generic template.
or
-
For full control over what stats are displayed and how they look, the delegate can use its own custom QML file.
The generic template is the much easier route. The main drawback is it can only display a “schema” of common stats for all delegates.
Writing a QML template allows full control over what’s displayed and how, but it requires knowledge of QML.
Warning
This functionality is experimental. Please file bugs if you encounter problems showing stats for your render delegate.
Generic Template ¶
If the UsdRenderers.json
file doesn’t specify a custom QML file (see below), Houdini will use a generic template and plug in stats with certain names. As with the Houdini viewport stats, you can map existing stats to the “canonical” names using the statsdatapaths
key in UsdRenderers.json
.
The generic template currently only displays the following stats, but it’s easy for us to add more:
-
fractionDone
orpercentDone
(float) -
totalClockTime
(float, in seconds) (if you publish both this and percent/fractionDone, the template also displays estimated time remaining) -
rendererName
(string) -
rendererStage
(string) -
totalMemory
(int) -
peakMemory
(int)
Custom QML ¶
In the UsdRenderers.jsonfile
, in the section for your delegate, add a qmlTemplate
key pointing to the QML file, for example:
{ "my_delegate": { "qmlTemplate": "/Users/matt/my_delegate.qml" } }
The string can be a file path, or a file:
or
http:` URL.
In the QML, you can access the data from GetRenderStats()
through the stats
variable.
It will include any data specified using statsdatapathsin UsdRenderers.json, just like you currently can for the Houdini viewport.
For example, here’s a really simple QML file that only displays the percentDone
value as text:
import QtQuick import houdini.ui Column { width: parent.width Text { width: parent.width text: `${stats.percentDone} % complete` font.pixelSize: 48 } }