Live data from Hacker News

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

github.com

121–130 of 241 posts

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

#121
post #65

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…

3D models are very variable: some are defined with just triangles, some include quads, some are NURBS or subdivision surfaces. Sometimes two sides per polygon are considered, sometimes just one. Ways of navigating a 3D model also vary wildly. Sometimes you just want to pivot/rotate them around a little, but sometimes "walking" inside them makes more sense. Then there are materials and lights, and here people go wild…

Seems like there's a reasonable parallel here with video content. Before native video, video was always in a flash player, and that was good enough for a lot of people— it was proprietary of course, and it it required a plugin. But it worked.

Now with native video, there are still precious few instances where it's just the browser's native video widget. In basically all serious commercial scenarios, there's at least custom player chrome, navigation buttons, overlays, JavaScript to pause the video and play an unskippable interstitial, etc etc.

I would argue that the current state of affairs for 3D viewers is closer to the current state of affairs for video than it is to the Flash player story of 15 years ago. No, there is no explicit "model viewer" widget, but you could just as easily argue that WebGL canvas is to 3D content what is to h264 and webm content.

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

#122
post #65

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…

3D models are very variable: some are defined with just triangles, some include quads, some are NURBS or subdivision surfaces. Sometimes two sides per polygon are considered, sometimes just one. Ways of navigating a 3D model also vary wildly. Sometimes you just want to pivot/rotate them around a little, but sometimes "walking" inside them makes more sense. Then there are materials and lights, and here people go wild…

> In our "current world", if you want a 3D viewer, you use WebGL and Javascript, and voila, what you get is what you see in all browsers that support WebGL.

Under "Considered Alternatives" [0]

> 4. Do not add a new element. Pass enough data to WebGL to render accurately

> As noted above, this would require any site that wants to use an AR experience to request and have the user trust that site enough to allow them access to the camera stream as well as other information. A new element allows this use case without requiring the user to make that decision.

[0] https://github.com/WebKit/explainers/tree/main/model#conside...

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

#123
I'm guessing they're aiming for something similar feature-wise to the 3D model viewer built in to Windows 10.

A lot of people don't know it exists. It actually supports glTF 2.0 models with PBR textures, which I thought was pretty advanced for a preview application.

If you're curious go download this sample glTF model and open it on windows: https://github.com/KhronosGroup/glTF-Sample-Models/tree/mast...

Still, it could be a can of worms because there's a ton of stuff that would need to be specified like camera, lighting, etc.

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

#124
post #119
post #80

Earlier quoted context omitted.

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…

>This proposal does not aim to define a mechanism that allows the creation of a 3D scene within a browser using declarative primitives or a programmatic API. the goal isn't to fully render scenes, it's simply to gain the ability to include a 3d resource in the page semantically. heavier solutions to render scenes already exist.

Seems already possible using a custom web component.

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

#125
post #77

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…

Couldn’t you host a model custom element implementation on a cdn and get almost all those same benefits? I would rather see a turn to custom elements over extending the browser’s native set of tags further.

yes and an example already exists here

https://modelviewer.dev/

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

#126
Dismissing Apple's HTML element proposal because WebGL/WebGPU on already "solve" the problem feels short-sighted...

Under that logic, shouldn't we replace and elements with WASM modules for ffmpeg/libjpeg/libpng rendering into a too?

Or hey, maybe we could drop HTML altogether and just render all content from WebAssembly straight into the ?

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

#127
post #72

Earlier quoted context omitted.

While I do accept the point, I think part of this is just that Google and Apple are the companies doing a large amount of work in the browser space. Because of this, they are likely to be the companies who see the hole that should be filled, or the opportunity to improve something. Who are the people that should be making browser spec proposals, if not the people building browsers? Yes, it sucks if you want to write…

My point isn't from a "a single person should be able to build this" perspective. But from a "big players misuse this to grab market share" perspective. Like how youtube was slow in Firefox for years, since they used APIs only existing in Chrome. Others follow suit, and thus other browsers are forced to either implement the same thing (thus making it a "standard") or lose market share since stuff works better in othe…

Sure, this sucks. I guess the counterargument is that then, given that the new API in Chrome is an improvement over the standard, waiting for this API to be actually accepted and written into the spec is a long, arduous process during which Chrome is unable to implement an objective improvement to their user experience.

My concern is basically that if we force browsers to be spec-compliant and wait for the due process concerning new features, we pump the brakes on everything, and we risk stalling genuinely beneficial updates.

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

#128
It would be a great idea if WebGPU wasn't a thing. Imo Apple and big corp should double down on their WebGPU support instead of pitching their own ideas. And if they want to support something that is production ready, WebGL2 has been out there for a while.

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

#129
post #94

Earlier quoted context omitted.

WebM support has been added to Safari 15

For macOS, where you can also install Chrome or Firefox if you wanted to. Not iOS. Not even in beta.

iOS 15 will at least add support for "WebM Web Audio" and "WebM MSE parser"

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

#130
A new element like canvas, except that model should be allowed to only draw 3d scenes? At this point they should just implement the w3c X3D specificiation into the browser with an integrated renderer (like SVG), so that we do not have to rely on x3dom anymore. Since SVG is not blocked, I do not see why X3D would be blocked.

https://en.wikipedia.org/wiki/X3D

https://www.x3dom.org/

Post reply on HN