Skip to content
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

DirectionTransform #2268

Open
tomcrane opened this issue Jan 30, 2024 · 7 comments
Open

DirectionTransform #2268

tomcrane opened this issue Jan 30, 2024 · 7 comments
Labels
3d presentation Ready-for-Eds Editorial changes ready for Editorial review

Comments

@tomcrane
Copy link
Contributor

tomcrane commented Jan 30, 2024

Lights (#2258) and cameras (#2257) both require a DirectionTransform resource, and we can use this issue to develop that across both.

From those two issues:

[A DirectionTransform specifies] orientation/directional-facing for an element that needs such facing, like a light or a camera. [...] To specify orientiation, DirectionTransform should take either a unit-length vector or a Scene reference target combined with a PointSelector. In the latter case, this PointSelector location specifies the "look-at" target of the light [or camera], and the orientation would have to be calculated from a combination of the light [or camera] position within the scene and the position of the look-at target.

(Julie's note: should cameras be required to specify a Scene reference and PointSelector and not be allowed to use a vector orientation?)

@tomcrane
Copy link
Contributor Author

... either a unit-length vector or a Scene reference target combined with a PointSelector [the latter] specifies the "look-at" target

Could a DirectionTransform also use the id of another annotation as the "look-at", for ease of use? "Camera, look at the spaceman."

@tomcrane
Copy link
Contributor Author

tomcrane commented Jan 30, 2024

      "body": {
        "type": "[Camera or Light]",
        // other properties of camera or light
     
        "transforms": [
            {
                 "type": "DirectionTransform",
                  // props to be explored
            }
         ]
     }

Unit vector

            {
                 "type": "DirectionTransform",
                  // what would the unit vector look like here?
            }

PointSelector

            {
                 "type": "DirectionTransform",
                  // props to be explored
                  // a lot like *target*
                  // ??
                  ....
                          "type": "SpecificResource",
                          "source": [
                              {
                                  "id": "https://example.org/iiif/scene1/page/p1/1",
                                  "type": "Scene"
                              }
                          ],
                          "selector": [
                              {
                                  "type": "PointSelector",
                                  "x": 100.0,
                                  "y": 100.0,
                                  "z": 0.0
                              }
                          ]
            }

"look At"

            {
                 "type": "DirectionTransform",
                  // ??? This is the anno whose body is the spaceman model
                        {
                          "id": "https://example.org/iiif/3d/anno1",
                          "type": "Annotation"
                        },
            }

@azaroth42
Copy link
Member

Seems like a special case of RotationTransform to me. Instead of rotating a fixed amount relative to a starting position, rotate an arbitrary amount relative to a target point, where the target is either an explicit x,y,z point, or the point at the origin of a specified content resource.

@tomcrane
Copy link
Contributor Author

Consider use cases for walking through multiple points in a story within a Scene -successive cameras looking at successive labels - helps if you can lookAt the label annotation by its URI.

@azaroth42
Copy link
Member

Why not:

{
  "type": "RotationTransform",
  "lookAt": {
    // point or model 
  }
}

@azaroth42
Copy link
Member

Use case for vector: Directional Light only has a vector, but no position as it's infinitely far away and infinitely large

@azaroth42
Copy link
Member

Resolution from 2024-01-31 -- lookAt property, not a DirectionTransform. No need for a DirectionTransform. Issue is readyForEds with respect to lookAt.

@azaroth42 azaroth42 added the Ready-for-Eds Editorial changes ready for Editorial review label Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3d presentation Ready-for-Eds Editorial changes ready for Editorial review
Projects
None yet
Development

No branches or pull requests

2 participants