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

Clarify transform applied to camera and light in 3D draft #2288

Open
vincentmarchetti opened this issue Apr 17, 2024 · 2 comments
Open

Clarify transform applied to camera and light in 3D draft #2288

vincentmarchetti opened this issue Apr 17, 2024 · 2 comments

Comments

@vincentmarchetti
Copy link

Propose that for annotations that add camera to a scene (reference https://github.com/IIIF/3d/blob/main/temp-draft-4.md#cameras ) that when the annotation body is a SpecificResource, with transform that sets the camera direction, the transform be limited to RotateTransform resources only. The annotation target can, with a PointSelector wrapped in a SpecificResource, be used to locate the PerspectiveCamera ; the OrthographicCamera does not have a location.

Similarly, for the annotations that add a light that has a directional quality, SpotLight and Directionallight, ( https://github.com/IIIF/3d/blob/main/temp-draft-4.md#lights ) a SpecificResource that defines direction contain only RotateTransform resources, and a Spotlight position determined entirely by the PointSelector applied in the annotation.target resource

@JulieWinchester
Copy link
Contributor

JulieWinchester commented Apr 17, 2024

I think it makes sense to restrict cameras and some lights to certain applicable subsets of transforms, and specifically for cameras, I agree with the idea of restricting them to RotateTransform only.

Orthographic cameras should have a position location, though, with that position affecting level of zoom, what can be seen through the viewport, etc.

https://upload.wikimedia.org/wikipedia/commons/c/ce/Orthographic_view_frustum.png

I think this image shows how I'm thinking about orthographic camera position. If the camera position is at the origin in the image, n (near distance) away from the near plane of the frustum, then moving that position away from the origin will affect what is visible within the frustum, with movement along X or Y creating "pans" and movement along Z creating "zoom".

@vincentmarchetti
Copy link
Author

vincentmarchetti commented Apr 25, 2024

I agree with the reply that a position is required to specify the viewport of an orthographic camera, and with the explanation that X and Y changes produce pan effects. I don' think orthographic camera properly implemented would exhibit the zoom effect; the zoom, or an object taking up more of the viewport as you approach it , is a perspective effect and orthographic cameras are used when perspective 'distortions' are not desirable.

I propose that the position of an orthographic camera be specified by a Specific Resource & PositionSelector on the annotation target, and the direction of the light be determined by RotateTransform in the SpecificResource at the annotation body. I also propose that the API document require that for an orthographic camera there is no concept of being 'behind the camera' regardless of its position.

On reviewing this comment and the figure https://upload.wikimedia.org/wikipedia/commons/c/ce/Orthographic_view_frustum.png I realize that the figure implies there should be a concept of "behind the camera". So, I realize this is a topic for discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants