Skip to content
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

Handles of custom gizmos rendered as only a single pixel #75680

Open
blackears opened this issue Apr 5, 2023 · 13 comments
Open

Handles of custom gizmos rendered as only a single pixel #75680

blackears opened this issue Apr 5, 2023 · 13 comments

Comments

@blackears
Copy link

Godot version

v4.0.stable.official [92bee43]

System information

Windows 10, Compatability

Issue description

I stated exploring using gizmos for a plugin I'm working on. The handles that are rendered are so tiny, they look like they're only a single pixel big. I double checked with Godot 3.5.2 and it's equivalent of the plugin renders handles at a visible size. I tried using a custom texture too, but that id not help. The code I'm using here is pretty close to what appears on the Godot website as a tutorial Maybe I missed something, but I think this is a problem with the engine.

Steps to reproduce

Write a simple plugin using the code described on this page:
https://docs.godotengine.org/en/stable/tutorials/plugins/editor/3d_gizmos.html

The handles will be drawn so tiny you won't be able to see them. (You can still click and drag on them though).

Minimal reproduction project

simpleGizmoTest.zip

@Zireael07
Copy link
Contributor

IIRC Compatibility renderer (GLES 3) has no concept of line width, leading to this issue.

@blackears
Copy link
Author

I just tried Mobile and Forward+ and am getting the same issue.

@AThousandShips
Copy link
Member

AThousandShips commented Apr 5, 2023

Do you still get this on 4.0.2?

It looks like handles are drawn as points to me, and that should be fixed in latest release for compatibility

@Calinou
Copy link
Member

Calinou commented Apr 5, 2023

The issue about OpenGL point size is fixed by #73966, which is in 4.0.2.

The documentation is likely not setting point size correctly on the handle material, or the engine is not doing so on script-created handle materials for some reason.

@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale Apr 5, 2023
@Calinou Calinou reopened this Apr 5, 2023
@blackears
Copy link
Author

I'm still getting the issue in 4.0.2.

It might be related to my graphics card. I can't run Vulkan and am relying on whatever Godot is using to run on older hardware. My graphics card is a FirePro™ W2100.

image

@Calinou
Copy link
Member

Calinou commented Apr 5, 2023

AMD OpenGL on Windows has a tendency not to support line width and point size greater than 1, so I doubt this can be fixed unless we make gizmos use billboarded quads.

@blackears
Copy link
Author

blackears commented Apr 5, 2023

Wouldn't that be an option? At least for compatibility with older systems?

I mean, systems that don't support point size? There must be a lot of AMD users.

@Calinou
Copy link
Member

Calinou commented Apr 5, 2023

I mean, systems that don't support point size? There must be a lot of AMD users.

Is it an issue on recent AMD graphics cards on Windows though? The FirePro W2100 is a 2014 graphics card and is based on a GPU that came out in early 2013 (Oland). Its drivers are no longer being updated as AMD ended its support years ago.

Billboarded quads have some downsides compared to actual point rendering, and may also perform worse (though this depends on how the hardware implements them).

@AThousandShips
Copy link
Member

Using the tutorial and creating handle material sets the correct point size on master at least from GDScript

@Okxa

This comment was marked as off-topic.

@Zireael07
Copy link
Contributor

Handles likely need similar treatment as origin lines got in #83895

@FailMelon
Copy link

Make sure you set the point size in the material.

Godot_v4 1 1-stable_mono_win64_0KEGgj459m

S64NWVmH5e.mp4

@Okxa
Copy link

Okxa commented Nov 6, 2023

On further inspection, handles show up in the MRP for me. (Either by setting the materials point size, or by using the create_handle_material() function)

However, an addon I made following the 3D gizmo tutorial, does not show the handles when under a specific project:

  • I developed the addon under this existing project, and the handles are not visible (now interactable!) when using the addon under this project.
  • The handles are shown as normal and are interactable when the addon is copied to a new project.

In fact when I make a copy of the original project, and delete .godot folder, the handles show up again, but of course introduces some additional work otherwise (Editor UI resets etc.)

This indicates there is something cached somewhere that breaks the handles. Is there any specific file that would cache something about this?

Anyways, consider my specific issue solved.

EDIT: It's this: #78193

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants