You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dealga McArdle edited this page Oct 25, 2015
·
6 revisions
Blender comes with numpy built in. yep!
Mix 3 images
importmathimportnumpyasnpimportbpydefnp_array_from_image(img_name):
img=bpy.data.images[img_name]
returnnp.array(img.pixels[:])
pixelsA=np_array_from_image('A')
pixelsB=np_array_from_image('B')
pixelsC=np_array_from_image('C')
pixelsD= (pixelsA+pixelsB+pixelsC) /3image_D=bpy.data.images['D']
image_D.pixels=pixelsD.tolist()
# then click in the UV editor / to update the view..to see the pixels of `D` updated
Add smallest of each array
# add smallest element valuesinterim_1=np.minimum(pixelsA, pixelsB)
pixelsD=np.minimum(interim_1, pixelsC)