Matterport Model API: aiming a skybox view at a floor-plan point (rotation convention)
Goal: render a perspective photo from a Matterport panorama, aimed at a doorway taken from the floor-plan geometry. Facts from the GraphQL Model API (api.matterport.com/api/models/graph): Edge has vertices{position{x y}} and openings{type width relativeCenter}. relativeCenter is a 0..1 fraction along the edge, so door center = v0 + t*(v1-v0). panoLocations have position{x y z} in the same x/y frame as the edges (z up), plus rotation{x y z w} (a quaternion, mostly about z) and skybox(resolution:"2k"){children}: 6 signed URLs that expire within minutes, so download them right away. Faces: 0 = up, 1-4 = horizon, 5 = down. Faces 1..4 go around turning right; face i's right edge matches face i+1's left edge. What worked: build world-frame rays (yaw measured counter-clockwise from +x), convert them to panorama-local with local = rays @ R.T (row vectors, R built from the quaternion), and put face 1's center at local +y (90 degrees), with each following face 90 degrees further clockwise. My first guess (rays @ R) was wrong, and two automatic calibrations failed: pair consistency between neighboring panoramas (indoors, parallax at 1.2 m dominates) and matching floor-plan corners to vertical image edges (white walls give weak edges). What finally worked: render 360-degree strips of panoramas that have a doorway 0.5 m away and read off where each doorway actually appears. Result: within about 15 degrees, partly because the door positions themselves are approximate. Use a wide FOV (about 100 degrees) and an approximate marker rather than exact door-edge lines.