You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Establish concrete definition of 1 meter as it relates to user-configurable API #450
As we begin to land changes for features such as #98 , users will begin to express configuration with metric units that should correspond to reliable positions and distances in world space, regardless of how models are framed.
Currently in 3D inline rendering, we "frame" models by establishing a virtual "room" box and scaling the room and the model with the following steps (approximately):
Determine the aspectRatio of the <model-viewer> element's bounding rect
Set the height of room to 10, and the width of room to 10 * aspectRatio in world units
Apply a scale to model so that its extents all fit inside of room
If the depth of room is greater than the depth of model, shorten the depth of room by the difference
It is important for users to be able to trust that as a model scales based on responsive layout conditions, the camera and other configurable elements that rely on world space positioning update in a predictable, desirable way.
This issue covers the work needed to review what it means to specify positions and distances in metric units, and how those values are affected as the layout of <model-viewer> changes over time (thus causing the scaling of the model itself to change over time).
The most obvious solution to this that I see, and for #197 as well, is to remove all concept of a "room", leaving model at model scale and adjusting the camera as necessary in model-based units (including near and far plane). However, that would be a significant change, so I'd like to know if I'm missing anything before I start designing that.
What was the original goal of the room? Should we try to keep the default framing identical to how it is now, or is there anything in the current version that someone isn't happy with? I'd be temped bound the model with a cylinder rather than a box, given our az-el camera.
I would say that the floor is open for a good design proposal that addresses scaling in a way that works coherently across inline and unbounded (e.g., AR placement) use cases. Naive approaches have their limitations here.
The "room" dates back to the <xr-model> prototype and was meant to serve as a framing helper. It is useful to conceptualize a room when deciding how to adjust the camera frustum for some of the immersive use cases we were exploring, but I would not characterize it as a critical element of framing for today's <model-viewer>.
Activity
elalish commentedon Apr 26, 2019
The most obvious solution to this that I see, and for #197 as well, is to remove all concept of a "room", leaving model at model scale and adjusting the camera as necessary in model-based units (including near and far plane). However, that would be a significant change, so I'd like to know if I'm missing anything before I start designing that.
What was the original goal of the room? Should we try to keep the default framing identical to how it is now, or is there anything in the current version that someone isn't happy with? I'd be temped bound the model with a cylinder rather than a box, given our az-el camera.
cdata commentedon Apr 26, 2019
I would say that the floor is open for a good design proposal that addresses scaling in a way that works coherently across inline and unbounded (e.g., AR placement) use cases. Naive approaches have their limitations here.
The "room" dates back to the
<xr-model>prototype and was meant to serve as a framing helper. It is useful to conceptualize a room when deciding how to adjust the camera frustum for some of the immersive use cases we were exploring, but I would not characterize it as a critical element of framing for today's<model-viewer>.