Avoid graphical glitches during threaded preview generation #83896
Labels
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
9 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#83896
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When previews are generated using an OpenGL engine, there can be a number of glitches until the preview is done. That's because some data is accessed/modified that is not thread safe. E.g.
object_preview_render()
modifiesU.pixelsize
. I think other glitches are caused by overriding the active theme inED_view3d_draw_offscreen()
- although when I avoided this some time ago for similar work on threaded offscreen drawing for VR, this didn't solve the color flickering.The active theme should probably use thread local storage.
Besides that, the preview generation should be thread safe with OpenGL:
A note: We could also speed up Eevee preview generation significantly by using viewport render quality, not final render quality. The
_imbuf
offscreen rendering functions don't expose theis_image_render
option for that, which they probably should.Added subscriber: @JulianEisel
#96002 was marked as duplicate of this issue
#95057 was marked as duplicate of this issue
#85929 was marked as duplicate of this issue
#84062 was marked as duplicate of this issue
#83905 was marked as duplicate of this issue
Added subscriber: @dgsantana
Added subscriber: @TasosK
Added subscriber: @georgK
Added subscribers: @gusdleon, @rboxman
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @Kdaf
Added subscriber: @JasonvanGumster
Added subscriber: @Harley
Can't think of a reason for this to change U.pixelsize for the render. Maybe if the render included wireframes or showed cavity extras since those change with line size. And they would become less than a pixel when these previews are shown. But they don't.
I comment that part out and I can't tell a difference:
{F12787423,width=100%}
Added subscribers: @LalaGhost, @RedMser
The primary issue stated here, the modification of u.pixelsize within object_preview_render, was fixed in the following:
https://developer.blender.org/D13717
Setting this to normal priority now. There are still notable glitches while generating the previews, but it's mostly things like buttons using wrong colors for a frame. Something that should be fixed, but nothing critical.
Added subscribers: @ArmandoTello, @PratikPB2123, @Alaska