immersive-web / immersive-web/model-element
Is media= enough for LOD handling? (or do we need srcset?)
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 86
- Forks
- 12
- Avg merge
- 7h 12m
- Merged PRs (30d)
- 1
Description
One thing I've been considering is how LOD handling should be handled on the web. Could we leverage <source srcset to define LOD swapping?
An example:
<model>
<source
srcset="assets/example_200.usdz 200w, assets/example_1024.usdz 1024w"
type="model/vnd.usdz+zip"
>
</model>
The idea here would be that when the model is rendered at 200px or less in the viewport that the model from url assets/example_200.usdz would be rendered. Just to be clear I'm not talking about elements innerWidth but rather the render resolution of the model itself calculated from a bounding sphere.
It could be assumed that the lowest quality model is the one that would be rendered at the lowest resolution.
Arguing against this idea it could be argued that the 3D Model Format itself should define this functionality.
I've created a demo using canvas/webgl that has similar functionality that I can share at some point if it's helpful.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the proposed example in this issue and the existing model-element behavior. If available, examine the author's canvas/WebGL demo, then establish whether media= is sufficient for LOD handling or whether srcset or the 3D format should define it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100