Live data from Hacker News

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

github.com

81–90 of 241 posts

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

#81
post #4

Earlier quoted context omitted.

>I still think this is a very bad proposal. Why compare something with an image and then disallow it to be treated like other ressources? This is typically bad corporate influence on the web. Because webgl fingerprinting. Also, I'm not sure why you think not being able to extract the data using javascript is "bad corporate influence on the web" or" DRM". you can still do whatever you want. The models are freely avail…

You, the dev. Not you the client, hence the user. It's closed software by design, and we all have seen where it leads to.

>You, the dev.

As per the parent comment, it's not exposed to the javascript running on the page, which is arguably the "dev" in this case.

>Not you the client, hence the user.

I fail to see how it being exposed to the javascript running on the page or not makes a meaningful difference to the user. Are we expecting the average user to interact with the page via the developer console or something?

>and we all have seen where it leads to.

The proposal doesn't have any DRM element at all. At worse you can just inspect network traffic to download the model file to disk and open it in whatever app you want.

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

#82

Earlier quoted context omitted.

> WebGL exists, why do we need a budget restricted version of a model viewer in the browser? WebGL support on safari is ropey at best why would apple implement a standard written by some one else when they can create a new standard no one asked for?

Proposing adding something to the HTML spec is not “creating a new standard no one asked for” Don’t be deceptive. Inaccurate generalizations and hyperbole add nothing to the discussion.

Holding a knife and moving your hand back and forth is not killing someone, either, but my omission of a few important details is the deception. In this case, the something being added to the HTML spec is a new standard that they are creating. I'm not going to argue whether anyone asked for it, but "nobody" is obviously hyperbole; Apple is asking for it.

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

#83

I think apple should just fix their webgl implementation. They seem to be missing a fundamental feature of the web it's interactive. They have an interactive attribute for the tag but no description of what this means? What does it mean to interact with a 3d model? Can 3d model interaction be accurately defined in a single attribute? Why not just use javascript for that logic? The whole point of having multi media li…

> I think apple should just fix their webgl implementation.

They can't even make a key-value storage that doesn't break every other release, you expect them to get something involving complex math to work?

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

#84

Earlier quoted context omitted.

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?

Not sure where you got the idea of yet another format, no one seems to be mentioning that here or in the proposal. Presumably browsers would support the most popular formats, just as they do with images and video. And just as with images and video, we'll likely end up in a situation where m most formats are supported by most browsers, with a couple odd formats that are only supported by some. Doesn't seem like a huge…

I'm only a casual at 3D, but my experience has always been that no two format implementations ever quite work the same way.

Unless apple is proposing to elevate some existing implementation, that already has interop across various platforms, then I think anything they do would necessarily be Yet Another Format.

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

#85
post #76

I think such an element would be welcome, and make it easier to add 3D elements to websites. A while ago I wanted to share some 3D models with people, but there weren't any good options. I found a couple sites that lets you upload .obj files, but you need an account and they worked by embedding renderers in iframes. If 3D models had better browser support I hope there would emerge some sites that would let you upload…

> I don't think it's stranger than having a video tag even though we could embed video without it previously. Having a dedicated 3D tag would make websites more semantic. Video had literally thousands of commonly used sites embed third party players before we got a standard. > A while ago I wanted to share some 3D models with people, but there weren't any good options. So in contrast to video no one gives a shit? > I…

> Video had literally thousands of commonly used sites embed third party players before we got a standard.

Yes, and now I can right click a video and open it in it's own tab, pop it open in an overlay, or download it easily.

> So in contrast to video no one gives a shit?

It's historically been more difficult to create 3D models than images or video. Now phones have lidar, photogrammetry is becoming more accessible, there are ML models that create 3D from 2D, 3D printers have been around for a while, etc. 3D could be more popular if it was easier to share and display.

> We have APIs to render 3D content (WebGL)

That gives you a GL context, then you need javascript to render the scene and add interactivity from mouse events etc.

> have APIs to load random files from a site what more do you need for obj files?

Something like imgur where I can upload a file and send the link to people, and have it work in their chat client and browsers. Something that makes it easy to add a 3D visualization to articles.

> And what format will you use to describe these Scenes? obj doesn't handle animations or complex structures.

Apple uses the USDZ format in their examples, and there's also the glTF format. But obj and stl files should be supported as well.

> What you want isn't a browser but a complete game engine.

Game engines does much more than render 3D scenes. They also handle image loading, audio, video, network connections, user input... You're right, browsers does have a lot in common with game engines.

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

#87
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…

I always though the way Windows' Geometry3D[0] element worked was really nice. You define a list of points in a particular order. Whether a face is on the "inside" or "outside" depends on the direction you "wind" a metaphorical string around those points. After defining some primitives you can start to compose them into a single model.

[0]https://docs.microsoft.com/en-us/dotnet/api/system.windows.m...

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

#88
post #5

Interesting they show support for USD(Z) in the example. USD will be the standard for most VFX houses and make tooling for various web based systems so much easier.

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.

Nvidia are also leaning very hard into USD with their meta- verse project. In that case USD matches requirements perfectly.

glTF 2.0 is widely supported although the quality of that support is variable. The spec is fairly large and every tool that exports glTF does so in a subtly different way.

For instance Blender adds a rotation transform node before every mesh to convert from Y-up (Blender) to Z-up (glTF). Animations run in Y-up space and target the node before that final rotation node. The BabylonJs exporter for 3dsMax converts its meshes and animations to z-up as part of the export process. Many glTF loader implementations get tripped up on this (failing to support more than one model mesh or failing to respect the full transform hierarchy or failing to support animations). There are similar complexities and support issues around vertex data formats, buffer layouts, punctual lights etc

My limited reading of the USD format is that it has an even wider specification. My concern is that browser support will splinter even worse than it would with glTF. The' model' proposal doesn't dig into what USD nodes will and won't be supported and exactly how the data is expected to be rendered.

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

#89
My initial reaction to this was "just use WebGL", but they've made a pretty compelling case as to why that's not ideal:

> Consider a browser or web-view being displayed in Augmented Reality. The developer wants to show a 3D model in the page. In order for the model to look accurate, it must be rendered from the viewpoint of the user - otherwise it is a flat rendering of a three-dimensional image with incorrect perspective.

> A solution to this would be to allow the Web page, in particular the WebGL showing the 3D model, to render from the perspective of the user. This would involve granting too much private information to the page, possibly including the camera feed, some scene understanding, and very accurate position data on the user. It should not be a requirement that every Web page has to request permission to show a 3D model in this manner. The user should not have to provide access to this sensitive information to have the experience.

> Furthermore, there is more information needed to produce a realistic rendering, such as the ability to cast and receive shadows and reflections from other content in the scene, that might not be on the same Web page.

From that perspective, having the rendering handled by the browser seems like a smart idea.

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

#90
Presumably if Apple is proposing it, then they are already implementing it in Safari and will eventually enable it, and either it will be terrible and nobody will use it, or it will be great, and the rest of the browser vendors will need to catch up.
Post reply on HN