Support editing scenes of any large physical size #100896
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 :
Depends on :
intersects_ray
andintersects_segment
#100511 (remove numerical precision issues on raycast functions)BVH::ray_query()
#100478 (remove numerical precision issue on gizmo picking)Camera3D::project_local_ray_origin()
#100718 (enables view space raycast)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