Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Instanced LOD System #7782

Merged
merged 39 commits into from
Apr 12, 2023
Merged

Instanced LOD System #7782

merged 39 commits into from
Apr 12, 2023

Conversation

dinomut1
Copy link
Member

@dinomut1 dinomut1 commented Mar 21, 2023

BabylonJS has a more robust instanced LOD system that we will use as a basis. The difference between Babylon's instancing and the "thin" threejs instancing is detailed here:
https://discourse.threejs.org/t/lod-instancing/20524/2

We will implement the more robust instancing and LOD system using a LODComponent and LODSystem that work together to keep track of each instance's distance from the camera, and switch different instanced LODs on and off based on said distance. These components should be generated automatically when a model with instanced geometry is loaded into a scene.

The components should be configurable in the editor with some menu interface to add, remove, and edit LOD levels for every mesh in the scene, instanced or not. This UX should be embedded in the properties of the ModelComponent that contains the lod instances

We also need a GLTF extension for defining instanced LODs in Blender, modifying and saving LODs in engine, and successfully passing instanced LODs through Model Transforms without loss of information.

The same goes for a USD plugin that can define instanced LODs with equivalent functionality to the GLTF extension

This pull request closes #7785
closes #7786
closes #7787

dinomut1 and others added 23 commits March 21, 2023 15:29
fix apply lod transforms on level load
allow lods with references to target model geometry
@dinomut1 dinomut1 marked this pull request as ready for review April 8, 2023 00:01
Copy link
Member

@2dels 2dels left a comment

Choose a reason for hiding this comment

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

Great job!

@dinomut1 dinomut1 enabled auto-merge April 12, 2023 02:51
@dinomut1 dinomut1 merged commit 5f64d7c into dev Apr 12, 2023
@dinomut1 dinomut1 deleted the instanced-lods branch April 12, 2023 03:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create InstancedLODSystem Create InstancedLOD component Create InstancingRegistry data structure.
3 participants