On this page |
Overview ¶
This command lets you specify an EXR file rendered by Karma, and generate a PNG or JPG version of the image, possibly scaled down, with render statistics baked into it.
By default, the command adds the stats in a “sidebar” above, below, or beside the image. You can specify the --overlay
option to overlay the stats tiles onto the image.
Tips and notes ¶
-
In
--overlay
mode, you can specify the alignment of the overlay with just--align
. However, you can also use--edge
to affect the alignment. For example:renderstatsoverlay example.exr --edge top --align start
…is the same as:
renderstatsoverlay example.exr --align topleft
-
In
--overlay
mode, if the specified alignment would put the stats in the center of the image, the command automatically changes it to center bottom alignment. -
Images generated by Karma XPU are missing some statistics compared to Karma CPU.
-
You can customize the stats shown in the overlay using a JSON tile template.
-
Where the command takes AOV names, you can also use numbers to specify the AOV index, for example
0
for the first AOV. -
Currently this command is specific to render stats saved by Karma. Future versions will make the command more renderer-agnostic and customizable.
Usage ¶
renderstatsoverlay [options] infile.exr [ outfile.jpg ]
-
If you don’t specify an output file, the command creates an HTML file with the name
‹original_name›_preview.jpg
, in the same directory. -
If the second argument is an existing directory, the command creates an HTML file with the name
‹original_name›_preview.jpg
, in that directory.
Options ¶
File options ¶
-x ‹file›
/ --overlay-output ‹file›
Outputs the render stats tile graphic to a separate file as a transparent PNG.
-a ‹aov_name›
/ --aov ‹aov_name›
The name of the AOV to use as the image source.
-t ‹template_file›
/ --template ‹template_file›
The JSON tile template file to use to generate the overlay graphic.
The default is $HFS/houdini/config/render_stats_overlay.json
.
See JSON tile format for how to customize the layout.
-s ‹size›
/ --resize ‹size›
By default, the command does not resize the input image. You can use this option to resize the output image to a target width (--resize 1280
) or a percentage of the original size (--resize 50%
).
renderstatsoverlay example.exr --resize 1280 renderstatsoverlay example.exr --resize 60%
--force-resize
Normally, the command will only resize the image to be smaller. Use this option to force the --resize
` option to work even if the output is larger than the original.
-F ‹format›
/ --format ‹format›
The file extension to use for the output file, if you don’t specify an output name.
--color-space ‹name›
Convert the output image to this color space.
The default is sRGB
.
--preserve-transparency
Normally, the command replaces the transparent parts of the input image with a checkerboard pattern in the output. If you specify this option, it preserves any transparency in the original image. (This only makes sense if the output image format supports transparency, such as PNG.)
Stats graphic options ¶
-e ‹edge›
/ --edge ‹edge›
In --sidebar
mode, this sets which side of the image the sidebar is added to.
In --overlay
mode, this overrides the corresponding axis of the --alignment
option.
This is one of top
, left
, right
, or bottom
.
The default is bottom
.
Note
If you specify the left
or right
edge for the sidebar, you should also specify a width for the sidebar with -w
/--width
.
renderstatsoverlay example.exr --sidebar --edge left -w 240
-A ‹alignment›
/ --align ‹alignment›
In overlay mode, this is how to align the stats within the image bounds. In sidebar mode, this is how to align the stats within the sidebar.
-
This is a combination of
left
,right
, orhcenter
, and/ortop
,bottom
, orvcenter
. -
You can use
center
to meanhcenter vcenter
. -
You can also use
topleft
,topright
,bottomleft
, orbottomright
, or compass directions such asn
,nw
,e
,se
, and so on. -
In
--sidebar
mode, you can usestart
to mean the top/left (depending on the sidebar orientation), andend
to mean the bottom/right.
The default is center
.
renderstatsoverlay example.exr --overlay --align "top left" renderstatsoverlay example.exr --sidebar --edge top --align end
-w ‹width›
/ --stats-width ‹width›
The width of the stats graphic. Tiles are “word wrapped” within this width.
You can specify a pixel width (-w 1280
) or a percentage of the output image width (-w 50%
).
-M ‹pixels›
/ --margin ‹pixels›
The margin (in pixels) to add around the stats graphic.
--scale ‹fraction›
Scale the contents of the stats graphic by this factor.
renderstatsoverlay example.exr --scale 1.5
--rotate ‹degrees›
Rotate the contents of the stats graphic by this many degrees.
renderstatsoverlay example.exr --rotate 90