Values in depth channel saved incorrectly on .blend file re-open #43180

Closed
opened 2015-01-09 15:29:37 +01:00 by BCheatham · 18 comments

System Information
OSX 10.9.5
NVIDIA GeForce GT 330M

Blender Version
Broken: 2.72b 93963ae
Worked: 2.69

Short description of error
Using compositor to save Z-channel to a greyscale png. On first creation, compositor saves images with correct depth in blender units. Then .blend file is saved and re-opened and rendering re-run in the the same way. The depths saved to the png on this second run are now incorrect (they appear to now have gamma correction applied to them).

Exact steps for others to reproduce the error

  1. Open attached blend file
  2. Observe that camera is 0.5 units from the plane
  3. Delete the file output node from the compositor and re-create a file output node with these properties:
    • 8-bit png
    • BW
  4. Run render
  5. Open saved png file (/tmp/Image0001.png) in matlab/python or similar. Values should be 128 (= 0.5 * 2^8)
  6. Save blend file and re-open
  7. Re-render scene and open png file in matlab/python or similar. Values should be 188 (~= 0.5^(1/2.2) * 2^8)

.bug.blend

**System Information** OSX 10.9.5 NVIDIA GeForce GT 330M **Blender Version** Broken: 2.72b 93963ae Worked: 2.69 **Short description of error** Using compositor to save Z-channel to a greyscale png. On first creation, compositor saves images with correct depth in blender units. Then .blend file is saved and re-opened and rendering re-run in the the same way. The depths saved to the png on this second run are now incorrect (they appear to now have gamma correction applied to them). **Exact steps for others to reproduce the error** 1) Open attached blend file 2) Observe that camera is 0.5 units from the plane 3) Delete the file output node from the compositor and re-create a file output node with these properties: - 8-bit png - BW 4) Run render 5) Open saved png file (/tmp/Image0001.png) in matlab/python or similar. Values should be 128 (= 0.5 * 2^8) 6) Save blend file and re-open 7) Re-render scene and open png file in matlab/python or similar. Values should be 188 (~= 0.5^(1/2.2) * 2^8) .[bug.blend](https://archive.blender.org/developer/F136416/bug.blend)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @BillCheatham

Added subscriber: @BillCheatham

Added subscribers: @Sergey, @mont29

Added subscribers: @Sergey, @mont29

Sergey, do you think some colormanagement could happen here?

Sergey, do you think some colormanagement could happen here?
Lukas Tönne was assigned by Sergey Sharybin 2015-01-13 10:48:25 +01:00

The issue is caused by 1687023. FOr some reason after that commit socket type of the File Output node is no longer valid after file re-open (it's COLOR instead of VECTOR).

Will let author of that commit to fix the issue!

The issue is caused by 1687023. FOr some reason after that commit socket type of the File Output node is no longer valid after file re-open (it's COLOR instead of VECTOR). Will let author of that commit to fix the issue!
Member

Added subscriber: @TheOnlyJoey

Added subscriber: @TheOnlyJoey
Member

Is this still a issue?
I have tried checking the values of the rendered png's and they seem to be identical throughout renders.

Is this still a issue? I have tried checking the values of the rendered png's and they seem to be identical throughout renders.
Author

It seems that several years later this is unfortunately still an issue. I can follow my steps above using 2.79b, on OSX, and reproduce exactly the same bug. I don't know where to start to try to fix this, but it would help a lot of problems we are having at this end.

@TheOnlyJoey when it worked for you, were you following the 7 steps in the bug report?

Thanks

It seems that several years later this is unfortunately still an issue. I can follow my steps above using 2.79b, on OSX, and reproduce exactly the same bug. I don't know where to start to try to fix this, but it would help a lot of problems we are having at this end. @TheOnlyJoey when it worked for you, were you following the 7 steps in the bug report? Thanks
Author

Is there perhaps a workaround we could use for now? For example, is there a node I could insert before the File Output node which would force the socket type to VECTOR? Thanks.

Is there perhaps a workaround we could use for now? For example, is there a node I could insert before the File Output node which would force the socket type to VECTOR? Thanks.
Lukas Tönne was unassigned by Dalai Felinto 2019-12-23 16:37:55 +01:00

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Problem still seen in blender 2.83.

Problem still seen in blender 2.83.

Added subscriber: @manzanilla

Added subscriber: @manzanilla
  1. Re-render scene and open png file in matlab/python or similar. Values should be 188 (~= 0.5^(1/2.2) * 2^8)

This step means we were getting 188 result and it should not happen right?

I tried the steps on "2.92.0 Alpha, branch: master, commit date: 2020-12-25 00:41, hash: 565ea3df60" - Windows 10
On step 5: I get an image with values 128
On step 7: I get an image with values 128 too

I think the results are correct. Otherwise there is something I don't understand. When connecting the depth socket to the file output node socket, the later gets converted to VALUE type. On saving and reopening is still VALUE type which I think is correct. Maybe there has been changes in later versions or it's something specific to file saving in OSX.

> 7. Re-render scene and open png file in matlab/python or similar. Values should be 188 (~= 0.5^(1/2.2) * 2^8) This step means we were getting 188 result and it should not happen right? I tried the steps on "2.92.0 Alpha, branch: master, commit date: 2020-12-25 00:41, hash: `565ea3df60`" - Windows 10 On step 5: I get an image with values 128 On step 7: I get an image with values 128 too I think the results are correct. Otherwise there is something I don't understand. When connecting the depth socket to the file output node socket, the later gets converted to VALUE type. On saving and reopening is still VALUE type which I think is correct. Maybe there has been changes in later versions or it's something specific to file saving in OSX.
Member

Added subscriber: @EAW

Added subscriber: @EAW
Member

While I can confirm that I can reproduce this issue in 2.79b, I do not get the issue when using 2.83 or 2.92 date: 2020-12-24 19:11, hash: af316d2761


Tested using:
OS: Windows-10-10.0.19041.630-SP0 64 Bits
GPU: GeForce GTX 470/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 391.35
CPU: i7-950 @3.07 GHz SSE2 SSE3 SSE41
RAM: 8.00 GB

While I can confirm that I can reproduce this issue in 2.79b, I do not get the issue when using 2.83 or 2.92 date: 2020-12-24 19:11, hash: af316d276144 --- Tested using: OS: Windows-10-10.0.19041.630-SP0 64 Bits GPU: GeForce GTX 470/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 391.35 CPU: i7-950 @3.07 GHz SSE2 SSE3 SSE41 RAM: 8.00 GB

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Manuel Castilla self-assigned this 2021-10-23 21:38:22 +02:00

Seems fixed. It cannot be reproduced in newer versions.

Seems fixed. It cannot be reproduced in newer versions.
Author

Hi all – As the person who originally reported this bug, I'd just like to thank you all for carefully caring for and resolving this issue over the last few years! It's great to see a community care so much about what it builds.

Blender is often used in the computer vision community for creating datasets with ground-truth depths (e.g. http://www.tobias-weis.de/groundtruth-data-for-computer-vision-with-blender/), and this fix will ensure those saved depth values are correct.

Thanks again

Hi all – As the person who originally reported this bug, I'd just like to thank you all for carefully caring for and resolving this issue over the last few years! It's great to see a community care so much about what it builds. Blender is often used in the computer vision community for creating datasets with ground-truth depths (e.g. http://www.tobias-weis.de/groundtruth-data-for-computer-vision-with-blender/), and this fix will ensure those saved depth values are correct. Thanks again
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
7 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#43180
No description provided.