loopier / animatron

Animatron for Godot 4.x <
15 stars 1 forks source link

Feature Request: Implement Off-Screen Rendering #49

Open cappelnord opened 1 month ago

cappelnord commented 1 month ago

Implement a way to decouple actors from being rendered to the main screen by being able to create SubViewport instances at arbitrary, move actors from/to these instances and set viewports as texture for actors to move them around/place them.

Some functionality that would be needed (please find better names for things)

//  creates the viewport at set resolution
/create/viewport $viewport_name:s $width:i $height:i 

//  moves an already existing actor the the viewport
/set/viewport $actor_name:s $viewport_name:s 

//  create an actor (on the main viewport) that displays a sub viewport
/create $actor_name:s $viewport_name:s

Use Cases

Sharing Content of a Viewport via Spout/Syphon/NDI

/spout/send $viewport_name $spout_name

Creating Cool Mosaic Effects

(imagine drawing some pattern into a 100x100 px viewport with some images cropped on the edges and then again drawing a pattern of this viewport)

Use Animatron for Print Graphics

Create a viewport of 16000x8000px and display it as a smaller preview in a window. Implement a command to save the content of the viewport as image (if not already implemented)

/saveFrame $viewport_name:s $path

Post-Processing Effects

In case that at a later point materials/shaders are implemented a post-processing effect can be implemented:

Video-Feedback

(I am not sure if this would work; potentially some ping-pong buffer would make more sense)

... many other cool things!