Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add MSFT_screencoverage support for MSFT_lod#16736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
miudit wants to merge8 commits intoBabylonJS:master
base:master
Choose a base branch
Loading
frommiudit:msft-screencoverage

Conversation

miudit
Copy link
Contributor

This PR introduces MSFT_screencoverage support to MSFT_lod extension, enabling LOD switching based on screen coverage.

A previous implementation of screen coverage based LOD was submitted in#10509 but reverted in#11840 due to its reliance on a very specific model structure. This update removes the structural constraints and broadens support for arbitrary glTF models.

@bjsplat
Copy link
Collaborator

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@miuditmiudit marked this pull request as draftJune 9, 2025 16:32
@bjsplat
Copy link
Collaborator

@bjsplat
Copy link
Collaborator

@bjsplat
Copy link
Collaborator

Copy link
Contributor

@bghgarybghgary left a comment

Choose a reason for hiding this comment

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

@miudit I'm sorry. This change doesn't address the issue noted in#11840. This still applies only to meshes where MSFT_lod applies to node hierarchies. What is the intended use?

@miudit
Copy link
ContributorAuthor

Hi@bghgary, thank you for the feedback.
Could you please clarify what specific cases need to be covered to fully address the issue noted in#11840?
I’d like to confirm this to determine if it’s feasible for me to implement.

Regarding the intended use, I’m working on rendering several high-poly meshes at once within a large scene in my project, and I want to improve rendering performance.

@bghgary
Copy link
Contributor

Hi@bghgary, thank you for the feedback. Could you please clarify what specific cases need to be covered to fully address the issue noted in#11840? I’d like to confirm this to determine if it’s feasible for me to implement.

MSFT_lod operates on a node of a scene hierarchy as opposed to on a single mesh. The glTF can have a completely different node hierarchy per LOD. For example, the high LOD of one hierarchy may have 10 nodes with 3 meshes but the low LOD may have only 2 nodes with 1 mesh.

@bjsplat
Copy link
Collaborator

@bjsplat
Copy link
Collaborator

@bjsplat
Copy link
Collaborator

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

@bjsplat
Copy link
Collaborator

@bjsplat
Copy link
Collaborator

@bjsplat
Copy link
Collaborator

@bjsplat
Copy link
Collaborator

@bjsplat
Copy link
Collaborator

@bjsplat
Copy link
Collaborator

@miuditmiudit marked this pull request as ready for reviewJune 24, 2025 03:58
@miudit
Copy link
ContributorAuthor

@bghgary
I’ve pushed an update that addresses the issue and added a visualization test that covers cases where each LOD has a different hierarchy (Playground id: #ZSTNSI#3).
Please let me know if anything else looks off.

@bjsplat
Copy link
Collaborator

@bjsplat
Copy link
Collaborator

1 similar comment
@bjsplat
Copy link
Collaborator

@bghgary
Copy link
Contributor

@bghgary I’ve pushed an update that addresses the issue and added a visualization test that covers cases where each LOD has a different hierarchy (Playground id: #ZSTNSI#3). Please let me know if anything else looks off.

Thanks for the updates. It seems you are making changes to the core scene rendering code. It would be good to get input from@sebavan@deltakosh@Popov72 to review the approach.

Copy link
Member

@sebavansebavan left a comment

Choose a reason for hiding this comment

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

the changes in scene looks like they could potentially harm perf by increasing the code in evaluateActiveMeshes which is already a bottleneck I am wondering if there is a less intrusive way to do this ?

cc@deltakosh

@@ -1116,7 +1116,11 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
return this;
}

const bSphere = boundingSphere || this.getBoundingInfo().boundingSphere;
let bSphere = boundingSphere;
Copy link
Member

Choose a reason for hiding this comment

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

this looks like a potential breaking change I am not sure we should create the bounding sphere here.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

This is meant to calculate screen coverage correctly when the highest-LOD root mesh has a hierarchy. I think the coverage should be computed over the root and its children.

Copy link
Member

Choose a reason for hiding this comment

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

wouldnt in this case pick the wrong LOD ?

Let s say smthg tiny as a really large child, the hierarchy would be consider really large showing the highest details whereas it should only display the lowest ?

@sebavansebavan marked this pull request as draftJuly 3, 2025 16:33
@deltakosh
Copy link
Contributor

Any news@miudit ?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@sebavansebavansebavan requested changes

@bghgarybghgarybghgary requested changes

@ryantremryantremAwaiting requested review from ryantrem

Requested changes must be addressed to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@miudit@bjsplat@bghgary@deltakosh@sebavan

[8]ページ先頭

©2009-2025 Movatter.jp