PEKennedy / cityquery

0 stars 0 forks source link

LODs for camera #18

Open PEKennedy opened 1 year ago

PEKennedy commented 1 year ago

Complex 3d scenes can hamper performance, as such, some work should be placed into making the camera only render what is needed.

LODs (levels of detail) mean keeping track of how far different objects are from a camera. If they are farther in the distance than a certain threshold, the object is substituted for a lower detail version of the same object.

CityJSON supports multiple LODs, so this is applicable to cityquery models. If heightmap based terrain is supported, the LODs can also be applied to the generated terrain.

PEKennedy commented 1 year ago

Objects a certain distance from the camera should be kept in the "loaded files" but removed from the canvas to free resources. A reasonable initial distance for this might be the horizon (~5 km)

The thresholds for LODs and unloading should probably be editable in the UI (separate issue later)