-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Y Axis Gizmo randomly disappears at some angles #37016
Y Axis Gizmo randomly disappears at some angles #37016
Comments
Can you reproduce this in 3.2.1 as well? |
I got lines disappearing too in 2D with |
This might not be a good solution, but maybe we should just force the 3D viewport to be an odd number of pixels wide? This could be done in the Node3D EditorPlugin so that this restriction doesn't exist for the other main screen plugins. |
@aaronfranke while still not the best solution we should either fix the draw line call for the axis or round that to one pixel |
If all else fails, we could draw two lines to ensure one of them is always visible, but this may make it too thick. |
Someone should do a bisect from 3.2 since there it seems to shift instead (unless this is some problem with vulkan) |
I always used to have this bug, but in v4.0.dev.calinou [7188cb6] it looks fine now. |
Still present. |
I have an ad-hoc fix here, but it's not perfect: #37995 |
@aaronfranke: Your ad-hoc fix seems to work indeed(Tested with artifact build). |
Did more tests. An empty project doesn't do the problem on version v4.0.dev.custom_build [92a2380] However. if i load a project, the bug is there. So i started testing a bit. It's quite easy to reproduce. Step 1: Make an empty project. So adding a node, any node, triggers this issue. Edit: repro steps triggers the bug because removing all the nodes resizes the viewport. Nodes are not related to the problem. |
This may be due to the 3D viewport having a slightly different size due to one of the docks being automatically resized. Try reproducing this after enabling distraction-free mode (Shift + F11 / Ctrl + Shift + F11). |
Tested with both Shift + F11 and Ctrl + Shift + F11: Same behavior. Edit: @Calinou: Now that i think about it. Wouldn't it also affect X and Z if it was the viewport size? |
@Kemeros The editor camera doesn't roll, so at the default camera position, the Y axis is always a vertical line on the screen. Then if the screen is a even number of pixels wide, it falls in-between two columns pixels so it disappears. The other axes are rarely perfectly straight and in-between two rows or columns of pixels on the screen, so they don't disappear. Calinou is correct that whether this bug can be reproduced or not entirely depends on the size of the viewport. Try resizing it, carefully, one pixel at a time. |
Ah yes i see. You are both correct. Removing the node actually resize the viewport in a position that the bug doesn't appear. If i play with the viewport, the bug comes back depending on the angle of the camera. Should the axis lines be a 1 or 2 pixels thicker so it doesn't happen? |
We could draw two axis lines close to each other to ensure that at least one of them is always visible. However, I think this will make the origin lines a bit too thick. It's worth trying nonetheless. |
Making lines thicker are just workarounds, they dont seem to adress the root cause. I dont understand how lines are disappearing when lines is a rendering mode where this just can't happen like that Oo |
It seems to be dependent on project config |
This likely means OpenGL and Vulkan have different ways of rounding line widths when drawing lines. OpenGL prefers rounding up (meaning the line goes from 1 to 2 pixels wide), while Vulkan prefers rounding down (meaning the line goes from 1 to 0 pixels wide). |
I can reproduce this on a blank project with v4.0.stable.official [92bee43], Windows 10, Nvidia GTX 1650, Forward+ renderer |
Not sure if this is useful information but I just noticed that the line stops disappearing when the viewport camera's angle is as high or low as it's able to go -- meaning that the Y axis that intersects the XZ plane is no longer visible. Only difference between the first and second is a minute adjustment in camera angle. |
This is still an issue, and I've seen it mentioned by people trying out the engine and being confused, notably here. It seems like it would be good to at least work around it soon |
Still present in 4.1 RC3 |
458f17f0fa8bc0a88def6a99227d431f.mp4Still present in Godot v4.1.1.stable.mono. Windows 10.0.19045 - Vulkan (Forward+) |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
For those experiencing this issue, please test this PR, which should fix it: #83895 |
I experienced this issue as a new godot user and indeed slightly resizing the left or right panel fixes it edit: I'm using a nvidia card, as said below that it's related to it |
This comment was marked as resolved.
This comment was marked as resolved.
Yes, this issue only occurs on NVIDIA GPUs as described above. |
why not add some red and blue in there and make it subpixel? would solve the issue and make it look better |
A solution has already been found: #83895 |
Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.
Godot version:
951ecc4
OS/device including version:
Linux Mint 19.3
Issue description:
Y Axis (Maybe others) randomly disappear
Godot.Y.Axis.Gizmo.randomly.disappears.TqutiJX70xE.webm
Steps to reproduce:
Use mouse wheel to orbit the viewport
Minimal reproduction project:
I just made an empty project and saw this
The text was updated successfully, but these errors were encountered: