Noise seed for stereoscopic rendering #50024

Closed
opened 2016-11-14 16:36:49 +01:00 by Gatis Kurzemnieks · 10 comments

Not a bug, but design issue.
When rendering stereoscopic images, the same seed is used for both left and right eye renders. If there is a noise in frame it has the same pattern in both eyes. Your brain picks this up and because noise patterns are identical (there is no stereo offset) it visually looks like there is a noise sheet floating in the air. It's obvious only when viewing your rendered image in VR headset.

Currently to avoid this you need to have insanely high sample settings to avoid having noise at all.

It would be very welcome to enable randomizing seed for each eye, not only per-frame - I believe it would solve the issue.

Another great solution would be to add pre_render and post_render python callbacks that work per-eye. Currently they are called only once for both eyes.

Not a bug, but design issue. When rendering stereoscopic images, the same seed is used for both left and right eye renders. If there is a noise in frame it has the same pattern in both eyes. Your brain picks this up and because noise patterns are identical (there is no stereo offset) it visually looks like there is a noise sheet floating in the air. It's obvious only when viewing your rendered image in VR headset. Currently to avoid this you need to have insanely high sample settings to avoid having noise at all. It would be very welcome to enable randomizing seed for each eye, not only per-frame - I believe it would solve the issue. Another great solution would be to add pre_render and post_render python callbacks that work per-eye. Currently they are called only once for both eyes.

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @GatisKurzemnieks

Added subscriber: @GatisKurzemnieks

Added subscribers: @Sergey, @sebastian_k, @dfelinto

Added subscribers: @Sergey, @sebastian_k, @dfelinto

@sebastian_k how are you handling this at the moment? @Sergey was this even a concern for the Caminandes VR project?

@sebastian_k how are you handling this at the moment? @Sergey was this even a concern for the Caminandes VR project?
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Dalai Felinto was assigned by Sergey Sharybin 2016-11-18 16:04:52 +01:00

@dfelinto, we didn't really consider this as a big concern AFAIR. Something simple like this will fix it tho:

P428: Patch for #50024

diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp
index c250a54..ed03ecf 100644
--- a/intern/cycles/blender/blender_session.cpp
+++ b/intern/cycles/blender/blender_session.cpp
@@ -498,7 +498,8 @@ void BlenderSession::render()
 		scene->film->tag_update(scene);
 		scene->integrator->tag_update(scene);
 
-		for(b_rr.views.begin(b_view_iter); b_view_iter != b_rr.views.end(); ++b_view_iter) {
+		int view_index = 0;
+		for(b_rr.views.begin(b_view_iter); b_view_iter != b_rr.views.end(); ++b_view_iter, ++view_index) {
 			b_rview_name = b_view_iter->name();
 
 			/* set the current view */
@@ -514,6 +515,12 @@ void BlenderSession::render()
 			                &python_thread_state,
 			                b_rlay_name.c_str());
 
+			/* Make sure all views have different noise patterns. */
+			if(view_index != 0) {
+				scene->integrator->seed += view_index;
+				scene->integrator->tag_update(scene);
+			}
+
 			/* Update number of samples per layer. */
 			int samples = sync->get_layer_samples();
 			bool bound_samples = sync->get_layer_bound_samples();

Assigning to you, feel free to commit the change :)

@dfelinto, we didn't really consider this as a big concern AFAIR. Something simple like this will fix it tho: [P428: Patch for #50024](https://archive.blender.org/developer/P428.txt) ``` diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp index c250a54..ed03ecf 100644 --- a/intern/cycles/blender/blender_session.cpp +++ b/intern/cycles/blender/blender_session.cpp @@ -498,7 +498,8 @@ void BlenderSession::render() scene->film->tag_update(scene); scene->integrator->tag_update(scene); - for(b_rr.views.begin(b_view_iter); b_view_iter != b_rr.views.end(); ++b_view_iter) { + int view_index = 0; + for(b_rr.views.begin(b_view_iter); b_view_iter != b_rr.views.end(); ++b_view_iter, ++view_index) { b_rview_name = b_view_iter->name(); /* set the current view */ @@ -514,6 +515,12 @@ void BlenderSession::render() &python_thread_state, b_rlay_name.c_str()); + /* Make sure all views have different noise patterns. */ + if(view_index != 0) { + scene->integrator->seed += view_index; + scene->integrator->tag_update(scene); + } + /* Update number of samples per layer. */ int samples = sync->get_layer_samples(); bool bound_samples = sync->get_layer_bound_samples(); ``` Assigning to you, feel free to commit the change :)

Awesome! Thank you Sergey!

Awesome! Thank you Sergey!

In #50024#404772, @dfelinto wrote:
@sebastian_k how are you handling this at the moment?

Yeah, we did notice this noise veil kind of effect, but then again noise always looks crappy, so we just try to render as noisefree as possible. :)
And when doing so the "veil" is not noticable anymore. But different noise patterns per eye could be interesting. If I understand the code above correctly it seems like a great solution, since it is not totally random, but re-rendering parts of the image would still give the same result per eye so you can overlay with identical noise pattern, which is something we do quite often to fix stuff in final renders.

> In #50024#404772, @dfelinto wrote: > @sebastian_k how are you handling this at the moment? Yeah, we did notice this noise veil kind of effect, but then again noise always looks crappy, so we just try to render as noisefree as possible. :) And when doing so the "veil" is not noticable anymore. But different noise patterns per eye could be interesting. If I understand the code above correctly it seems like a great solution, since it is not totally random, but re-rendering parts of the image would still give the same result per eye so you can overlay with identical noise pattern, which is something we do quite often to fix stuff in final renders.

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Fixed on 0f8e5f4fb4 Thanks for the report. And @sebastian_k great to count on you, thanks.

Fixed on 0f8e5f4fb4 Thanks for the report. And @sebastian_k great to count on you, thanks.
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
5 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#50024
No description provided.