Yo @bghgary …
UPDATE: Yep there is an issue for me with MSFT_lod and recursive error in Sandbox
MSFT_lod snippet:
{
"mesh": 0,
"rotation": [
0.0,
0.0,
0.0,
-1.0
],
"name": "Broadleaf_Desktop_LOD0",
"extensions": {
"MSFT_lod": {
"ids": [
2,
3
]
}
},
"extras": {
"MSFT_screencoverage": [
0.5,
0.25,
0.13
]
}
}
Sandbox Error:
Test Tree GLTF
TestTree.zip (3.2 MB)
Also… I dont think the MSFT_lod is taking into account the you break up submeshes into a bunch of primitives… So even my LOD meshes are getting split into a bunch of separate meshes.
Can you please take a look this one as well. Thanks Bro ![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/win10/slight_smile.png?v=9)
Sorry for the slow reply.
The problem is that the asset is pointing to node 2 twice. Once from node 0 and once from the MSFT_lod extension. This isn’t allowed. If I remove 2 and 3 from node 0’s children, then it renders.
So if you make a LOD out of a node you have to remove it from whatever parent node’s children list. Ok… But i still don’t see the LOD switching when scrolling in and out in the sandbox… Also it throws the new LOD0 mesh OUT of it parent into the main scene hierarchy.
The MSFT_lod implementation in Babylon is currently for progressive loading. There is a backlog item to implement the rendering version. Add support for loading MSFT_lod extension as rendering LODs · Issue #4818 · BabylonJS/Babylon.js · GitHub
I am currently trying to implement rendering myself… I got it going pretty good EXCEPT… I cant figure out how to convert screen coverages to babylon LOD distances… Can you please help me with screen coverage to distance calculations ???
@deltakosh had some ideas when we talked about it.
to be performant we need to use weblg queries that will give us the screen coverage of a mesh. Then we can convert that number of pixels to a threshold like a ratio to the overall number of pixels
Hi just use the tree as an example, can anybody show more detail explnation and any exmaple link in playground
?
can you please give an example about how to use MSFT_lod extension with a playground link?
2 Likes
I’m not sure what you are looking for. The MSFT_lod extension is a loader extension. Unless you want to stop at a particular LOD or something similar, there is nothing special to do with the code. Perhaps you want an example of an asset with LODs?
@moxierichard I created a demo and doc page. Does this help?
1 Like