-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments on the planes-explainer #2
Comments
Thanks for the comments!
|
I would agree with those goals. Good.
That's orthogonal to my point. Obviously there will be world knowledge that has nothing to do with meshes. But the idea of having a "planes" member, with a convex boundary, is too specific. In this case, for example, I would posit it will be obsolete before this proposal is finished -- it's pretty easy to imagine that some time soon planes (in ARKit and/or ARCore) will support arbitrary concave boundaries, with holes in them. The current planes are woefully inadequate. My suggestion to have (when the underlying object is compatible, obviously) a generic mesh type, which has a relatively simple representation, but can have additional fields based on what it actually represents, has all the advantages of having a specific "plane" field, with a bunch of other advantages. As we move toward additional capabilities (e.g., world meshes like on Hololens/ML1), they can be represented similarly; future things (like segmenting moving objects out of a static world) will also fit. But for applications that DON'T know (or care) about these new types, they can fall back to just using the mesh, if they want.
You are right we need additional metadata (that's what I proposed, right?), but adding it absolutely does not put us back in the same place. If I don't know what a "segmentedObject" or (in this case) "plane" or some future "concavePlane" is, but they are all "mesh" with the required "mesh" data provided, I can use them. I'm very concerned about evolution and headway over time. Having simple convex planes with a simplistic geometric boundary as a base data type doesn't really work.
It will also be used for physics, for example. And there are already demonstrations of using workers for physics; there have been demonstrations of drawing in workers, but Spectre/Meltdown put a stop to that (by forcing vendors to eliminate the necessary shared memory, I seem to recall). And when people what to do analysis of the geometry (e.g., to detect planes or other objects), that will be very amenable to being done in workers.
Rendering is the obvious use, I agree. But limiting data use arbitrarily just because of this seems like a poor choice. Is there are good reason to do it, aside from this?
I agree that we absolutely need to know the current state of the geometry in the rAF. I was questioning the "not valid outside the rAF" point.
But, my question still stands: is there a reason to require this? Yes, if I am passing data to a worker, I very likely will copy it, but I'd actually prefer to do this in the worker, not in the main thread, for performance reasons. What we actually need is the opposite: a way to pin the object until you are done with it, and then release it so it can be reused internally. These data structures may get very big. As I walk around my house with a Hololens on, or ML1, the size of the world geometry continues to grow, and future devices will generate finer and finer meshes. We cannot design and API that requires this data be copied each frame for non-trivial use cases.
Is that the only reason? I agree that following other parts of the API is good, without a reason not to (which is why I pointed at the Anchor API explainer). But, here, as the amount of data grows, forcing pages to iterate and compare seems unwise. Again, consider ARKit and ARCore, but also Hololens and ML1, as I walk around my house, going from room to room and floor to floor, only the local parts of the data are changing. Other distant parts do not change. Having applications perform at a consistent rate as the amount of data available to them grows requires that we avoid forcing them to scan through all the data more than they have to.
That's why I pointed to what we've been using for a year with the WebXR Viewer and our older proposed version of WebXR. :) It may very well be that having a "updated" property on the objects is sufficient, especially if the objects have unique IDs associated with them (or are otherwise identifiable). It really depends on how "big" the list gets. A few dozen, or even a few hundred, is probably fine; after all, drawing them will be more expensive than peeking at a single property on each of them. I mostly want a way to know which objects have changed.
Agreed, that's probably a good compromise. |
@johnpallett @bialpio comments welcome. I am probably going to start fiddling with an implementation later today (I hope) |
This is a great discussion, thanks @blairmacintyre for the analysis. To make life easier, I'm breaking this issue into several smaller topics to make things easier to track and organize. AFAICT it looks like we have several areas of consensus, and three topics still being discussed. For those, I've created #4 #5 and #6. I've copied text over from here to those issues, so I think this issue can be closed in lieu of those more focused topics, @blairmacintyre can you confirm? |
@johnpallett can you summarize what areas of consensus you saw? :) |
@blairmacintyre apologies for the long delay in getting back to you on this. You're absolutely right that we should capture the areas of agreement in this thread. I see two specifically:
@blairmacintyre did I capture these correctly? Also, are there any other unresolved topics in this thread that we should create new issues for? If so (or if you disagree with either of the two conclusions above) feedback is very welcome. Otherwise, I'd suggest we close this issue. WDYT? |
A few high level comments, rather than doing detailed editing.
Is the intent of the having objects per "kind of world knowledge" be to allow relatively complex configuration? For example, we could eventually pass in significant configuration for things like object and image trackers/detectors? (this seems reasonable)
I'm less keen on having the planes be a field in returned value; this implies that any kind of info will be in it's own area. Why aren't planes a kind of mesh? If all things that are meshs are meshes, then an app that cares only about meshes (for occlusion, for example, or drawing pretty effects on anything known in the world) can just deal with that.
I agree with synchronous, but why are things only valid in the rAF? As your example shows, the first thing people will do is copy it. This seems massively wasteful for non-trivial amounts of world info. Why not just say it's valid through the start of the next rAF?
why is this pull instead of push? Forcing folks to poll and step through the data to see if anything has changed seems awkward. In our polyfill we used two things:
The text was updated successfully, but these errors were encountered: