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

Draw fewer fishbones to improve Path gizmo readability and performance #101350

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Jan 9, 2025

This affects both Path2D and Path3D.

Testing project: test_fish_bones.zip

Preview

Top-left corner: Path2D
Bottom-right corner: Path3D

Before After
out webp out-new webp

@Calinou Calinou requested review from a team as code owners January 9, 2025 15:09
@Calinou Calinou added this to the 4.x milestone Jan 9, 2025
@fire fire requested a review from a team January 9, 2025 19:20
Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not review the code, but the screenshots do seem to help usability

@akien-mga
Copy link
Member

Looks fine overall.

Both before and after though, I wonder why those look like this in the bottom right part of the curve:

image

There seems to be room for improvement of how they're calculated to be a bit more tangential to the curve and more visible. But that's out of scope of this PR.

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Jan 9, 2025
@akien-mga akien-mga merged commit 06a6a0b into godotengine:master Jan 9, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@Calinou
Copy link
Member Author

Calinou commented Jan 9, 2025

Both before and after though, I wonder why those look like this in the bottom right part of the curve:

There are only 3 vertices for each fishbone even in 3D space, so depending on the angle relative to the camera, these can appear to be almost flat. If we added 3 more vertices on top of it to draw the arrow in a "cross" shape, it would be more visible, but you would lose the information on the path's tilt angle (which matters for some scenarios).

I wonder what other engines do here.

@Calinou Calinou deleted the path-draw-fewer-fish-bones branch January 9, 2025 20:09
@Calinou Calinou added topic:3d and removed topic:3d labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants