WebKit / explainers

Explainers from WebKit contributors
371 stars 28 forks source link

3DModel schema as possible alternative to <model> #82

Closed elalish closed 2 years ago

elalish commented 2 years ago

I'm just posting a brief synopsis of a side discussion from TPAC that didn't make it into the notes. There was general agreement that web components are doing a good job on the 3D-in-the-DOM use cases, but there is a gap in terms of immersive experiences (mostly AR permissions and pulling 3D content out of a VR browser). The <model> tag is a very ambitious undertaking, so the question is whether something simpler might suffice to support these XR uses cases.

It seemed the main thing everyone was excited about with the <model> tag was the ability to know a 3D model was present on a page so that an appropriate experience could be launched (AR on a phone, put the object in the XR environment of a headset, or share it to another XR app). Search engines have this same need, and Google has been using the 3DModel schema (in a very limited way so far) to get this data from a page agnostically. We'd like to encourage its use more broadly, since it is quick and simple and the standards process is very lightweight.

I recently added a feature to <model-viewer> to let users opt-in to auto-generating this schema, which other web components could also easily add. And we're also discussing adding some relevant data to the schema like does the model place on the floor, wall, ceiling; does it allow scaling, etc. Perhaps this would be an easier way to get started?

othermaciej commented 2 years ago

While a schema might address some of the use cases for <model>, it doesn't seem like a good solution for any in-browser use cases, since browsers generally follow the semantics of HTML elements (as augmented by JS and CSS) and totally ignore schemas. It would be a strange choice to have the browser change its behavior based on a schema only in this one case, instead of minting an element.

The schema also doesn't seem to address the AR rendering use case in the Explainer.

rektide commented 2 years ago

There was general agreement that web components are doing a good job on the 3D-in-the-DOM use cases, but there is a gap in terms of immersive experiences (mostly AR permissions and pulling 3D content out of a VR browser).

What are some examples folks might give for this?

I was a bit surprised to see that the element doesn't seem like it will be helpful in any kind of a scene. I'd like to know more about what webcomponent offers folks think are doing a good job.

grorg commented 2 years ago

Like @othermaciej , I'm not sure how a schema addresses the use cases.

It seemed the main thing everyone was excited about with the tag was the ability to know a 3D model was present on a page

I can't remember that. I agree that there should be a way to reference a 3d model from the head of a page, just like we can reference images or video but, as far as I recall, the discussion about <model> was mostly regarding the inline behaviour (including choosing different variants and launching AR) as well as what an object model might look like if more of the page becomes "3d".

I'm going to close this. We're migrating this effort into the W3C Immersive Web Community Group, so maybe it is worth bringing up the schema there.