GIZMO_GT_button_2d draws with a visible wireframe #128295

Open
opened 2024-09-28 14:05:14 +02:00 by Corey aka Corza · 2 comments

System Information
Operating system: Windows-10-10.0.22631-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 561.09

Blender Version
Broken: version: 4.2.2 LTS Release Candidate, branch: blender-v4.2-release, commit date: 2024-09-20 12:45, hash: b8a7be04877a
Broken: 3.6
Worked: Not sure

Short description of error
GIZMO_GT_button_2d draws with wireframe artifacts

Exact steps for others to reproduce the error
Create a GIZMO_GT_button_2d gizmo with bpy

**System Information** Operating system: Windows-10-10.0.22631-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 561.09 **Blender Version** Broken: version: 4.2.2 LTS Release Candidate, branch: blender-v4.2-release, commit date: 2024-09-20 12:45, hash: `b8a7be04877a` Broken: 3.6 Worked: Not sure **Short description of error** GIZMO_GT_button_2d draws with wireframe artifacts **Exact steps for others to reproduce the error** Create a GIZMO_GT_button_2d gizmo with bpy
Corey aka Corza added the
Severity
Normal
Type
Bug
Status
Needs Triage
labels 2024-09-28 14:05:14 +02:00
Member

I can confirm the issue here on my Windows NVIDIA machine, but not my M1 Pro Mac. So there might be something with the GPU driver involved here. I tested in 4.3 and 3.6 and the issue was in both. I have also attached a python script to add a gizmo to the 3D viewport. It was adapted from this script by Julian Eisel.

Interestingly there was a report of a similar issue that could be seen on the built in gizmos. #118123
I can't reporduce this issue on the built in gizmos, but can on ones spawned by a script.

System Information
Operating system: Windows-10-10.0.22631-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 560.94
Blender version: 4.3.0 Alpha, branch: main, commit date: 2024-09-27 08:21, hash: 87bef460969c

import bpy
from bpy.types import GizmoGroup

class Test(GizmoGroup):
    bl_idname = "TET_UI_GIZMO"
    bl_label = "My Test Gizmo"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'WINDOW'
    bl_options = {'PERSISTENT', 'SCALE'}

    @classmethod
    def poll(cls, context):
        return True

    def draw_prepare(self, context):
        region = context.region

        self.my_gizmo.matrix_basis[0][3] = region.width - 100
        self.my_gizmo.matrix_basis[1][3] = 100

    def setup(self, context):
        self.my_gizmo = self.gizmos.new("GIZMO_GT_button_2d")
        self.my_gizmo.icon = 'OUTLINER_OB_CAMERA'
        self.my_gizmo.draw_options = {'BACKDROP', 'OUTLINE'}

        self.my_gizmo.alpha = 0.8
        self.my_gizmo.color = 1.0, 0.5, 0.0
        self.my_gizmo.color_highlight = 1.0, 0.8, 0.8
        self.my_gizmo.alpha_highlight = 0.2

        self.my_gizmo.scale_basis = 80

bpy.utils.register_class(Test)
I can confirm the issue here on my Windows NVIDIA machine, but not my M1 Pro Mac. So there might be something with the GPU driver involved here. I tested in 4.3 and 3.6 and the issue was in both. I have also attached a python script to add a gizmo to the 3D viewport. It was adapted from [this script](https://devtalk.blender.org/t/how-to-create-overlay-buttons-like-in-the-3d-viewport-with-python/4592/9) by Julian Eisel. Interestingly there was a report of a similar issue that could be seen on the built in gizmos. #118123 I can't reporduce this issue on the built in gizmos, but can on ones spawned by a script. **System Information** Operating system: Windows-10-10.0.22631-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 560.94 Blender version: 4.3.0 Alpha, branch: main, commit date: 2024-09-27 08:21, hash: `87bef460969c` ```python import bpy from bpy.types import GizmoGroup class Test(GizmoGroup): bl_idname = "TET_UI_GIZMO" bl_label = "My Test Gizmo" bl_space_type = 'VIEW_3D' bl_region_type = 'WINDOW' bl_options = {'PERSISTENT', 'SCALE'} @classmethod def poll(cls, context): return True def draw_prepare(self, context): region = context.region self.my_gizmo.matrix_basis[0][3] = region.width - 100 self.my_gizmo.matrix_basis[1][3] = 100 def setup(self, context): self.my_gizmo = self.gizmos.new("GIZMO_GT_button_2d") self.my_gizmo.icon = 'OUTLINER_OB_CAMERA' self.my_gizmo.draw_options = {'BACKDROP', 'OUTLINE'} self.my_gizmo.alpha = 0.8 self.my_gizmo.color = 1.0, 0.5, 0.0 self.my_gizmo.color_highlight = 1.0, 0.8, 0.8 self.my_gizmo.alpha_highlight = 0.2 self.my_gizmo.scale_basis = 80 bpy.utils.register_class(Test) ```
Alaska added
Module
User Interface
Status
Confirmed
and removed
Status
Needs Triage
labels 2024-09-28 14:36:05 +02:00
Alaska changed title from GIZMO_GT_button_2d draws with antialiased artifacts to GIZMO_GT_button_2d draws with a visible wireframe 2024-09-28 14:36:15 +02:00
Member

Hello, I have the problem both on windows and linux machines (OpenGL for linux, most probably OpenGL on windows)

Current machine used for the screenshot:
System Information
Operating system: Linux-5.4.0-58-generic-x86_64-with-glibc2.31 64 Bits, X11 UI
Graphics card: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 495.29.05

Blender Version
Broken: version: 4.3.0 Alpha, branch: main, commit date: 2024-09-29 23:01, hash: eb6b96e70c9f
Worked: (newest version of Blender that worked as expected)

And it's worth noting that it also happens with custom shapes in gizmos.

2024-09-30_15-52_gizmo_with_custom_shapes

In the setup method, you can create your own shape:
self.custom_shape = self.new_custom_shape('TRIS', list_of_vertices_coordinates])

Then in drawmethod call it as follows:
self.draw_custom_shape(self.custom_shape)

The little rectangle below the standard gizmos buttons is drawn with two triangles.
You can clearly see the diagonal in-between triangles when there is some geometry behind.

Hello, I have the problem both on windows and linux machines (OpenGL for linux, most probably OpenGL on windows) Current machine used for the screenshot: **System Information** Operating system: Linux-5.4.0-58-generic-x86_64-with-glibc2.31 64 Bits, X11 UI Graphics card: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 495.29.05 **Blender Version** Broken: version: 4.3.0 Alpha, branch: main, commit date: 2024-09-29 23:01, hash: `eb6b96e70c9f` Worked: (newest version of Blender that worked as expected) And it's worth noting that it also happens with **custom shapes** in gizmos. <img width="552" alt="2024-09-30_15-52_gizmo_with_custom_shapes" src="attachments/8789a354-6638-4e60-827f-3a67394eb6ff"> In the `setup` method, you can create your own shape: `self.custom_shape = self.new_custom_shape('TRIS', list_of_vertices_coordinates])` Then in `draw`method call it as follows: `self.draw_custom_shape(self.custom_shape)` The little rectangle below the standard gizmos buttons is drawn with two triangles. You can clearly see the diagonal in-between triangles when there is some geometry behind.
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 project
No Assignees
3 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#128295
No description provided.