I’m implementing a model visualization and would like to understanding better how to handle LODs.
Looking at the source, it seens that distances are always calculated based on a “fixed”
_v2 point, in which LOD’s worldMatrix is applied.
In my use-case, it would make sense to get the distance from object’s center, so that no matter the side the camera looks from I could get the simpler or more complex object.
Here is the view I get from one side:
And here the view with the model rotated (other side). Almost the same distance from camera:
For this tests, I’m using Box3Helper to get a simplified Object3D from the original object:
const b3 = new Box3().setFromObject(object); const hiddenBox = new Box3Helper(b3, 0x010101); hiddenBox.visible = false;
The idea of the last line, was to enforce the object to hide after certain distance, but seems like it doesn’t have effect because of this line.
How could I enforce an object to be invisible, to improve performance?
Solved this last part putting the
visible=false set inside a