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

Improve the 3D editor selection box appearance #40106

Merged
merged 1 commit into from
Nov 9, 2020

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Jul 3, 2020

  • Draw two boxes slightly offset from each other to give the illustion of a thicker outline.
    • With large meshes, the boxes will appear to be more offset from each other. It looks a little strange, but at the same time, it also gives you a visual cue as to *how large the node's AABB is, which isn't necessarily a bad thing.
  • Decrease the offset compared to the 3D node's AABB to give a more accurate representation of its size.
  • Make the box fully visible instead of only displaying the corners.
  • Draw a x-ray version of the box that's more translucent, but visible through walls. This helps make the box more visible while still having a sense of depth.
  • Use an orange color similar to the 2D editor.

Preview

image

Old version

Image

I thought about adding a subtle fill, but it's fairly complex so I'd prefer leaving it to a future PR.

@groud
Copy link
Member

groud commented Jul 6, 2020

Same comment as in the 2D counterpart here : #40118
I think blue is not a distinctive color enough, so even if it's more consistent with the editor look, it kind of hurt legibility.
I would avoid a sky color as a selection outline.

The other changes look good :)

@Calinou
Copy link
Member Author

Calinou commented Jul 6, 2020

@groud If you'd like, I can try drawing a translucent black box that's about as large as the original so the selection outline can be seen on any background.

@stijn-h
Copy link
Contributor

stijn-h commented Jul 7, 2020

The right edge looks like it is receiving shadows, or it is translucent (but it isn't behind any face). I don't think the selection box should receive shadows.

@Calinou
Copy link
Member Author

Calinou commented Jul 7, 2020

@hinlopen Both selection boxes (translucent and opaque) are unshaded. The opaque selection box isn't visible through solid surfaces, but the translucent one is.

@Calinou
Copy link
Member Author

Calinou commented Nov 6, 2020

I've tried to display both a black and white box with slightly different offsets, but it's not really easier to see:

image

Depending on the viewing angle, the lines may end up aligning perfectly, making one of them invisible.

- Draw two boxes slightly offset from each other to give the illustion
  of a thicker outline.
- Decrease the offset compared to the 3D node's AABB to give a more
  accurate representation of its size.
- Make the box fully visible instead of only displaying the corners.
- Draw a x-ray version of the box that's more translucent, but visible
  through walls. This helps make the box more visible while still
  having a sense of depth.
- Use an orange color similar to the 2D editor.
@Calinou Calinou force-pushed the improve-3d-selection-box branch from f12345a to 8a3a4fa Compare November 9, 2020 15:24
@Calinou
Copy link
Member Author

Calinou commented Nov 9, 2020

I pushed a new version which should be easier to see:

image

@akien-mga akien-mga merged commit ed62876 into godotengine:master Nov 9, 2020
@akien-mga
Copy link
Member

Thanks!

@Calinou Calinou removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Nov 9, 2020
@groud
Copy link
Member

groud commented Nov 9, 2020

Yup, I think it's a lot better with this orange! Good job!

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.

4 participants