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

Allow using a custom Viewport as a basis for Movie Maker mode #5809

Closed
Bethleem opened this issue Nov 18, 2022 · 2 comments
Closed

Allow using a custom Viewport as a basis for Movie Maker mode #5809

Bethleem opened this issue Nov 18, 2022 · 2 comments

Comments

@Bethleem
Copy link

Describe the project you are working on

Video capture of cinematics.

Describe the problem or limitation you are having in your project

The max screen resolution is lower than the optimal target resolution.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

In 3.5 branch I made an animation frame capturer that, in order to avoide the screen resolution limitations, rendered the contet into a customizable viewport anf then capture this viewport data and save it as png files.
I tried it in godot 4 and just had to make some adjustments for getting the viewport data and save it to disk but it still works. So, my suggestion is, can you made movie-writer to render into a customizable viewport than can be sized bigger than the screen resolution? I mean, I can do it manually frame by frame so it would be cool to have it implemented in the movie-writer.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Movie-writer will create a size customizable viewport and the render the scene in it, so screen resolution limitations will be avoided.
For the frame capture it will use get_texture() in the SubViewport, then convert into Image with get_image() and saved to disk with save_png(), or passed to the video muxer.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Yes, it works easily with png format, but will be cool to have it implemented to work with video in movie-writer.

Is there a reason why this should be core and not an add-on in the asset library?

Well, if movie-writer is core, then this should be core because is an enhacement.

@Calinou
Copy link
Member

Calinou commented Nov 18, 2022

Related to #5790.

Note that you can already resize the window to be larger than the screen, but this requires third-party tools that may not be readily available on Windows or macOS.

Please double-check first if using the viewport stretch mode and setting the viewport_width and viewport_height accordingly in the Project Settings does the trick 🙂

If that doesn't work, then a project setting could be added to allow you to specify a custom node path to use as the root viewport: https://github.com/godotengine/godot/blob/d93bec61c3e8f5e047f12ae3ce6a68fbc7a37273/main/main.cpp#L3239-L3244

@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2022
@Calinou Calinou reopened this Nov 18, 2022
@Calinou Calinou changed the title Godot 4 screen limit on movie-writer Allow using a custom Viewport as a basis for Movie Maker mode Nov 18, 2022
@Calinou
Copy link
Member

Calinou commented Nov 19, 2022

It turns out this is already feasible; it's just not documented. I've opened a pull request to document this: godotengine/godot-docs#6398

Closing, as the feature is already implemented so to speak.

Testing project: test_movie_maker_viewport.zip

@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale Nov 19, 2022
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

2 participants