Fly/Walk in viewport, Workbench/Eevee do not stop rendering at sample limit #80871

Open
opened 2020-09-17 10:09:43 +02:00 by AnsonX10 · 15 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 760/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.67

Blender Version
Broken since at least 2.80 and still broken in 2.91.0 Alpha, branch: master, commit date: 2020-09-18 16:11, hash: 7b988188dc

Short description of error
When using Walk or Fly navigation modes using any built-in renderer except Cycles, the viewport will render the specified number of samples, then start again from sample 1 and repeat indefinitely, even if the navigation is motionless. This can be seen visibly. If set to 1 sample, it still re-renders it indefinitely. This can be confirmed via GPU usage.

Exact steps for others to reproduce the error
Enter walk or fly mode in any scene, using any viewport mode, and any renderer except Cycles. If you have a hard time seeing it, you can use Eevee and any volume shader to more easily see each sample as it's rendered.

Misc notes
I'm aware Workbench's render settings are anti-aliasing samples instead of sample count, but it still re-renders those anti-aliasing samples.

It's not a pressing problem, but it does waste GPU resources and can introduce visible flickering. It should either stop rendering when it reaches the set number of samples (like orbit), or stop rendering after 1 sample regardless of sample limit. The latter would actually be more useful in my use case, even for regular orbiting. My proposal: It could pause for about 500-1000ms (configurable?) before rendering sample 2 and onward. This would improve viewport responsiveness, but still retain the benefits of rendering the full quality version during navigation.

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 760/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.67 **Blender Version** Broken since at least 2.80 and still broken in 2.91.0 Alpha, branch: master, commit date: 2020-09-18 16:11, hash: `7b988188dc` **Short description of error** When using Walk or Fly navigation modes using any built-in renderer except Cycles, the viewport will render the specified number of samples, then start again from sample 1 and repeat indefinitely, *even if the navigation is motionless.* This can be seen visibly. If set to 1 sample, it still re-renders it indefinitely. This can be confirmed via GPU usage. **Exact steps for others to reproduce the error** Enter walk or fly mode in any scene, using any viewport mode, and any renderer except Cycles. If you have a hard time seeing it, you can use Eevee and any volume shader to more easily see each sample as it's rendered. **Misc notes** I'm aware Workbench's render settings are anti-aliasing samples instead of sample count, but it still re-renders those anti-aliasing samples. It's not a pressing problem, but it does waste GPU resources and can introduce visible flickering. It should either stop rendering when it reaches the set number of samples (like orbit), or stop rendering after 1 sample regardless of sample limit. The latter would actually be more useful in my use case, even for regular orbiting. My proposal: It could pause for about 500-1000ms (configurable?) before rendering sample 2 and onward. This would improve viewport responsiveness, but still retain the benefits of rendering the full quality version during navigation.
Author

Added subscriber: @AnsonX10

Added subscriber: @AnsonX10

#88506 was marked as duplicate of this issue

#88506 was marked as duplicate of this issue

Added subscriber: @bent

Added subscriber: @bent

Added subscriber: @mano-wii

Added subscriber: @mano-wii

I can't reproduce, or I don't know if I understand the problem correctly.
What are the steps to reproduce the bug?

A guideline for making a good bug report can be found at https://wiki.blender.org/wiki/Process/Bug_Reports

I can't reproduce, or I don't know if I understand the problem correctly. What are the steps to reproduce the bug? A guideline for making a good bug report can be found at https://wiki.blender.org/wiki/Process/Bug_Reports

I can reproduce the issue:

Screen Capture_Blender_20200918174328.gif

The viewport is constantly being redrawn in Walk mode, even if the camera position hasn't changed.

System Information
Operating system: Linux-5.8.9-2-MANJARO-x86_64-with-glibc2.17 64 Bits
Graphics card: Mesa DRI Intel(R) UHD Graphics 620 (KBL GT2) Intel Open Source Technology Center 4.6 (Core Profile) Mesa 20.1.5

Blender Version
Broken: version: 2.90.0, branch: master, commit date: 2020-08-31 11:26, hash: 0330d1af29

I can reproduce the issue: ![Screen Capture_Blender_20200918174328.gif](https://archive.blender.org/developer/F8896082/Screen_Capture_Blender_20200918174328.gif) The viewport is constantly being redrawn in Walk mode, even if the camera position hasn't changed. **System Information** Operating system: Linux-5.8.9-2-MANJARO-x86_64-with-glibc2.17 64 Bits Graphics card: Mesa DRI Intel(R) UHD Graphics 620 (KBL GT2) Intel Open Source Technology Center 4.6 (Core Profile) Mesa 20.1.5 **Blender Version** Broken: version: 2.90.0, branch: master, commit date: 2020-08-31 11:26, hash: `0330d1af29`

So the description in the report should be:

**Short description of error**
When using Walk or Fly navigation modes (using lookdev, rendered view or Eevee), the viewport will be constantly updated even if the navigation is motionless.

**Exact steps for others to reproduce the error**
- Use any debug tool (for example RenderDoc)
- In the default scene, activate Walk Navigation

Observe the constant updating of frames

This report is missing:

  • Short description of the error
  • Exact steps to redo the error.

@AnsonX10, can I edit the description of this report to correspond to the bug shown by @bent?

So the description in the report should be: ``` **Short description of error** When using Walk or Fly navigation modes (using lookdev, rendered view or Eevee), the viewport will be constantly updated even if the navigation is motionless. **Exact steps for others to reproduce the error** - Use any debug tool (for example RenderDoc) - In the default scene, activate Walk Navigation Observe the constant updating of frames ``` This report is missing: - Short description of the error - Exact steps to redo the error. @AnsonX10, can I edit the description of this report to correspond to the bug shown by @bent?
AnsonX10 changed title from Fly/Walk in viewport, Solid/Eevee do not stop rendering at sample limit to Fly/Walk in viewport, Workbench/Eevee do not stop rendering at sample limit 2020-09-19 08:05:29 +02:00
Author

I assumed the method of reproduction was self-evident. My bad. I've updated the description for you. A debug tool is definitely not needed: This problem is visible to the naked eye, although it is more apparent on finely detailed textures, volumes, and other things that are affected strongly by sample count.

I assumed the method of reproduction was self-evident. My bad. I've updated the description for you. A debug tool is definitely not needed: This problem is visible to the naked eye, although it is more apparent on finely detailed textures, volumes, and other things that are affected strongly by sample count.

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Member

This is caused by the tagging of the viewport by the walk/fly operator on each timer tick. The current operator tags to redraw on each timer tick. So it works as the operator was designed.

static void flyEvent(FlyInfo *fly, const wmEvent *event)
{
  if (event->type == TIMER && event->customdata == fly->timer) {
    fly->redraw = 1;
  }
  ...

Cycles has its own copy of the scene and therefore can decide in more detail if there are actual changes. In order to do the same for EEVEE/Workbench we could a similar trick, but it will double the memory and transformation what will lead to less performance. Not sure that is what we want. Also this is development as everything works as designed.

The proposed solution is new development as it does not fit within the current implementation. We could probably fix the most common cases by being more picky on when to redraw. Eg timer event + change of view.

The timer event is needed to "simulate" the separation of a render and event loop (like games do). When doing timer event + check on view, the shadows will still flicker a lot. When only doing a check on the view, the fly/walk will be less smooth as the drawing performance will influence the interactivity.

This is caused by the tagging of the viewport by the walk/fly operator on each timer tick. The current operator tags to redraw on each timer tick. So it works as the operator was designed. ``` static void flyEvent(FlyInfo *fly, const wmEvent *event) { if (event->type == TIMER && event->customdata == fly->timer) { fly->redraw = 1; } ... ``` Cycles has its own copy of the scene and therefore can decide in more detail if there are actual changes. In order to do the same for EEVEE/Workbench we could a similar trick, but it will double the memory and transformation what will lead to less performance. Not sure that is what we want. Also this is development as everything works as designed. The proposed solution is new development as it does not fit within the current implementation. We could probably fix the most common cases by being more picky on when to redraw. Eg timer event + change of view. The timer event is needed to "simulate" the separation of a render and event loop (like games do). When doing timer event + check on view, the shadows will still flicker a lot. When only doing a check on the view, the fly/walk will be less smooth as the drawing performance will influence the interactivity.
Author

@Jeroen-Bakker But it works perfectly when orbiting using middle mouse. The separation of render and event loops are clearly not needed in that case. Is this true? Or am I missing something.

And in case anyone wants my opinion, personally I would gladly give up some extra memory to fix the continuous GPU usage and any amount of flickering.

@Jeroen-Bakker But it works perfectly when orbiting using middle mouse. The separation of render and event loops are clearly not needed in that case. Is this true? Or am I missing something. And in case anyone wants my opinion, personally I would gladly give up some extra memory to fix the continuous GPU usage and *any* amount of flickering.

Added subscribers: @NoBlahBlah, @Calra, @Firepal

Added subscribers: @NoBlahBlah, @Calra, @Firepal

Added subscriber: @JacobMerrill-1

Added subscriber: @JacobMerrill-1

youle recently created a upbge patch to render all the samples in 1 frame if you want
allowing full quality shadows during preview - removing the pulsing completely

https://github.com/UPBGE/upbge/pull/1474

https://www.youtube.com/watch?v=hxhDbJ7NHQI

youle recently created a upbge patch to render all the samples in 1 frame if you want allowing full quality shadows during preview - removing the pulsing completely https://github.com/UPBGE/upbge/pull/1474 https://www.youtube.com/watch?v=hxhDbJ7NHQI
Philipp Oeser removed the
Interest
EEVEE & Viewport
label 2023-02-09 15:14:30 +01:00
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
6 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#80871
No description provided.