8
$\begingroup$

Does Blender keep a log when it's rendering? Specifically, does it track when the render started, how long each frame took, etc.? I'm super curious about this information.

$\endgroup$
6
  • $\begingroup$ I don't think it does, but it should be relatively simple to implement as an addon $\endgroup$ Dec 15, 2015 at 21:54
  • $\begingroup$ Blender has System Console with text. Show with Menu ... Window Toggle System Console. Frame rendering info of some sort is there. Frame by frame rendering produces timestamps with can be subtracted for time duration. These comments are meant as an interim measure. Blender has frame events which are script accessible. $\endgroup$ Dec 15, 2015 at 21:54
  • $\begingroup$ The console doesn't seem to have anything relevant, I don't think $\endgroup$ Dec 15, 2015 at 21:59
  • 1
    $\begingroup$ With a frame change handler script you might consider subtracting the time of first frame render from the time of last frame render and print text to console. Have you written a script before? A relevant search term here might be .... frame_change.append ............ If time permits I will post one here. If you subtract the relevant file creation times from your operating system you might get a useful duration. $\endgroup$ Dec 15, 2015 at 22:28
  • 3
    $\begingroup$ The rendertime is saved in each rendered image's meta data. You can also write quite a bit of information directly onto the image via the stamp option $\endgroup$
    – gandalf3
    Dec 16, 2015 at 3:01

1 Answer 1

2
$\begingroup$

Here's a quick script you can use to output some simple frame times:

import bpy
from bpy.app import handlers
from datetime import datetime


def render_init_handler(dummy):

    global LASTFRAME
    global STARTTIME

    STARTTIME = datetime.now()
    LASTFRAME = datetime.now()


def render_post_handler(dummy):

    global LASTFRAME
    global STARTTIME

    ELAPSEDTIME = datetime.now() - STARTTIME
    FRAMELENGTH = datetime.now() - LASTFRAME
    frameNum = bpy.context.scene.frame_current
    blendName = bpy.path.basename(bpy.context.blend_data.filepath)[:-6]

    f = open(bpy.path.abspath("//") + blendName + '-renderlog.txt','a')
    f.write("Frame %d - Length: %s - Elapsed: %s\n" % (frameNum,FRAMELENGTH, ELAPSEDTIME)) 
    f.close()

    LASTFRAME = datetime.now()

handlers.render_init.append(render_init_handler)    
handlers.render_post.append(render_post_handler)

You should generate a text file that looks like this inside:

Frame 1 - Length: 0:00:00.139432 - Elapsed: 0:00:00.139441
Frame 2 - Length: 0:00:00.232712 - Elapsed: 0:00:00.372586
Frame 3 - Length: 0:00:00.257580 - Elapsed: 0:00:00.630437
Frame 4 - Length: 0:00:00.265303 - Elapsed: 0:00:00.895999
Frame 5 - Length: 0:00:00.259570 - Elapsed: 0:00:01.155840
Frame 6 - Length: 0:00:00.266500 - Elapsed: 0:00:01.422597
Frame 7 - Length: 0:00:00.260504 - Elapsed: 0:00:01.683389
Frame 8 - Length: 0:00:00.259319 - Elapsed: 0:00:01.942971
Frame 9 - Length: 0:00:00.258627 - Elapsed: 0:00:02.201868
Frame 10 - Length: 0:00:00.260319 - Elapsed: 0:00:02.462535
Frame 11 - Length: 0:00:00.257915 - Elapsed: 0:00:02.720720
Frame 12 - Length: 0:00:00.261301 - Elapsed: 0:00:02.982309
Frame 13 - Length: 0:00:00.262327 - Elapsed: 0:00:03.244906
$\endgroup$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .