Viewport: Auto-Depth rotation ignore transparent image reference empties #76203

Open
opened 2020-04-29 00:25:14 +02:00 by michael campbell · 9 comments

System Information
Operating system: Windows-10-10.0.17763-SP0 64 Bits
Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 442.92

Blender Version
Broken: version: 2.90 (sub 0), branch: master, commit date: 2020-04-23 21:08, hash: 826f6dd9ee
Worked: (newest version of Blender that worked as expected)

Short description of error
cant rotate around partially occluded image objects.

Exact steps for others to reproduce the error

open file, make sure rotate around mouse is enabled in preferences. hover mouse over either side images and hold in the mouse wheel, move the mouse, the view will rotate around the mouse. Now do the same for the middle image, the view no longer rotates around the mouse.

rotate around mouse bug with image objects that are occluded.blend

**System Information** Operating system: Windows-10-10.0.17763-SP0 64 Bits Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 442.92 **Blender Version** Broken: version: 2.90 (sub 0), branch: master, commit date: 2020-04-23 21:08, hash: `826f6dd9ee` Worked: (newest version of Blender that worked as expected) **Short description of error** cant rotate around partially occluded image objects. **Exact steps for others to reproduce the error** open file, make sure rotate around mouse is enabled in preferences. hover mouse over either side images and hold in the mouse wheel, move the mouse, the view will rotate around the mouse. Now do the same for the middle image, the view no longer rotates around the mouse. [rotate around mouse bug with image objects that are occluded.blend](https://archive.blender.org/developer/F8500094/rotate_around_mouse_bug_with_image_objects_that_are_occluded.blend)

Added subscriber: @3di

Added subscriber: @3di

Added subscriber: @mano-wii

Added subscriber: @mano-wii

This seems to be related to the image in the center with the "Transparency" option enabled. Can you confirm?
It also does not receive a projection of the 3d cursor.

This seems to be related to the image in the center with the "Transparency" option enabled. Can you confirm? It also does not receive a projection of the 3d cursor.

Correct, although if you move the cube behind so it’s not intersecting the image plane, then it works as normal without changing any of the image objects settings.

Correct, although if you move the cube behind so it’s not intersecting the image plane, then it works as normal without changing any of the image objects settings.

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

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

A quick fix would be:

diff --git a/source/blender/draw/engines/overlay/overlay_image.c b/source/blender/draw/engines/overlay/overlay_image.c
index c592f11a855..252bcb4b1f1 100644
--- a/source/blender/draw/engines/overlay/overlay_image.c
+++ b/source/blender/draw/engines/overlay/overlay_image.c
@@ -366,7 +366,8 @@ void OVERLAY_image_empty_cache_populate(OVERLAY_Data *vedata, Object *ob)
 
   const bool show_frame = BKE_object_empty_image_frame_is_visible_in_view3d(ob, rv3d);
   const bool show_image = show_frame && BKE_object_empty_image_data_is_visible_in_view3d(ob, rv3d);
-  const bool use_alpha_blend = (ob->empty_image_flag & OB_EMPTY_IMAGE_USE_ALPHA_BLEND) != 0;
+  const bool use_alpha_blend = !DRW_state_is_depth() &&
+                               (ob->empty_image_flag & OB_EMPTY_IMAGE_USE_ALPHA_BLEND) != 0;
   const bool use_alpha_premult = ima && (ima->alpha_mode == IMA_ALPHA_PREMUL);
 
   if (!show_frame) {

A quick fix would be: ``` diff --git a/source/blender/draw/engines/overlay/overlay_image.c b/source/blender/draw/engines/overlay/overlay_image.c index c592f11a855..252bcb4b1f1 100644 --- a/source/blender/draw/engines/overlay/overlay_image.c +++ b/source/blender/draw/engines/overlay/overlay_image.c @@ -366,7 +366,8 @@ void OVERLAY_image_empty_cache_populate(OVERLAY_Data *vedata, Object *ob) const bool show_frame = BKE_object_empty_image_frame_is_visible_in_view3d(ob, rv3d); const bool show_image = show_frame && BKE_object_empty_image_data_is_visible_in_view3d(ob, rv3d); - const bool use_alpha_blend = (ob->empty_image_flag & OB_EMPTY_IMAGE_USE_ALPHA_BLEND) != 0; + const bool use_alpha_blend = !DRW_state_is_depth() && + (ob->empty_image_flag & OB_EMPTY_IMAGE_USE_ALPHA_BLEND) != 0; const bool use_alpha_premult = ima && (ima->alpha_mode == IMA_ALPHA_PREMUL); if (!show_frame) { ```

@mano-wii wow, they said you were fast, but that's ridiculous! Brilliant.

@mano-wii wow, they said you were fast, but that's ridiculous! Brilliant.

Added subscriber: @fclem

Added subscriber: @fclem

I would say this is by design. Transparent object should not be occluders. Not even for rotation. I can see some people using image plane as reference and this would get in the way really quickly.

I would say this is by design. Transparent object should not be occluders. Not even for rotation. I can see some people using image plane as reference and this would get in the way really quickly.
Clément Foucault changed title from rotate around mouse bug with image objects that are occluded to Viewport: Auto-Depth rotation ignore transparent image reference empties 2020-06-30 01:42:34 +02:00
Philipp Oeser removed the
Interest
User Interface
label 2023-02-10 09:24:31 +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
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#76203
No description provided.