Page MenuHome

Blender generated Texture 16bit takes over 12 GB Mem?
Closed, ArchivedPublic


System Information
Win 10 64, AMD HD 5850, i5 3.2 ghz, 12 GB ram

Blender Version
2.79 and master

Short description of error
Going to the UV image editor and creating a new blank texture of 16384x16384 eats all my 12 GB memory and then starts to kill the machine with the swap file, had to turn machine of after 22gb of swap file shown and total unresponsive windows.

This has to be a bug (sounds like memory leak but hey have no idea) or something isnt right, a 16K by 16k 32 bit float generated texture from UV image editor should not take well over 12GB memory. For really good texture bakes I need to be able to bake upto 16K textures.

Exact steps for others to reproduce the error
goto image editor, Generate new texture, 16384x16384, turn of alpha, turn on 32 bit float. create the blank image. Memory goes to 12 gb usage.



Event Timeline

In a Pure empty Blank scene, Just createing the texture uses 5128 MB

Brecht Van Lommel (brecht) lowered the priority of this task from Needs Triage by Developer to Needs Information from User.Dec 21 2017, 3:29 PM

That's exactly the expected number, 16384 x 16384 x 4 float bytes x 4 channels = 4 GB. And then we store another color managed 8 bit image taking up 1 GB.

So the 12 GB is only in case there is other scene memory filling up the rest? In that case there doesn't seem to be a bug here.

Yep thats right, Ok so the 32 bit image option isnt what i thought? Thought it meant 32 bit float e.g 16 bit tiff or png? Does this mean that just a generated texture with out the 32 bit option will be a 16 bit image that can say for example be baked to create a 16 bit heightmap? Because i use 16Kx16k 16bit PNG files all the time and they are no where near 5gb.

So what your saying is the 32 bit option is 32 bit per channel?

Brecht Van Lommel (brecht) closed this task as Archived.EditedDec 21 2017, 4:02 PM
Brecht Van Lommel (brecht) claimed this task.

32 bit float means 32 bits per channel, disabled means 8 bits per channel. Blender does not support editing 16 bit per channel in CPU memory. Files on disk also usually have compression, making them much smaller.

Any chance 16 bit can be supported, No need ever in my case to use full 32bit per channel even for the most accurate height maps, 16 bit would be perfect, smaller in size and still wouldnt have the issues 8bit does. 8 bit is fine for all color, normal etc needs, 16 bit is needed for height, 32 bit is over kill and very memory hungry.

a 16bit option next to the current 32 bit option in the texture generator window would be invaluable.

It's possible, but it would be a huge change. Note also there is 16 bit half float and 16 bit unsigned int, which are quite different.

yeah apparently half float works better with darker ranges and 16 bit int works better with brighter images, I just need a good above 8bit grey scale option for displace/height generation. In order to not support 16 bit could you hack a way to use the 32 bit path in grey scale to reduce resource usage? Im really not clued up on image formats and is hard to get my head round.

There is no quick hack, images are used in many parts of Blender.

OK guess baking out height maps above 8Kx8K in Blender will never be feisable then, that's a pain. Cheers J