Live data from Hacker News

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

github.com

131–140 of 241 posts

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

#131
While I agree that Apple should fix their WebGL implementation, this doesn't seem like such a bad idea.

I have noticed a lot shopping sites now have 3D models of products that you are buying, I feel like this element would be a great match for those situations.

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

#132
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 WebGL and JavaScript.

Apple is demonstrating a pretty bad case of "not invented here" syndrome.

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

#133

Earlier quoted context omitted.

Can you explain the steps necessary to display a 3D model using WebGL? (without using any 3rd party libraries). Could it possibly be easier than just pointing `src` to the URL of a model file?

What's the format of the 3D model? Are you going to build in support for all of the dozens of model formats that are in common use in every browser? Are you going to specify yet another new 3D model format as a standard target for browser to support?

[deleted]

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

#134
> while we are not proposing a DOM for the data at the moment, we expect to in the future.

On one hand this is exciting. On the other, I'm having trouble seeing practical applications. Can anyone point to some websites showing DOM use in existing media elements (e.g. SVG)?

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

#135

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 is demonstrating a pretty bad case of "not invented here" syndrome.

I don't think that's the case here at all. Apple's proposal solves a completely different problem, which is to embed arbitrary model formats on the page. X3D is just one possible format and without something like Apple's proposal in combination, it could only be used inline, which may not always be preferred.

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

#137
post #134

> while we are not proposing a DOM for the data at the moment, we expect to in the future. On one hand this is exciting. On the other, I'm having trouble seeing practical applications. Can anyone point to some websites showing DOM use in existing media elements (e.g. SVG)?

DOM for SVG allows applying the same code that manipulates HTML to SVG with very little changes. You can splice it in with AJAX, change it via styles, etc. It facilitates writing generic scripts that can be reapplied to widely different use cases.

The idea of having a generic interface to widely different types of entities is a very powerful concept and it is very unfortunate that so many web developers today don't seem to get it.

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

#138

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…

The problem is no feature set will meet even 5% of the needs of most devs.

Maybe you'd like to display a "model" of a city. Oh, too big, needs to be streamed, LODed, etc. Maybe you'd like to display a "model" of a forest. Oh, well, you need a terrain renderer that dynamically generates geometry from height data plus you need a specialized renderer to render the grass and bushes else the frame rate will be 1fps. You'd like to display a "model" of Waikiki Beach at sunset and you'd like to use a water shader with a sunset and reflections. You'd like to display a "model" of the Los Angeles mountains as viewed from downtown Los Angeles, complete with atmospheric ray scattering to convey the air quality. You'd like to render a fur covered animal and render fur, not just a texture. You'd like to render a "model" of a person with realistic hair. You'd like to render a "model" of wax candle with subsurface scattering so it actually looks like a candle. You'd like to render a "model" of camera lenses to explain refraction so you'd actually like them to refract.

Engines like Unreal and Unity let you change the way they render because every situation requires different solutions. No generic "render a model" covers rendering all models. An API like WebGPU/WebGL lets devs add what they need.

Oh, you say, we'll just add features to cover those use cases. Now Chrome will have features A,B,C, Firefox, A,B,D, Safari B,E. That will be hell for devs. An API lets people write libraries with features they need that work in all browsers. They don't have to wait for the magic day N years from now that all browsers finally add the feature they want.

Further, people will keep requesting non-3D features "I want to have an in my scene". "I want to have a in my scene" that I can draw on in realtime. "I want to have a model that displays a in my model so people can draw logos on their avatar's t-shirts". I want to play sounds in 3D from specific points in my model, etc. until this "model tag" has all of HTML and all of JavaScript inside

Again, this is all better solved with APIs instead of trying to cram more and more and more features into a single tag.

> The other challenge of doing everything yourself is that code is stuck in time. It's going to get very minimal benefits from browsers and devices getting better over time, it won't get native UI changes - in 5 years it'll look very dated, if it's still accessible.

And neither will a model tag. In fact it will be worse. First off, when I put a model on my page, I want it to look they way I or my artist created it. I don't want it to change over time based on someone else's idea of how it should look.

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

#139
post #65

Earlier quoted context omitted.

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…

As long as they still use a tag does the chrome or JS implementation matter? The tag captures the semantics that Google can now use to show the video in their search results! etc. Using custom plugins like Flash made this much harder.

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

#140

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…

Yeah I actually agree -- this is very in line with the semantic web and is in many ways is a much more elegant proposal than Canvas (though I love canvas). This will make it much easier for devs to embed a 3D model in a page without sideloading all of three.js or similar monstrosities. It will also enable 3D model search engines to more easily find models on the web because of the semantic tag.
Post reply on HN