EEVEE: "Viewport Render Image" and "Viewport Render Animation" different results (colormanagement) #75280

Closed
opened 2020-04-01 15:53:38 +02:00 by chay hawes · 19 comments

System Information
Operating system: Win 10
Graphics card: 1080Ti

Blender Version
Broken: version: 2.83 (sub 11), branch: master, commit date: 2020-03-31 15:31, hash: 1c1a14dcdf
Worked: 2.81a

Short description of error
Result from viewport Render Image and Viewport Render Animation are different
The Render Animation frame has washed out and muted slightly green colour, as if it is not considering all the lighting correctly.
(especially visible on yellow front of truck

See attached images
282a_frame.jpg

282a_animation.jpg

Exact steps for others to reproduce the error
chayground_test_scene_stripped.zip

  • Open file
  • Set Start and End frame to 1
  • Set viewport shading to Rendered
  • In 3D view click View > Viewport Render Image, save as for comparison
  • In 3D view click View > Viewport Render Animation, save as for comparison
  • Compare saved images

There will be noticable difference.

**System Information** Operating system: Win 10 Graphics card: 1080Ti **Blender Version** Broken: version: 2.83 (sub 11), branch: master, commit date: 2020-03-31 15:31, hash: `1c1a14dcdf` Worked: 2.81a **Short description of error** Result from viewport Render Image and Viewport Render Animation are different The Render Animation frame has washed out and muted slightly green colour, as if it is not considering all the lighting correctly. (especially visible on yellow front of truck See attached images ![282a_frame.jpg](https://archive.blender.org/developer/F8441558/282a_frame.jpg) ![282a_animation.jpg](https://archive.blender.org/developer/F8441557/282a_animation.jpg) **Exact steps for others to reproduce the error** [chayground_test_scene_stripped.zip](https://archive.blender.org/developer/F8441538/chayground_test_scene_stripped.zip) - Open file - Set Start and End frame to 1 - Set viewport shading to Rendered - In 3D view click View > Viewport Render Image, save as for comparison - In 3D view click View > Viewport Render Animation, save as for comparison - Compare saved images There will be noticable difference.
Author

Added subscriber: @Chayground

Added subscriber: @Chayground

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

I can confirm difference, but not this big difference so I may be looking at completely different issue. Can you upload sample file?

I can confirm difference, but not this big difference so I may be looking at completely different issue. Can you upload sample file?
Author

I've stripped it back as best I can as it was a massive scene. Sorry it's still 56Mb
Problem persists, I've attached the file:

chayground_test_scene_stripped.zip

and here are two images showing the difference between Viewport Render Frame and Viewport Render Animation:

282a_frame.jpg

282a_animation.jpg

Thanks,

Chay

I've stripped it back as best I can as it was a massive scene. Sorry it's still 56Mb Problem persists, I've attached the file: [chayground_test_scene_stripped.zip](https://archive.blender.org/developer/F8441538/chayground_test_scene_stripped.zip) and here are two images showing the difference between Viewport Render Frame and Viewport Render Animation: ![282a_frame.jpg](https://archive.blender.org/developer/F8441558/282a_frame.jpg) ![282a_animation.jpg](https://archive.blender.org/developer/F8441557/282a_animation.jpg) Thanks, Chay
Author

It's a difference across the entire scene but noticeable most in the muddy whites and greenish yellows

It's a difference across the entire scene but noticeable most in the muddy whites and greenish yellows

I can not reproduce this
2.jpg
1.jpg

Can you check if this happens if you click on File > Defaults > Load Factory Settings?

I can not reproduce this ![2.jpg](https://archive.blender.org/developer/F8443884/2.jpg) ![1.jpg](https://archive.blender.org/developer/F8443886/1.jpg) Can you check if this happens if you click on File > Defaults > Load Factory Settings?
Author

Your tests don't seem to show the scene lighting or textures, I think you have the viewport set to solid shading

I have my viewport shading set to "Rendered" not "Solid"
(The fourth of the four circles)

The problem occurs when the viewport is set to Rendered.

Then the Viewport Render Image and Viewport Render Animation options create the different lighting results
Which is weird because I would have thought "Viewport Render Animation" would just output a sequence of "Viewport Render Image"s

I have checked File > Defaults > Load Factory Settings
and on an initial cube scene, with a colour on the cube, and then sun for the light
if you choose Rendered as the viewport option, and then
View > Viewport Rendered Animation
it renders far more washed out than it does with
View> Viewport Rendered Image.
(in 2.82a)

Your tests don't seem to show the scene lighting or textures, I think you have the viewport set to solid shading I have my viewport shading set to "Rendered" not "Solid" (The fourth of the four circles) The problem occurs when the viewport is set to Rendered. Then the Viewport Render Image and Viewport Render Animation options create the different lighting results Which is weird because I would have thought "Viewport Render Animation" would just output a sequence of "Viewport Render Image"s I have checked File > Defaults > Load Factory Settings and on an initial cube scene, with a colour on the cube, and then sun for the light if you choose Rendered as the viewport option, and then View > Viewport Rendered Animation it renders far more washed out than it does with View> Viewport Rendered Image. (in 2.82a)
Author

Here is a video capture of the issue:

2020-04-02 17-01-48.mov

Thanks

In 2.81a the outputs from the two options are identical
in 2.82a they aren't

Here is a video capture of the issue: [2020-04-02 17-01-48.mov](https://archive.blender.org/developer/F8444007/2020-04-02_17-01-48.mov) Thanks In 2.81a the outputs from the two options are identical in 2.82a they aren't
Richard Antalik changed title from "Viewport Render Image" and "Viewport Render Animation" different results in 2.82a to "Viewport Render Image" and "Viewport Render Animation" different results 2020-04-02 20:19:38 +02:00

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'

Added subscriber: @funksy

Added subscriber: @funksy

Added subscriber: @TarkanV

Added subscriber: @TarkanV

Can confirm, had this problem for a while too and it seems to be a problem with color management since it happens only when Filmic is selected rather than Standard film.jpg

Can confirm, had this problem for a while too and it seems to be a problem with color management since it happens only when Filmic is selected rather than Standard ![film.jpg](https://archive.blender.org/developer/F8539000/film.jpg)

Added subscriber: @Louis

Added subscriber: @Louis

Added subscribers: @Jeroen-Bakker, @fclem

Added subscribers: @Jeroen-Bakker, @fclem

@Jeroen-Bakker any input on this issue? Seems like the issue is having the color management applied twice in one of the 2 cases.

@Jeroen-Bakker any input on this issue? Seems like the issue is having the color management applied twice in one of the 2 cases.
Clément Foucault changed title from "Viewport Render Image" and "Viewport Render Animation" different results to EEVEE: "Viewport Render Image" and "Viewport Render Animation" different results (colormanagement) 2020-06-30 00:44:46 +02:00

Added subscriber: @VincentBlankfield

Added subscriber: @VincentBlankfield

TL;DR: Animations only get collorcorrected when the output format depth is more than 8 bit. I don't know why.
Workaround: Try PNG 16 bit.

Here's how it works:

Note: Some intermediate calls omitted for simplicity

in screen_opengl_render_init(bContext *C, wmOperator *op):
  *Images are always 32 bit, for animation use the output image format depth* Try setting it to R_IMF_CHAN_DEPTH_32 - both result will be collor corrected the same way
  const eImageFormatDepth color_depth = (is_animation) ? scene->r.im_format.depth : R_IMF_CHAN_DEPTH_32;
  oglrender = MEM_callocN(sizeof(OGLRender), "OGLRender");
  op->customdata = oglrender;
  oglrender->color_depth = color_depth;

then in screen_opengl_render_doit(const bContext *C, OGLRender *oglrender, RenderResult *rr):
  // Use floats for more than 8 bit
  eImBufFlags imbuf_flags = oglrender->color_depth <= R_IMF_CHAN_DEPTH_8 ? IB_rect : IB_rectfloat;

then in ED_view3d_draw_offscreen_imbuf(..., imbuf_flags, ...):
  ImBuf *ibuf = IMB_allocImBuf(sizex, sizey, 32, imbuf_flag);
  // Do color management only with float buffer
  const bool do_color_management = (ibuf->rect_float == NULL);

and in DRW_draw_render_loop_offscreen(..., do_color_management, ...):
  drw_state_prepare_clean_for_draw(&DST);
  DST.options.is_image_render = is_image_render;
  DST.options.do_color_management = do_color_management;
  DST.options.draw_background = draw_background;
  DRW_draw_render_loop_ex(depsgraph, engine_type, region, v3d, render_viewport, NULL);

Why it is this way - idk. Should it be this way - idk. Is this confusing to the user - idk.

PS: That's if I understood the problem correctly. For me all the images in this task look the same, did the research using fake colour.

TL;DR: Animations only get collorcorrected when the output format depth is more than 8 bit. I don't know why. Workaround: Try PNG 16 bit. Here's how it works: ``` Note: Some intermediate calls omitted for simplicity in screen_opengl_render_init(bContext *C, wmOperator *op): *Images are always 32 bit, for animation use the output image format depth* Try setting it to R_IMF_CHAN_DEPTH_32 - both result will be collor corrected the same way const eImageFormatDepth color_depth = (is_animation) ? scene->r.im_format.depth : R_IMF_CHAN_DEPTH_32; oglrender = MEM_callocN(sizeof(OGLRender), "OGLRender"); op->customdata = oglrender; oglrender->color_depth = color_depth; then in screen_opengl_render_doit(const bContext *C, OGLRender *oglrender, RenderResult *rr): // Use floats for more than 8 bit eImBufFlags imbuf_flags = oglrender->color_depth <= R_IMF_CHAN_DEPTH_8 ? IB_rect : IB_rectfloat; then in ED_view3d_draw_offscreen_imbuf(..., imbuf_flags, ...): ImBuf *ibuf = IMB_allocImBuf(sizex, sizey, 32, imbuf_flag); // Do color management only with float buffer const bool do_color_management = (ibuf->rect_float == NULL); and in DRW_draw_render_loop_offscreen(..., do_color_management, ...): drw_state_prepare_clean_for_draw(&DST); DST.options.is_image_render = is_image_render; DST.options.do_color_management = do_color_management; DST.options.draw_background = draw_background; DRW_draw_render_loop_ex(depsgraph, engine_type, region, v3d, render_viewport, NULL); ``` Why it is this way - idk. Should it be this way - idk. Is this confusing to the user - idk. PS: That's if I understood the problem correctly. For me all the images in this task look the same, did the research using fake colour.

Closed as duplicate of #77909

Closed as duplicate of #77909
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#75280
No description provided.