I am utilizing Blender 4 for a 2D animation rendering process. The timeline and key events in the animation are as follows:

  • t0=0s: Render a background.
  • t1=2s: MetaStrip.002 is rendered with a 1-second fade-in animation.
  • t2=4s: MetaStrip.003 is rendered with a 1-second fade-in animation.
  • t3=9s: Outro animation begins, lasting for 1s, hiding both MetaStrip.002 and MetaStrip.003.
  • Frame rate: 24 frames per second.
  • Total duration: 10s.

I am encountering issues related to rendering time, as observed in the preview:

  • From t0 to t1, the frames-per-second (fps) remains at 24.
  • From t1 to t2, the fps drops to approximately 16.
  • From t2 to t3, the fps further decreases to around 8.
  • From t3 to the end, the fps continues to decrease to about 6.

Both MetaStrip.002 and MetaStrip.003 contain identical content, featuring a 1-second fade-in animation. The outro animation serves to fade out both elements. That is, in the interval [t=5s, t=9s] the same frame is rendered.

While I comprehend that fps can decline during animations, I do not understand why this negative impact persists beyond the animated segments. How can I address this issue to optimize the rendering process?

enter image description here

My description here refers to the animation preview but I see this negative effects over the total rendition time using the bpy module in code:

def foo(filePath, targetPath):

    bpy.context.scene.render.resolution_x = 1280
    bpy.context.scene.render.resolution_y = 720
    bpy.context.scene.render.fps = 24
    bpy.context.scene.frame_start = 1
    bpy.context.scene.frame_step = 1

    duration = 10
    frames = int(math.ceil(duration * 24))
    bpy.context.scene.frame_end = frames

    bpy.context.scene.render.image_settings.file_format = "FFMPEG"
    bpy.context.scene.render.ffmpeg.format = "MPEG4"
    bpy.context.scene.render.ffmpeg.codec = "H264"
    bpy.context.scene.render.filepath = targetPath

    t0 = time.time()
    print(f"Elapsed Time: {time.time() - t0} seconds")


You must log in to answer this question.

Browse other questions tagged .