Regression: Light direction gizmo not working #104282

Closed
opened 2023-02-01 13:32:49 +01:00 by Robert Hagström · 13 comments

System Information
Operating system: Mac OS Ventura
Graphics card: Mac Studio Ultra

Blender Version
3.5 alpha
Broken by

Short description of error

When trying to point a light at something by using the yellow dot handle in the viewport, the light instead points at the viewer.

Steps to reproduce

  • Enable Metal GPUBackend, On OpenGL it works as expected.
  • Add spot light
  • Use direction gizmo

Light will point into viewport cameras

**System Information** Operating system: Mac OS Ventura Graphics card: Mac Studio Ultra **Blender Version** 3.5 alpha Broken by **Short description of error** When trying to point a light at something by using the yellow dot handle in the viewport, the light instead points at the viewer. **Steps to reproduce** - Enable Metal GPUBackend, On OpenGL it works as expected. - Add spot light - Use direction gizmo Light will point into viewport cameras

Added subscriber: @Brallan

Added subscriber: @Brallan

Added subscriber: @iss

Added subscriber: @iss

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

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

Can you rephrase the issue? I don't understand it. Perhaps a video recording would help too.

Can you rephrase the issue? I don't understand it. Perhaps a video recording would help too.

Ok, in the attached video you can see me trying to point a light at the default cube, but it instead points back at me :-)Light problem.mov

Ok, in the attached video you can see me trying to point a light at the default cube, but it instead points back at me :-)[Light problem.mov](https://archive.blender.org/developer/F14233075/Light_problem.mov)

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

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

Thanks for video, I can reproduce only on Mac machine

Broken between 40e5954e39 and 8b1edff6b5, will bisect, even though before it didn't work quite as expected still.

Thanks for video, I can reproduce only on Mac machine Broken between 40e5954e3967 and 8b1edff6b50e, will bisect, even though before it didn't work quite as expected still.
Richard Antalik changed title from Light target handle in viewport not working to Regression: Light target handle in viewport not working 2023-02-03 14:26:22 +01:00
Richard Antalik changed title from Regression: Light target handle in viewport not working to Regression: Light direction gizmo not working 2023-02-03 14:27:22 +01:00

Added subscriber: @Michael-Parkin-White-Apple

Added subscriber: @Michael-Parkin-White-Apple

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker

@Jeroen-Bakker Can you check?

@Jeroen-Bakker Can you check?
Jeroen Bakker self-assigned this 2023-02-08 09:37:29 +01:00
Member

Seems like the issue is Metal backend only. When doing depth picking a GPU texture is read. This texture doesn't have the GPU_TEXTURE_USAGE_HOST_READ flag set. In debug mode this is also reported with an assert statement. This isn't the cause of the issue, but found during investigation.

My first guess is that the depth that is returned by the depth test is always 0 when using the Metal backend.

Metal
(depth stencil hex:converted depth)

3b7fff01:0.003906

OpenGL

3f800000:1.000000

Seems like a missing part (was expected) during the Metal Backend implementation.
I would assume some bit sizzling needs to happen to convert the depth stencil to an expected value.

@Michael-Parkin-White-Apple can you have a look at this? Check view3d_depths_create for reference.

Seems like the issue is Metal backend only. When doing depth picking a GPU texture is read. This texture doesn't have the `GPU_TEXTURE_USAGE_HOST_READ` flag set. In debug mode this is also reported with an assert statement. This isn't the cause of the issue, but found during investigation. My first guess is that the depth that is returned by the depth test is always 0 when using the Metal backend. **Metal** (depth stencil hex:converted depth) ``` 3b7fff01:0.003906 ``` **OpenGL** ``` 3f800000:1.000000 ``` Seems like a missing part (was expected) during the Metal Backend implementation. I would assume some bit sizzling needs to happen to convert the depth stencil to an expected value. @Michael-Parkin-White-Apple can you have a look at this? Check `view3d_depths_create` for reference.
Jeroen Bakker added
Severity
Normal
and removed
Severity
High
labels 2023-02-09 09:03:40 +01:00
Member

Lowering the priority as it isn't a regression. Still it needs to be fixed for Blender 3.5, but can be handled as regular bug fixing as the changes are expected to be localized to the Metal backend.

Lowering the priority as it isn't a regression. Still it needs to be fixed for Blender 3.5, but can be handled as regular bug fixing as the changes are expected to be localized to the Metal backend.
Jeroen Bakker removed the
Interest
Viewport & EEVEE
Interest
Modeling
labels 2023-02-09 09:08:21 +01:00
Jeroen Bakker added this to the 3.5 milestone 2023-02-09 09:15:32 +01:00
Jeroen Bakker added this to the Viewport & EEVEE project 2023-02-09 09:15:42 +01:00

Will look into this, thanks for the details @Jeroen-Bakker. There had been a few challenges with format conversion for depth-read, but perhaps another oversight w.r.t stencil attachment.

Off the top of my head, could possibly be a D24S8 vs D32FS8 issue. (If D32F S8 is being interpreted using the D24S8 read path).

Will look into this, thanks for the details @Jeroen-Bakker. There had been a few challenges with format conversion for depth-read, but perhaps another oversight w.r.t stencil attachment. Off the top of my head, could possibly be a D24S8 vs D32FS8 issue. (If D32F S8 is being interpreted using the D24S8 read path).
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-02-10 20:40:11 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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 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#104282
No description provided.