Single channel byte image takes same amount of memory in Cycles as multi channel image (GPU and CPU) #49613
Labels
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#49613
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Windows 10 64bit, Geforce GTX970 (driver 373.06)
Blender Version
Broken: 2.78
Short description of error
As the title says. 2k image textures (rgb and single channel version) are provided and packed in the blend file.
Cycles should display less memory usage according to
3c85e1ca1a
when using the grayscale versionExact steps for others to reproduce the error
Rendering scene with rgb texture:
Taking same amount of memory when rendering with grayscale texture:
Single channel test.blend
Note: Maybe packing the texture files into the blend changed its' internal format to RGB, however the problem still is there with the original external files:
Thanks in advance!
Changed status to: 'Open'
Added subscriber: @DavidUllmann
Added subscriber: @intracube
I'm seeing similar behaviour on 2.78 (linux), but only for packed images. Files referenced from disk use less memory as long as they're true single channel. I'm not seeing any memory savings on GPU though - packed or unpacked.
(for unpacked image)
single channel PNG:
CPU 9MB
GPU 32MB
RGB PNG:
CPU 32MB
GPU 32MB
(for packed image)
single channel PNG:
CPU 32MB
GPU 32MB
RGB PNG:
CPU 32MB
GPU 32MB
Added subscriber: @Sergey
Packed images are always RGBA. This is a known limitation.
If i unpack the images from provided .blend and convert them to grayscale in Gimp i've got noticeable memory save in render.
So make sure your image is set to grayscale (as in, only stores single channel) and if there's still no memory saving with such file please provide original image file.
this is the original image file.
Makes no defference in memory usage here, regardless of rendering with cpu od gpu.
Tried exporting as grayscale from Blender and again checked in Gimp that it is single channel (which it is definetly).
With the .blend attached here you need to disable autopack (File -> External Data -> Automatically Pack into .blend). After doing that and opening the new image in shader brings memory usage form 20M to 8M here, Both on Linux and Win7.
Can you confirm that with un-packed image you still have an error?
Yes, still no change in memory usage here, tested with autopack off.
Can you upload the unpacked png that's causing the problem?
@intracube see above for the original file :)
Ah, sorry. Didn't realise the inline image was it.
Still can't reprooduce on linux. GRAYSCALE.png peaks at just over 5MB, converting to RGB 24bit increases it to 17MB.
@DavidUllmann, can you upload exact .blend you use to test memory usage? (make sure you don't hit pack images before uploading :)
Single channel test.blend here it is, also the original rgb image .
Thanks for looking into it :)
Also, should the file info in the properties region of the node editor change to something like 'BW' or 'Grayscale' when selecting an image texture node?
@DavidUllmann, ideally yes but let's keep it outside of this bug report. Will check the file later.
Just to add, I tried the supplied .blend and have got inconsistent results after removing the embedded images. On one attempt, RAM usage didn't decrease for the single channel image. Another attempt seemed to work.
I was also going to mention the incorrect labelling in the image preview...
We need to know exact steps reproducing the issue. Just mentioning that issue happens spontaneously doesn't give any clues about where the issue might be.. it might be in a particular .blend setup..
prepared another blend:
create a plane
subdivide in edit mode and unwrap
apply new material
create 4k color grid texture in uv/image editor
export texture as RGB png -> RGB.png
export another version as BW.png (gimp and irfan view correctly recognize image as grayscale)
load textures in node editor (set 'non color data' in image node) and render...
result: expected memory savings in viewport render and with F12, cpu and gpu.. ~65Mb vs. 16Mb
this is weird... @Sergey any hints why this is not working with the original blend?
Thanks for looking into this btw :)
single channel test 2.blend
I think I found the problem: Although I was editing the original file in Photoshop CS5 in grayscale mode, when saving it as PNG, Photoshop creates an RGB image nevertheless... No problem from Blender side here!
Changed status from 'Open' to: 'Resolved'
Considering resolved then :)
Let us know if there's real bug tho.
Added subscriber: @bliblubli
I would rather close it as todo. There is absolutely no warning in the UI that packed texture will explode the memory usage, even if unpacked afterwards and that an external tool is then needed. Is it really hard to implement single channel packed images that it has to wait for 2.8?