Blender generated Texture 16bit takes over 12 GB Mem? #53605

Closed
opened 2017-12-21 15:00:45 +01:00 by James W E Bird · 12 comments

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.

**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.
Author

Added subscriber: @JamesBird

Added subscriber: @JamesBird
Author

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

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

Added subscriber: @brecht

Added subscriber: @brecht

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.

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.
Author

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?

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?

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Brecht Van Lommel self-assigned this 2017-12-21 16:02:41 +01:00

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.

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.
Author

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.

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.

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.
Author

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.

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.

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

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

OK guess baking out height maps above 8Kx8K in Blender will never be feisable then, that's a pain. Cheers J
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#53605
No description provided.