Live data from Hacker News

Apple proposes adding "model" element to HTML that displays 3D content

github.com

151–160 of 241 posts

Re: Apple proposes adding "model" element to HTML that displays 3D content

#151
post #80

Based on the comments so far, I think I'm in the minority who think this would be a good feature for the web. This proposal might not be perfect, but I think the idea is great. There's lots of good reasons to semantically want to embed a 3d model in a page, like any other type of media. Say you're writing a course explaining how differential gears work - a 3d model of that could be really handy to look at to learn. A…

Years of trying to treat models like images shows us it's a poor idea. Maybe now with Disney/Epic PBR being the standard material model it's closer but, that Panic truck? Good luck defining the exact lighting for that so it renders correctly and consistently. The spec text even says that the lighting environment will come at a later date. So, no, you don't seemingly have any control over one of the most important par…

[deleted]

Re: Apple proposes adding "model" element to HTML that displays 3D content

#152
Counterproposal: let's add a new element . It accepts children. You can do and it does... interactive stuff of some sort, but nothing that could be visible from JS because that would leak privacy info, so really it would get direct mouse/keyboard/camera input and do something with it according to the vast list of standardized possibilities. Which would be length 1, because any more than that would be an interoperability nightmare. We'll give it the MIME type "application/stuff+interactive".

The source data would be interpreted according to its own vast list of standardized possibilities, which realistically would have a 3D model format subset of size zero because 3D formats are so diverse and cater to such different needs that etching one in stone for standardization is kinda silly. But we can pretend it'll be size 1. In which case the subtly differing implementations of lighting, texturing, potentially rigging, etc. will make it nonportable for the next decade or so, at which time we'll have a common-denominator format a decade out of date. But at least we called it "stuff" instead of "model" because then you couldn't put a scene into it and $DEITY help you if you wanted to animate anything.

Ok, it's not a great counterproposal. But it doesn't feel like it's inferior to the proposed in any way, and has the advantage of being slightly more honest with its naming.

The only way I could take this proposal seriously is if it set out up-front to define an extremely limited subset of capabilities that are broadly useful. Something like with a 'camera' attribute and children or something. Then you could evaluate various file formats for suitability. But I just don't see any simplistic subset that would make any two groups of people happy. Everyone needs a tiny bit of additional capability for their use case. This is not a subsettable problem.

Re: Apple proposes adding "model" element to HTML that displays 3D content

#153

Earlier quoted context omitted.

> Consider a browser or web-view being displayed in Augmented Reality Feels like Apple is working on something that needs this.

Related history, came about from Apple's Dashboard in 10.4

Oh interesting. Do you have more details about that?

Edit: it's on the first paragraphs of the MDN page about [1]:

> First introduced in WebKit by Apple for the OS X Dashboard, has since been implemented in browsers. Today, all major browsers support it.

[1] https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/...

Re: Apple proposes adding "model" element to HTML that displays 3D content

#155

There's an existing standard that they could have collaborated on. https://en.wikipedia.org/wiki/X3D > Striving to become the 3D standard for the Web, X3D is designed to be as integrated into HTML5 pages as other XML standards such as MathML and SVG. X3DOM is a proposed syntax model and its implementation as a script library that demonstrates how this integration can be achieved without a browser plugin, using only W…

Apple isn't doing anything that's incompatible with X3D. In fact, they didn't even specify which kinds of models they would accept (there's a `type` on the elements). You could easily point one of those at an X3D file.

Sure, you could put an tag into a HTML document, but there's no `` equivalent (like you can use with SVG) to load that content from another URI. When dealing with extremely large (byte-wise) or complex shapes, having the option to load that data separately (or in a more efficient binary format) is obviously desirable.

Re: Apple proposes adding "model" element to HTML that displays 3D content

#156

> Privacy considerations Rendered data is not exposed to / extractable by the page in this proposal, so no tainting is required. We do expect this would require extensions to Fetch (a new destination type), Content Security Policy (a new policy directive), and likely a few others. I do buy 3d model data occasionally (hobby, not for professional uses). I think most stores obfustcate the data somehow although I never t…

As I understand it, this is not so much about DRM as it is about privacy. The new model tag allows the browser to sandbox the display of a 3d object without reporting information back to the web page/server. This way, the browser can use camera data to track the user eye position relative to the device for parallax or to show what is behind the device to accomplish the effect known as "augmented reality." In other wo…

Hmmm I wonder if this would open more side channel attacks to extract information about the user without even going through a permissions dialog.

Re: Apple proposes adding "model" element to HTML that displays 3D content

#157
post #15

Earlier quoted context omitted.

Assuming I'm reading your snark correctly, is this really such a bad thing? People here seem to have a rose-tinted view of the internet's past, before Google, Apple et al. "abused" their browsers' position to push changes into the spec. I can certainly see that apparently there are a lot of HN commenters who would like to go back to the days of IE and no real web technologies or much progress, but I think practically…

I don’t think the original comment had snark. I interpreted it is speculation around the rumored AR goggles.

Zero snark in my comment.

Re: Apple proposes adding "model" element to HTML that displays 3D content

#158
You can export 3D models to HTML using Solvespace: https://solvespace.com/index.pl

These are fully self-contained in a single file along with 3js and can be added to web pages as shown here: http://m-labs.hk/software/solvespace/

You can zoom and rotate the models on that page.

That's been a feature since whitequark was the maintainer and worked for m-labs. And with the latest development branch you can link STL files too, so it can effectively be used convert STL to HTML.

Re: Apple proposes adding "model" element to HTML that displays 3D content

#159

Based on the comments so far, I think I'm in the minority who think this would be a good feature for the web. This proposal might not be perfect, but I think the idea is great. There's lots of good reasons to semantically want to embed a 3d model in a page, like any other type of media. Say you're writing a course explaining how differential gears work - a 3d model of that could be really handy to look at to learn. A…

>> But wow you gotta get a lot of JS slapped together to just get something rendering.

Or you can just model your item in solvespace (or link an STL file) and export it as HTML. Done.

https://solvespace.com/index.pl

Examples: http://m-labs.hk/software/solvespace/

Re: Apple proposes adding "model" element to HTML that displays 3D content

#160

Earlier quoted context omitted.

We have a 3D model format for the web in glTF. This is Apple having Not Invented Here Syndrome again. USD was developed at Pixar, of which Steve Jobs was the founding investor. Apple is the only one who wants USDZ on the Web. Everyone else is already using glTF.

USD is widely used in all industrites, from video games to archviz to 3D rendering. If anything, glTF is the niche format.

GLTF, especially the binary format, is specifically design for transmission over the web. Wavefront is uncompressed text, Collada is even worse because it's extremely verbose XML. I don't know a lot about USDZ, but what I do know is that it's overkill for the web (graphics features that are mostly too costly to do in WebGL, additional scene description data like audio tracks, etc), while also lacking specific features that GLTF has that are aimed at the web, like streaming, progressive download of texture data.
Post reply on HN