Greyish origin. #43531

Closed
opened 2015-02-02 18:13:28 +01:00 by Łukasz Debita · 10 comments

Blender 2.73a (and 2.73 also had that problem).

//It's not a very disturbing bug, but it is, so I want to help ; )

Sometimes when I work with blender I see that greyish origins. I work a lot with projects started in Blender 2.72, maybe it has something with that.

Here is video with my awful english, sorry ; )
https://www.youtube.com/watch?v=3eFfLHD-XuM

Exact steps for others to reproduce the error

You should see it just when projcet will be opened.
Here's the file:
http://www24.zippyshare.com/v/a8k7iUGf/file.html

Blender 2.73a (and 2.73 also had that problem). //It's not a very disturbing bug, but it is, so I want to help ; ) Sometimes when I work with blender I see that greyish origins. I work a lot with projects started in Blender 2.72, maybe it has something with that. Here is video with my awful english, sorry ; ) https://www.youtube.com/watch?v=3eFfLHD-XuM **Exact steps for others to reproduce the error** You should see it just when projcet will be opened. Here's the file: http://www24.zippyshare.com/v/a8k7iUGf/file.html
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @LukaszDebita

Added subscriber: @LukaszDebita

Added subscribers: @Psy-Fi, @ideasman42

Added subscribers: @Psy-Fi, @ideasman42

This can happen when multiple objects are selected, or when the active object isnt selected.

@Psy-Fi, what do you think about this?

P192: Possible fix for #43531

diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 0d0ef72..e3b9740 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -737,6 +737,10 @@ static void drawcentercircle(View3D *v3d, RegionView3D *rv3d, const float co[3],
 	const float size = ED_view3d_pixel_size(rv3d, co) * (float)U.obcenter_dia * 0.5f;
 	float verts[CIRCLE_RESOL][3];
 
+	glEnable(GL_POLYGON_OFFSET_FILL);
+	glEnable(GL_POLYGON_OFFSET_LINE);
+	glPolygonOffset(-1.0, -10000.0);
+
 	/* using gldepthfunc guarantees that it does write z values,
 	 * but not checks for it, so centers remain visible independent order of drawing */
 	if (v3d->zbuf) glDepthFunc(GL_ALWAYS);
@@ -771,6 +775,9 @@ static void drawcentercircle(View3D *v3d, RegionView3D *rv3d, const float co[3],
 
 	glDisable(GL_BLEND);
 
+	glDisable(GL_POLYGON_OFFSET_LINE);
+	glDisable(GL_POLYGON_OFFSET_FILL);
+
 	if (v3d->zbuf) glDepthFunc(GL_LEQUAL);
 }
 


Seems a bit of a hack, but its kind-of correct if you want these to draw ontop of everything else, in Blender 2.4x these were drawn as bitmaps in 2d.

Note, while its nice to fix glitches like this, we could set it as TODO. since viewport needs work and this isn't breaking Blender.

This can happen when multiple objects are selected, or when the active object isnt selected. @Psy-Fi, what do you think about this? [P192: Possible fix for #43531](https://archive.blender.org/developer/P192.txt) ```diff diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 0d0ef72..e3b9740 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -737,6 +737,10 @@ static void drawcentercircle(View3D *v3d, RegionView3D *rv3d, const float co[3], const float size = ED_view3d_pixel_size(rv3d, co) * (float)U.obcenter_dia * 0.5f; float verts[CIRCLE_RESOL][3]; + glEnable(GL_POLYGON_OFFSET_FILL); + glEnable(GL_POLYGON_OFFSET_LINE); + glPolygonOffset(-1.0, -10000.0); + /* using gldepthfunc guarantees that it does write z values, * but not checks for it, so centers remain visible independent order of drawing */ if (v3d->zbuf) glDepthFunc(GL_ALWAYS); @@ -771,6 +775,9 @@ static void drawcentercircle(View3D *v3d, RegionView3D *rv3d, const float co[3], glDisable(GL_BLEND); + glDisable(GL_POLYGON_OFFSET_LINE); + glDisable(GL_POLYGON_OFFSET_FILL); + if (v3d->zbuf) glDepthFunc(GL_LEQUAL); } ``` ---- *Seems a bit of a hack, but its kind-of correct if you want these to draw ontop of everything else, in Blender 2.4x these were drawn as bitmaps in 2d.* Note, while its nice to fix glitches like this, we could set it as TODO. since viewport needs work and this isn't breaking Blender.
Antonis Ryakiotakis was assigned by Campbell Barton 2015-02-02 22:30:40 +01:00

Added subscriber: @Sergey

Added subscriber: @Sergey

@ideasman42, this seems ok to me, not sure why you call it a hack. Just makes it so GL state is known. Could probably be cleaned up a bit together with rest of drawing code to avoid possible redundant state changes, but that does not belong to this bugfix IMO.

@ideasman42, this seems ok to me, not sure why you call it a hack. Just makes it so GL state is known. Could probably be cleaned up a bit together with rest of drawing code to avoid possible redundant state changes, but that does not belong to this bugfix IMO.

@Sergey, seems like there could be a more direct way to write into 0.0 depth in the buffer instead of offsetting existing depth some arbitrary amount.

@Sergey, seems like there could be a more direct way to write into 0.0 depth in the buffer instead of offsetting existing depth some arbitrary amount.

This issue was referenced by 57e1a5373f

This issue was referenced by 57e1a5373f41e0cd6c628abdc836fd807ffc4adf

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 57e1a5373f.

Closed by commit 57e1a5373f.
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#43531
No description provided.