Jump to content

Render time burn-in


Recommended Posts

If you render through a queue manager it will save the statistics for the renders. For example HQueue that comes with Houdini. If you're rendering on a workstation you can open the Scheduler window from the Render menu at the top of Houdini, then deselect the checkbox to clear completed renders (bottom left).

Link to comment
Share on other sites

I'm rendering on a workstation, and I can use the render scheduler to see the render times. But I'm right now testing out the wedge ROP and it becomes hard to pair times to images pretty quickly. That's why I would ask for a burn-in. I've gotta look into hqueue and test that out as well. Currently i'm using the hwatermark program to do the burn-in, but I guess there isn't a variable for last rendered frame available in a GUI session. I'm aware of that I can see times in the terminal when rendering, but I don't know if I can extract that information easily.

Link to comment
Share on other sites

Changing the verbosity level on your mantra rop to something like 3 will give you render times per frame in your Houdini shell. You could still render via command line using Hscript/Hbatch with apprentice.

The other option is turning on the rendertime diagnostic AOV which will give you the render time for each bucket, then finding some way to add up all the buckets of the image.

Link to comment
Share on other sites

That's an interesting approach, should be possible to add all the pixel values together with COP -> CHOP and divide by the number of buckets.

Sure, raising the verbosity level gives the time in the terminal but that's not very useful when you render out a lot of wedges. How do you pair the time value with the correct image?

Sure, by simply sorting the files by when they were last edited I can see how many minutes it took to create, but it's not really accurate. I'm a little surprised that a render time variable isn't available?

Link to comment
Share on other sites

You may take a look on this page: http://www.sidefx.com/docs/houdini12.5/render/python for inspiration.

Houdini comes with a tool called hwatermark. It's a matter of giving it a data to print-in render time on your image.

The ugly way is to use Post-render scripts or Shell ROP and parse mantra output. Another, perhaps cleaner, approach is to use Python IFD filtering.

Save bellow snippet to somefile.py and set command parm on Mantra ROP to mantra -P somefile.py. .

This is just an example. Even nicer would be using bucket callback, which actually knows time and ram usage during render time (as stated in above Help page), but - if I'm not mistaken - it won't work, as the last bucket still keeps image open.


import mantra, time, os
start_time = 0

def filterRender():
global start_time
start_time = time.time()

def filterEndRender():
image = mantra.property("image:filename")[0]
rtime = time.time() - start_time
font = os.path.join(os.getenv("HH"), "fonts/Courier")
rtime = time.strftime("%H:%M:%S", time.gmtime(rtime))
command = 'hwatermark -x 4 10 -m "Render time: %s" %s %s %s 10' % (str(rtime), image, image, font)
os.system(command)
[/CODE]

edit: ("image:filename") could be actually anywhere...

hth.

skk.

Edited by symek
Link to comment
Share on other sites

This is just an example. Even nicer would be using bucket callback, which actually knows time and ram usage during render time (as stated in above Help page), but - if I'm not mistaken - it won't work, as the last bucket still keeps image open.

It actually works for me if I start hwatermark as a new subprocess. This way mantra can close the file and hwatermark can edit it. Maybe you could even add a little delay so it's more robust.

Just enter the file with the script into the Statistics>vm_tilecallback parameter.


import mantra, os, datetime
from subprocess import Popen

tile = mantra.property("tile:ncomplete")[0]

if tile == 1:
ntiles = mantra.property("tile:ntiles")[0]

if tile == ntiles:
image = mantra.property("image:filename")[0]
total = mantra.property("tile:totaltime")[0]
font = os.path.join(os.getenv("HH"), "fonts/DejaVuSans")
wm = os.path.join(os.getenv("HFS"), "bin/hwatermark.exe")
command = '%s -x 10 10 -m "RENDERTIME: %s h:mm:ss" %s %s %s 15' % (wm, str(datetime.timedelta(seconds=int(total))), image, image, font)
Popen(command)
[/CODE]

Best,

Dennis

Edited by dennis.weil
Link to comment
Share on other sites

Hmm, that's really unfortunate. I've been trying PIL but it doesn't support exr and I could not get any python wrapper for ImageMagick to work. Maybe I should try to use the commandline version of ImageMagick instead. IM at least supports 16bit floating point. I will go ahead and give it a try.

Edited by dennis.weil
Link to comment
Share on other sites

For my purposes I can live with the clamping, but it is indeed unfortunate. Is there any way to add the data as metadata instead?

As far as I know OpenEXR has no mechanism for metadata. It would be a nice feature to have because other things like the artist and render node could be embedded in the image too.

Link to comment
Share on other sites

Looking at an EXR in nuke there is plenty of metadata, so i think it is possible? exr/comment could be a place to put it. I wonder if hwatermark is advanced enough to do the trick.

Nice! Do you know if that's specific to Nuke or is that a standard thing? When looking at the OpenEXR specifications I couldn't find anything about metadata, maybe I'm looking in the wrong places though. This is where I checked first but there might be newer developments not in the documentation.

http://www.openexr.com/openexrfilelayout.pdf

Edited by lukeiamyourfather
Link to comment
Share on other sites

OpenEXR files can hold any number of metadata information, they are not hard coded beyond standard set. "comment" is one apparently acclamed as standard. Unfortunatelly Houdini does not allow to add custom tags to a file. SESI recently has added camera matrices to exr output (similarly to rat files), "comment" was always there on Mantra ROP.

edit: if I'm not mistaken, one of openimageio command line tools allows for adding string attributes to a EXR file.

Edited by symek
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...