Cycles Image reconstruction Filter, correct sample addition, correct gamma display #44391

Closed
opened 2015-04-14 19:03:33 +02:00 by Mohamed Sakr · 13 comments

1- sample addition feels not correct, I'm used to PBRT2 where samples are added like this:

  float xyz[3];
  L.ToXYZ(xyz);
  pixel.Lxyz += xyz;

but in Cycles it addes RGB to RGB, which seems not correct. "need confirmation"

2- Cycles doesn't have any image reconstruction "I was shocked!!" , when testing a simple rendering with Gaussian Filter of size 2. and size 5., it just altered how samples are created, not final image quality.

here is a good source for an image reconstruction function!
https://github.com/mmp/pbrt-v2/blob/master/src/film/image.cpp#L77-L137

3- gamma display is incorrect, test this in Cycles stand alone, --output image.jpg (will result in false gamma, and it is exactly as the displayed image in OpenGL buffer in Blender or in Cycles) , and --output image.exr (will result in correct gamma)

1- sample addition feels not correct, I'm used to PBRT2 where samples are added like this: ``` float xyz[3]; L.ToXYZ(xyz); pixel.Lxyz += xyz; ``` but in Cycles it addes RGB to RGB, which seems not correct. "need confirmation" 2- Cycles doesn't have any image reconstruction "I was shocked!!" , when testing a simple rendering with Gaussian Filter of size 2. and size 5., it just altered how samples are created, not final image quality. here is a good source for an image reconstruction function! https://github.com/mmp/pbrt-v2/blob/master/src/film/image.cpp#L77-L137 3- gamma display is incorrect, test this in Cycles stand alone, --output image.jpg (will result in false gamma, and it is exactly as the displayed image in OpenGL buffer in Blender or in Cycles) , and --output image.exr (will result in correct gamma)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @MohamedSakr-2

Added subscriber: @MohamedSakr-2
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

Ehh, sounds to me this is a set of todos, but no real bugs? Changing to todo for now

Ehh, sounds to me this is a set of todos, but no real bugs? Changing to todo for now
Author

well I consider (1) as a bug because it adds wrong values "if I'm correct" , they should be added in XYZ color space (not RGB)
about (2) it is misleading for the user, user expects an antialiasing filter, here it doesn't do any reconstruction
about (3) again it is for the "correct" color viewing during render, so user doesn't add light to dark areas "while they are not black if they got gamma correction"

well I consider (1) as a bug because it adds wrong values "if I'm correct" , they should be added in XYZ color space (not RGB) about (2) it is misleading for the user, user expects an antialiasing filter, here it doesn't do any reconstruction about (3) again it is for the "correct" color viewing during render, so user doesn't add light to dark areas "while they are not black if they got gamma correction"

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sergey Sharybin self-assigned this 2015-04-15 18:36:41 +02:00

Will reply on each of the points:

  1. PBRT is working in XYZ space internally because of various reasons (well, it actually does spectrum which is rather straightforward to convert to XYZ) and for the user usable result it's then gets converted to linear RGB space. Cycles on the other hand is biased and uses linear RGB space internally so there's no need to do any sort of conversion when adding samples/passes.
  2. AA filter and image reconstruction are quite separate things, they both happening in integrator but they're happy to exists separately. Now, image reconstruction is rather a hack which allows to get rid of fireflies by canceling some samples. This is a cheat which is fine for static images but which could cause some artifacts in animations. Also, PBRT is just a renderer and in Blender we've got compositor, which means it makes sense to do it as compo node (which for good results might require deep compositing, but it's something we need to support eventually anyway).
  3. It seems the issue is in standalone only? Than it's better to mail me or to bf-cycles ML exact steps of reproducing the issue. This tracker is only about bugs reproduceable in Blender itself.

So thanks for the report, but such reports does not really belong to here.

Will reply on each of the points: 1. PBRT is working in XYZ space internally because of various reasons (well, it actually does spectrum which is rather straightforward to convert to XYZ) and for the user usable result it's then gets converted to linear RGB space. Cycles on the other hand is biased and uses linear RGB space internally so there's no need to do any sort of conversion when adding samples/passes. 2. AA filter and image reconstruction are quite separate things, they both happening in integrator but they're happy to exists separately. Now, image reconstruction is rather a hack which allows to get rid of fireflies by canceling some samples. This is a cheat which is fine for static images but which could cause some artifacts in animations. Also, PBRT is just a renderer and in Blender we've got compositor, which means it makes sense to do it as compo node (which for good results might require deep compositing, but it's something we need to support eventually anyway). 3. It seems the issue is in standalone only? Than it's better to mail me or to bf-cycles ML exact steps of reproducing the issue. This tracker is only about bugs reproduceable in Blender itself. So thanks for the report, but such reports does not really belong to here.
Author

Hey Sergey,

1- you are correct, that's why I needed a confirmation :) as I wasn't sure, but I guess implementing a Spectrum class and giving the user an option to choose between Spectrum and RGB is very good "this is needed before extending Cycles with photons, Caustics, etc.."

2- I disagree at this point, imagine an image which needs 1000 spp to converge in animation, it may need only 500 spp to converge in animation with image reconstruction.

3- the issue is in both standalone and in Blender, I confirmed it with a friend "and by tests" , saving image to OpenEXR saves it with correct gamma "2.2" or to be exact "as written in Cycles"

1.055f * powf(c, 1.0f / 2.4f) - 0.055f;

so if .exr -> bright image with correct feedback (only in save, not in preview buffer)
else -> dark image (similar to preview).

Hey Sergey, 1- you are correct, that's why I needed a confirmation :) as I wasn't sure, but I guess implementing a Spectrum class and giving the user an option to choose between Spectrum and RGB is very good "this is needed before extending Cycles with photons, Caustics, etc.." 2- I disagree at this point, imagine an image which needs 1000 spp to converge in animation, it may need only 500 spp to converge in animation with image reconstruction. 3- the issue is in both standalone and in Blender, I confirmed it with a friend "and by tests" , saving image to OpenEXR saves it with correct gamma "2.2" or to be exact "as written in Cycles" 1.055f * powf(c, 1.0f / 2.4f) - 0.055f; so if .exr -> bright image with correct feedback (only in save, not in preview buffer) else -> dark image (similar to preview).

I didn't tell that image reconstruction does not help, i was only telling that in blender it's not necesserily belong to render engine. Plus, it's not a magic bullet either, it wouldn't help you much with effects like DOF and motion blur.

Gamma 2.2 is not correct for exr files, they're expected to be in linear scene space. What are the steps of reproducing the exr file which is not in linear space from blender?

I didn't tell that image reconstruction does not help, i was only telling that in blender it's not necesserily belong to render engine. Plus, it's not a magic bullet either, it wouldn't help you much with effects like DOF and motion blur. Gamma 2.2 is not correct for exr files, they're expected to be in linear scene space. What are the steps of reproducing the exr file which is not in linear space from blender?
Author

I can't reproduce it from blender, the saved image is exactly = to the previewed image "in any format" , both appear with linear gamma which gives the user wrong impression "at least when he tries to render in progressive mode to test lights and shaders"

in standalone, OpenEXR gamma get changed "corrected", but .jpg for example gives the same impression as preview.

I can't reproduce it from blender, the saved image is exactly = to the previewed image "in any format" , both appear with linear gamma which gives the user wrong impression "at least when he tries to render in progressive mode to test lights and shaders" in standalone, OpenEXR gamma get changed "corrected", but .jpg for example gives the same impression as preview.

First you say that it happens in blender then you say you can't reproduce it in blender. That's confusing.

So if there's something wrong in blender itself, which exact steps you're doing, what you're expecting and what results you're having?

First you say that it happens in blender then you say you can't reproduce it in blender. That's confusing. So if there's something wrong in blender itself, which exact steps you're doing, what you're expecting and what results you're having?
Author

sorry for this, my first test was inside blender "no images saved" , and images were the same, thought it would make the same problem after saving "like in Cycles Standalone" , but the save mechanism is different in Blender and Cycles Standalone.

so the problem is ONLY in the Standalone.

sorry for this, my first test was inside blender "no images saved" , and images were the same, thought it would make the same problem after saving "like in Cycles Standalone" , but the save mechanism is different in Blender and Cycles Standalone. so the problem is ONLY in the Standalone.
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
4 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#44391
No description provided.