DmitriySalnikov / godot_debug_draw_3d

Draw 3D debug graphics and 2D overlays with this add-on.
https://dd3d.dmitriysalnikov.ru/
Other
451 stars 23 forks source link

[Feature Request]: Viewport Scaling Visibility #26

Closed blast-harbour closed 9 months ago

blast-harbour commented 1 year ago

Feature description

My project uses a 4k base resolution to make use of high resolution UI assets. as a result, the lines drawn by debug draw 3d become too thin to see often. image

Implementation Ideas

Maybe a way to set line thickness would be helpful?

DmitriySalnikov commented 1 year ago

I think this relates to #3


Is the editor interface also very thin in 4K? (when selecting 3d nodes, for example)

kitbdev commented 1 year ago

Using anti-aliasing on the lines should fix this and would allow for the lines to stay the same size. For reference I'm thinking of this

DmitriySalnikov commented 1 year ago

In this addon, I just draw wireframes that the engine displays with a thickness of 1 pixel at any resolutions. So I'm not sure if anti-aliasing will help.


It looks a little better with anti-aliasing, but I can't check it in 4K or even 1440p.

No AA: image

MSAA 8x: image

TAA: image

kitbdev commented 11 months ago

Possibly related: https://github.com/godotengine/godot/issues/37016 Is this in Vulkan or the Compatibility OpenGL renderer? I'm also curious what the 3D scene view looks like at 4k, does the grid there have the same issues?

DmitriySalnikov commented 10 months ago

Does this version look better (in terms of visibility)? Link to my personal server (Chromium only) In this demo, all meshes are replaced with volumetric ones with a thickness of 0.1.

Unlike the usual wireframe lines, which are always rendered as 1px, these meshes change their size depending on the distance. image

There are still distortion issues right now (with certain transformations), and I don't know if I can fix it.

And I have not decided how to change the API so that it is possible to switch to regular or volumetric models. Add another parameter to all draw_* methods? Or call another method before draw_*, for example set_line_thickness?

DmitriySalnikov commented 10 months ago

https://github.com/DmitriySalnikov/godot_debug_draw_3d/assets/7782218/f25194cb-933d-4792-9d21-d7036b8ffe7c

DmitriySalnikov commented 9 months ago

Fixed in f96700bcb4ea44ae45dae4ea81246aaf462c6d76