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

Support editing scenes of any large physical size #100896

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Flarkk
Copy link
Contributor

@Flarkk Flarkk commented Dec 29, 2024

Follow-up of #99986.

This PR enables rendering and editing arbitrary large scenes and objects in the Editor.

This is especially useful for open worlds, space scenes and alike.

This is achieved by fixing a handful of numerical precision issues :

  • Move computations happening in world space to view space
    • Gizmo positionning
    • Gizmo handles picking
    • Objects picking
  • Box select of very far away objects
  • Orthogonal camera positionning with very large zfar

Depends on :

Demo

large_zfar_editor.zip

Vegetation is ~1m tall and ~10m from the origin
The terrain is 10 km large
The earth's radius is 6,000 km
The moon's radius is 1,700 km and is 400,000 km from the origin
The sun's radius is 700,000 km and is 150 million km from the origin
The Andromeda galaxy is 152,000 light-years wide and is 2.5 million light years from the observer

output.webm

@Flarkk Flarkk requested review from a team as code owners December 29, 2024 11:24
@Flarkk Flarkk marked this pull request as draft December 29, 2024 11:24
@Flarkk Flarkk changed the title Enable uncapped zfar in Editor Enable unlimited zfar in Editor Dec 29, 2024
@Flarkk Flarkk changed the title Enable unlimited zfar in Editor Support editing scenes of any large physical size Dec 29, 2024
@Chaosus Chaosus added this to the 4.x milestone Dec 29, 2024
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.

2 participants