Skip to content

Conversation

@paddy-exe
Copy link
Contributor

@paddy-exe paddy-exe commented May 22, 2024

This PR adds the possibility to switch between the perspective and orthographic camera projection modes. It also adds a setting in Editor/Import with Perspective being the default.

Closes godotengine/godot-proposals#6692

Showcase

Godot-PerspectiveCameraView-720p.mov

@fire
Copy link
Member

fire commented May 22, 2024

In the middle of review but wanted to mention this is a good proposal.

@akien-mga akien-mga added this to the 4.x milestone May 22, 2024
@paddy-exe paddy-exe force-pushed the perspective-advanced-import branch from 4276312 to b655dd7 Compare May 22, 2024 10:07
@paddy-exe paddy-exe changed the title Add camera perspective view mode for advanced import Add camera projection mode for advanced import May 22, 2024
@paddy-exe paddy-exe changed the title Add camera projection mode for advanced import Add camera perspective projection mode for advanced import May 22, 2024
@paddy-exe paddy-exe force-pushed the perspective-advanced-import branch from b655dd7 to 1577e5c Compare May 22, 2024 10:11
@coppolaemilio
Copy link
Member

I feel like you should be able to change the view from the popup itself. Having to close it and going to the settings for it to change it feels like it will result in the feature having 0 discoverability and ease of use.

@lyuma
Copy link
Contributor

lyuma commented May 24, 2024

The Advanced Import dialog already has a toolbar which is mostly blank. I think we should start by using that toolbar space to expose things like switching perspective

See this PR by @reduz for an example:
#86430

@paddy-exe
Copy link
Contributor Author

Thank you both👍🏻 yeah this makes sense. I will update the PR accordingly.

@paddy-exe
Copy link
Contributor Author

paddy-exe commented May 25, 2024

I updated the code to be able to change the projection inside the camera view now. Here a video showcase:

Bildschirmaufnahme.2024-05-26.um.01.10.39.mov

I would appreciate any feedback about the location of the button / if it should have an icon at all. With this implementation it would need two icons for both camera projection methods.

To Note:

  • I just used the Camera3D and CameraAttributesPhysical icon to be able to showcase the changes. These are meant only as placeholders for the final icons.

@fire
Copy link
Member

fire commented May 26, 2024

PatrickFlameLizard what are your thoughts on having two two-state toggles. We had the discussion about not using triple state toggles for the lights a few years ago. You can see in the video.

@lyuma
Copy link
Contributor

lyuma commented May 26, 2024

@fire I don't think the video shows any triple state toggle: the camera always exists, so it is just a single boolean toggle: either ortho or perspective

as far as UI, rather than a single button, we should aim to have the same menu as in the 3D scene view: Left/top/forward/bottom/etc, perspective/orthographic.

See here for the menu layout I am talking about
https://docs.godotengine.org/en/stable/tutorials/3d/introduction_to_3d.html#view-menu
button on top left of 3d view

I don't expect one PR to necessarily add all these features, but perhaps if it is its own function maybe it would be easier/ better to copy the way the 3D view does things.

@paddy-exe
Copy link
Contributor Author

@lyuma This sounds like a good idea👍🏻 that way it's already the same UX for the user. I will get on it

@Calinou
Copy link
Member

Calinou commented Oct 10, 2024

@paddy-exe Bump 🙂 Have you been able to look into updating the PR according to lyuma's feedback recently?

@paddy-exe
Copy link
Contributor Author

@paddy-exe Bump 🙂 Have you been able to look into updating the PR according to lyuma's feedback recently?

I have and I encountered a few bumps that I will need to resolve. They mostly stem from me not being familiar with that part of the codebase. I will be attending GodotCon and afterwards try to get back to it to get it in a mergeable state.

@paddy-exe paddy-exe force-pushed the perspective-advanced-import branch from 1577e5c to 40e7fe5 Compare November 3, 2024 18:44
@paddy-exe paddy-exe requested a review from a team as a code owner November 3, 2024 18:44
@paddy-exe paddy-exe force-pushed the perspective-advanced-import branch from 40e7fe5 to 49e09d5 Compare May 22, 2025 22:26
@paddy-exe paddy-exe marked this pull request as draft May 27, 2025 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a Perspective/Orthographic view toggle in the 3D Advanced Import Settings window

6 participants