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

Campbell Barton ideasman42 at gmail.com
Sun Sep 6 13:07:50 CEST 2015


On Sun, Sep 6, 2015 at 8:25 AM, Ambarisha B <b.ambarisha at gmail.com> wrote:
> 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,
> Ambarisha
>
> PS: I was not sure whether I had put this in the bug tracker. Let me know
> if that's a better idea.

Hi Ambarisha,

This should really go via our bug tracker: http://developer.blender.org
since trying to resolve issues can generate a lot of messages.

Even if you can't re-distribute some content, its important you give
us some way to redo the error.

Regards,
- Campbell


More information about the Bf-committers mailing list