Posted by: Jeff | 2017/04/27

Houdini: Simulation Timestamp

This is a short python script that I’m currently using to print out the total simulation processing time of the current DOP network.


Timestamp output

import datetime

def simTimeStamp(event_type, frame):
    global tStart, tEnd
    if event_type == hou.playbarEvent.FrameChanged and frame == 1:
    if event_type == hou.playbarEvent.Started:
        tStart =
    if event_type == hou.playbarEvent.Stopped:
        tEnd =
        tDelta = tEnd - tStart
        print "Simulation time:", tDelta


if hou.frame() == 1:

Run the code as a shelf tool.
It will reset the simulation, and restart it again from frame 1. Afterwhich, the timestamp will be printed on the python shell.

I created this instead of using the Performance Monitor so as to avoid the overhead of the utility.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: