I have a high poly model and I want to bake its diffuse texture to a low poly model.
So here is what I have:
Download the Blender file here:
The result of baking from selected to active looks like this:
However my goal is to replace the transparent background with meaningful color data. Specifically I want the color of the margins to expand into the transparent areas. Let me show you...
the desired result should look something like this:
I don't want to do it manually. The goal is to do it automatically with the help of the Blender Python API.
Currently I use something similar to the following code to bake with the Python API:
bake_image = bpy.data.images.new('bake_image',width=2048, height=2048)
bake_node.image = bake_image
self.bake_image.filepath_raw = 'bake_image.tif'