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

Add a dynamic infinite grid to the 3D editor (3.2) #43206

Merged
merged 1 commit into from
Nov 17, 2020

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Oct 30, 2020

Backport of #28289 to the 3.2 branch.

  • The grid is now infinite, it follows the camera.
  • The grid is now dynamic, if you zoom in and out, the grid subdivides, expands, and fades.
  • You can now enable grid planes for the XY and YZ planes. Only the flat XZ plane is enabled by default. Each plane is independently dynamic of the others.
  • The default grid size has been increased to 200, and the maximum has been increased to 2000. At 1000, the grid mostly looks edgeless.
  • If you set the division level max and min to the same value then the grid does not expand or subdivide, but instead stays the same size and just follows the camera. Also, if these values are the same, the bias value does nothing.
  • If you want to have Blender-like behavior, set max to 1, min to 0, and set the bias to a really low value. You may also wish to increase the grid size if you have a small bias.

@Calinou Calinou force-pushed the add-dynamic-infinite-3d-grid branch from 0e6e95c to 1e38105 Compare October 30, 2020 12:22
@Calinou Calinou force-pushed the add-dynamic-infinite-3d-grid branch from 1e38105 to f2979e1 Compare November 2, 2020 15:23
@Calinou Calinou marked this pull request as draft November 2, 2020 15:30
@Calinou
Copy link
Member Author

Calinou commented Nov 2, 2020

I applied #43272 locally on top, but then I noticed this PR causes constant redrawing as long as the grid is displayed.

@aaronfranke Do you know how this could be fixed? Thanks in advance 🙂

@aaronfranke
Copy link
Member

If we are backporting this, it might also make sense to backport #39743. An infinite grid might tempt users to zoom out really far and break the editor (as I did...), so we should prevent users from zooming to unreasonable levels.

- The grid is now infinite, it follows the camera.
- The grid is now dynamic, if you zoom in and out, the grid subdivides,
  expands, and fades.
- You can now enable grid planes for the XY and YZ planes. Only the flat
  XZ plane is enabled by default. Each plane is independently dynamic
  of the others.
- The default grid size has been increased to 200, and the maximum
  has been increased to 2000. At 1000, the grid mostly looks edgeless.
- If you set the division level max and min to the same value then
  the grid does not expand or subdivide, but instead stays the same size
  and just follows the camera. Also, if these values are the same,
  the bias value does nothing.
- If you want to have Blender-like behavior, set max to 1, min to 0,
  and set the bias to a really low value. You may also wish to increase
  the grid size if you have a small bias.

Co-authored-by: Aaron Franke <[email protected]>
@Calinou Calinou marked this pull request as ready for review November 17, 2020 09:43
@Calinou
Copy link
Member Author

Calinou commented Nov 17, 2020

Rebased on the latest 3.2 branch. Constant redrawing is now fixed; this should be ready to merge.

@akien-mga akien-mga merged commit 0d53d2b into godotengine:3.2 Nov 17, 2020
@akien-mga
Copy link
Member

Thanks!

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