[Bf-committers] Performance Issue with bpy.ops.object.bake_image()

Ambarisha B b.ambarisha at gmail.com
Sun Sep 6 00:25:12 CEST 2015

Hi all,

We are trying to use blender to automate lightmap baking for our models.
Here's a problem we've observed:

bpy.ops.object.bake_image() call takes increasingly longer time for each
mesh in the model. A few notes on the problem:

* Happens with environment lighting turned on or off.
* The time taken to bake 1 lightmap climbs very consistently and linearly.
* Happens even when everything is setup beforehand and just bake_image()
calls are executed for each mesh.

Here're the possibilities I've considered:

* This is expected behaviour. In that case, is there a way for me to reset
something for every few meshes?
* Our script is bloating up the memory with large lists (vertices & faces)
that is causing the bad perf. But that doesn't explain why performance is
dropping gradually.

I would've just uploaded the script, but can't. Any pointers on what could
be causing the issue would be great.

Blender is awesome,

PS: I was not sure whether I had put this in the bug tracker. Let me know
if that's a better idea.

More information about the Bf-committers mailing list