Closed DeerTears closed 3 years ago
Oh snap, forgot to include an example of CSGPolygon with the current state of paths. Sometimes it works out but sometimes it's just...not fun, and my best option is making height variations on these points imprecisely with perspective view.
I've definitely experience the same point/handle confusion, though my fear would be a less bright color might blend in to many backgrounds (in you example above, could you distinguish a blue handle from the blue CSG shape?)
A different shape (e.g. a triangle) might make them sufficiently unique though I don't know that the current gizmo system allows you to customize that.
Also worth mentioning #527 is about making handles easier to work with (though doesn't mention the visibility aspect).
Actually there's no builtin concept of customizing handle colors either :( https://docs.godotengine.org/en/latest/classes/class_editorspatialgizmoplugin.html#class-editorspatialgizmoplugin-method-create-handle-material
Thanks for taking a look at this @rcorre , I really appreciate it. I only suggested blue because I knew the white border around it would help it stand out, but I really appreciate your critique, thank you.
I was also going to ask, do you think it's possible to make the 1-pixel-wide line it's using any thicker? As an optional editor property? (because I know how increasing this line's weight would be a problem in crowded scenes)
Or even that, if making two handle materials use a different resource won't work for the engine, that something like create_icon_material() could be used as an alternative to a handle material?
Feel free to reuse the Path2D editor handles I added in Godot 3.2: https://github.com/godotengine/godot/pull/31466
Ideally, we should make the 3D path editor feel as similar as possible to the 2D path editor.
I was also going to ask, do you think it's possible to make the 1-pixel-wide line it's using any thicker? As an optional editor property? (because I know how increasing this line's weight would be a problem in crowded scenes)
Maybe, but line widths above 1 are poorly supported across hardware. I'm not sure if this will still be feasible with Vulkan. (We really need a bespoke line drawing implementation in the long run...)
If we want to make the line easier to see, we could draw it twice with different translucent colors.
Unfortunately I'm not seeing an easy way to draw arbitrary shapes for handles in a 3D plugin. The 2D editor uses forward_canvas_draw_over_viewport, for 3D I'd need access to a Camera
to translate the 3D points to the 2D viewport.
create_icon_material
says:
They can then be accessed with get_material and used in EditorSpatialGizmo.add_unscaled_billboard
add_unscaled_billboard
doesn't have any concept of position or scale so can't be used for the points. I tried to use an icon material for add_handle
in spite of the docs, but it was invisible.
Maybe we could add an optional texture
param to https://github.com/godotengine/godot/blob/6a9fbafcbbd7954761fb17554ed08fb62e3554dd/editor/plugins/spatial_editor_plugin.cpp#L6521. That could be useful to plugins (both builtin and user-made) in general.
With 2D-style handles:
Compared to the current handles:
The original defintely "pops" more, I'll see if I can adjust the size/color.
Seems that the path2d handle icons are actually 10x10 as opposed to 16x16 as documented here. Should they be resized to 16x16? They seem kinda small even in 2D, at least to me.
With resized icons:
Here's what the larger icons look like in 2D:
3D makes a lot of assumptions about handle indices that prevented me from reording the handles while added them, which means:
@rcorre Looks fine to me. Note that increasing the icon sizes may affect their selection box. While making points easier to select is a good thing, we should make sure that points close to each other can still be selected reliably.
I double checked and wasn't having any problems selecting nearby points
Of a related note, the 2D curve editor has a button for adding the handles for points, the 3D editor requires you to click with shift held (which isn't intuitive - I hope it's documented somewhere but I haven't found it yet). There should be a button for adding handles for each point. I'd also like to see the ability to edit the values for points and handles so you can set exact x/y/z and rotation values for each point/handle if necessary. If you don't think this should be included as part of this request let me know and I'll open a separate one.
@balloonpopper I thought I saw a response to this, but maybe it was only via email. See #527.
@balloonpopper I thought I saw a response to this, but maybe it was only via email. See #527.
Cheers, I put a comment on #527
@rcorre Can you open a pull request with your changes (or link to your branch), please?
Sure thing! Its targeted against 3.2 right now, but I'll get it up to date with 4.0 and open a PR in the next few days.
the 3D editor requires you to click with shift held (which isn't intuitive - I hope it's documented somewhere but I haven't found it yet).
I had to find this comment to learn how to add them at all.
Describe the project you are working on:
A marble-racing game where I'm using Path 3D nodes and CSGPolygons to create collidable downhill tracks. I create my courses by outlining and smoothing the downhill slopes in Orthogonal X/Z view before making curves in Orthogonal Y view.
Describe the problem or limitation you are having in your project:
When I have a Curve3D with points all placed and smoothed on an Orthogonal view, the smoothing handles and the main points are incredibly difficult to tell-apart, even when a CSGPolygon is used to display the resulting Path in a clearer way.
The worst is when I make a path using Orthogonal X view and switch to Orthogonal Y view, showing clusters of large orange dots on one axis which are incredibly difficult to tell-apart. Only 1/3 of the shown dots are actually the points of the line.
Basically, I'd like to be able to tell which icons represent the Curve3D's points without having to rely on the current system, which is a pixel-wide line. The pixel-wide line is Blue by default (in Editor Gizmos) if it's connecting points, or grey if it's showing the smoothing handles.
Now, it's clear that some effort has already been made to make Curve3D handles distinguishable from points, and the points/handles are already somewhat-transparent when deselected, but this is not enough to tell the difference between the two and to have the amount of control I'm looking for with 3D Paths.
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Change the Curve3D's smoothing handles to a desaturated blue. This will draw the eye last (compared to the current orange icon) and will allow smoothing handles to be distinct from path points at-a-glance.
This change would let me edit a Curve3D to my liking in any view without relying on previous knowledge of the path, counting these dots in groups of 3, hiding the CSGPolygon or other Geometry that is obstructing my view of the path, or turning on X-Ray mode for Paths and squinting to see those pixel-wide lines.
Alternate solution:
Make Curve3D handles/points more transparent when deselected, or have the Path draw on top of the editor icons, so it's easier to see the connecting line that demonstrates how the icon represents a handle or a curve. The below demonstration isn't great but I hope it gets the idea across
The only thing I don't want is smaller handles. Please keep these handles large, I love how easy they are to spot and grab. It's just the inability to tell the points apart from the handles is what makes this frustratingly difficult to work with in-engine.
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
Copy this element:
Adjust it to this colour (roughly) in an image-editor:
Have the smoothing handles refer to this icon instead of the old icon. Pseudocode:
Curve3D.point.icon = "res://Gizmos/icons/point.png" Curve3D.handle.icon = "res://Gizmos/icons/handle.png"
If this enhancement will not be used often, can it be worked around with a few lines of script?:
The lines that connect points of a Curve3D can have their colour changed in the Gizmos menu of the Editor settings. But icon itself (or its transparency) cannot be changed without editing the Godot Engine source code and introducing a new colour of an icon in the Engine's source.
Is there a reason why this should be core and not an add-on in the asset library?:
I believe it's important for accessibility's sake to make two near-identically-looking core Gizmos visually distinct from one-another, especially since they are intended to behave differently and are always found close-together.