Bpy.data.images single channel?

I’m generating height/roughness/metalness maps (in blender, data is not coming from a file) at high resolutions, all images in bpy.data.images seem to be RGBA, now for low resolutions this is not too much of an issue, but at 8x8k float images the memory required is getting out of hand rapidly.

8192 x 8192 x 4 (channels) x 4 (sizeof(float)) = 1073741824 so, that’s 1 gig for a single RGBA Image, now do it for height/roughness/metalness, and you have 2.3gb of essentially worthless data vs 768mb of useful data. not great… also generating the dummy filler data comes at rather significant cost at these resolutions as well.

How so I convince bpy.data.images to let me make a single channel image?

bpy.data.images.new doesn’t have the number of channels in the function signature and bpy.data.images[“myimage”].channels is readonly.

Help?

3 Likes

I’ve run into this as well. Did you manage to find a way to create a single channel Image?