Switch LOD by screen coverage?


#1

In glTF extension MSFT_lod, there is a extras property MSFT_screencoverage which specify switching threshold by screen coverage.

Does Babylon support this property? Can it switch LOD level based on screen coverage instead of distance?

Currently, seem like Babylon only support switching by distance (Babylon.js Documentation).


#2

adding @bghgary to the thread.

Please expect a bit of delay due to the holiday.


#3

There’s no rush, I’m just wondering :smile:

Wish you guys have a happy holiday season!


#4

The loader currently only loads MSFT_lod as progressive LODs and not for rendering. There is a task for it here: Add support for loading MSFT_lod extension as rendering LODs · Issue #4818 · BabylonJS/Babylon.js · GitHub. If you have a need, we can look into implementing it, including possibly using screen coverage.


#5

Yes, it would be great to have LOD switching by screen coverage as an option.

For distance-based mechanism, I’ll have to consider the size of each object to fine-tune the distance.
While on the other hand, quite many LOD creation tool using screen coverage (on-screen size) as the main parameter to process, so I think it is a more universal approach
(UE4 are using screen size as default mechanism: Creating and Using LODs).

Do you think this approach will makes the performance decreased? (in scene with hundreds of objects)


#6

I have never implemented this before and certainly not with WebGL, so I don’t know. Are you looking for this from the perspective of loading a glTF or just screen coverage in general?


#7

I’m thinking about screen coverage in general, as an option for the current LOD system of Babylon.


#8

Ok, will probably need to discuss with @deltakosh and team. Won’t happen until after the holidays though. :christmas_tree: Hope that’s okay.


#9

Hi guys!
Recently i made a experiment about MSFT_lod plugin. I export the model by Max2babylon, then i use glTF-Toolkit to merge them together. but i find that ids of nodes point to the wrong meshes because Max2babylon plugin add a default light to the model.
And i think it will be necessary to support switching LODs based on the render distance because addLODlevels function is already exist.
By the way, How can i upload my test data to the new forum?


#10

@yzthr Sorry I missed this message before. We just enabled uploading zip files for test data.


#11

Added issue for this: Add screen coverage LOD support · Issue #5738 · BabylonJS/Babylon.js · GitHub