Render Stats Overlay JSON config file and batch processing

   1327   3   1
User Avatar
Member
6 posts
Joined: Dec. 2021
Offline
Greetings,

I'm searching on how to properly setup the render stats overlay command to generate render stats on top of my renders for reviewing and debugging. By looking at the documentation, I found that we can configure a .json file to have certain stats we want like the machine name, number of lights...

I found the render_stats_overlay.json inside $HFS/houdini/config, which looks like this :


We can see that each render stat is retrieve with the command :
"json_path": "husk.render_camera" for instance.

So my questions are :
  1. What are the proper husk functions / attributes to retrieve and to put inside the json file, because I can't find any infos on those functions and their proper names.
  2. How to batch process multiple rendered frames automatically. I went with a .bat script as you can see below :
    @echo off
    setlocal enabledelayedexpansion
    
    set "batchSize=50"
    
    :: Define paths
    set "inputDir=D:\HDD_Documents\ArtFX\4_FX\Light_Comp\RBX\03_Production\Assets\Enviro\roubaixStation\Renders\3dRender\review\scanning\v0001"
    set "overlayCmd=C:\Program Files\Side Effects Software\Houdini 20.0.724\bin\renderstatsoverlay.bat"
    set "outputDir=%inputDir%\review_stats"
    
    ::Ensure the overlay command exists
    if not exist "%overlayCmd%" (
        echo : ERROR : renderstatsoverlay.bat not found at "%overlayCmd%"
        pause
        exit /b 1
    )
    
    :: Ensure the input directory exists
    if not exist "%inputDir%" (
        echo : ERROR: Input directory not found at "%inputDir%"
        pause
        exit /b 1
    )
    
    ::Create the output directory if it doesn't exists
    if not exist "%outputDir%" (
        mkdir "%outputDir%"
    )
    
    ::Initialize batch size counter
    set "batchCount=0"
    
    :: Process each .exr file in the input directory
    for %%f in ("%inputDir%\*.exr") do (
        :: Extract the full file name without extension
        set "fileName=%%~nf"
    
        :: Split the file name into the base name and frame number
        for /f "tokens=1,2 delims=." %%a in ("!fileName!") do (
            set "baseName=%%a"
            set "frameNumber=%%b"
        )
    
        :: Construct the output file name with "_stats" before the frame number
        set "outputFile=%outputDir%\!baseName!_stats.!frameNumber!.png"
    
        :: Execute Houdini renderstatoverlay.bat 
        call "%overlayCmd%" "%inputDir%\!fileName!.exr" ^
        -x "!outputFile!" ^
        --color-space ACEScg ^
        --overlay ^
        --e left ^
        -w 240
    
        :: Increment the batch counter
        set /a batchCount+=1
    
        :: If the batch count reaches the batch size, wait and continue with the next batch
        if !batchCount! geq %batchSize% (
            echo Processed !batchCount! files. Waiting for 30 seconds...
            timeout /t 30 /nobreak >nul
            set "batchCount=0"
    
        )
    )
    
    pause
    

    But the main problem I have with a .bat script is that there is a limit to a batch execution in terms of command amount and lines. Here in this script, the .bat file stops after 65 frames (while I'm trying to batch 200 frames). Do you have any suggestions?

Thanks in advance!

Attachments:
render_stats_overlay_json_0001.jpg (400.0 KB)

User Avatar
Member
281 posts
Joined: Jan. 2015
Offline
The values comes from metadata in the exr. Open it in Nuke or another program it's easy to see metadata, to check what the names are.


You can run shell command in ROP contex.

I have made a python script that generate the command each frame.

Completed command looks something like this.

"C:/Program Files/Side Effects Software/Houdini 20.5.445/bin/renderstatsoverlay.bat" --color-space "Mouse Grade" "path/to/exr" "path/to/jpeg" --overlay --template "path/to/template"
Edited by Heileif - Jan. 14, 2025 23:30:22
User Avatar
Member
6 posts
Joined: Dec. 2021
Offline
Heileif
The values comes from metadata in the exr. Open it in Nuke or another program it's easy to see metadata, to check what the names are.


You can run shell command in ROP contex.

I have made a python script that generate the command each frame.

Completed command looks something like this.

"C:/Program Files/Side Effects Software/Houdini 20.5.445/bin/renderstatsoverlay.bat" --color-space "Mouse Grade" "path/to/exr" "path/to/jpeg" --overlay --template "path/to/template"
Thank you for the information.

Would you mind sharing your python script to generate the command? I'm very interested.
User Avatar
Member
281 posts
Joined: Jan. 2015
Offline
Sent it to you as a message.

It's built into our submitter so it gets added to Deadline with dependency on the render it will create overlay on. It need modification to work other places.

But in short it checks the USD stage for productName to get the output path of the exr files, and generates the command from that information.
  • Quick Links