Preview of a Scene by showing frames as thumbnails images. #2779
Replies: 4 comments
-
Sounds like a great idea to me |
Beta Was this translation helpful? Give feedback.
-
Okay, here is a first idea to do so:
and then adding the preview scene like this: class PreviewWindows(Group):
def __init__(self):
Group.__init__(self)
height= 9/4
width = 16/4
frames = [Rectangle(height=height,width=width).set_color(BLUE) for i in range(0,6)]
a=VGroup(*frames[0:3]).set_x(0).arrange(buff=0.5).shift(UP)
b=VGroup(*frames[3:6]).set_x(0).arrange(buff=0.5).shift(2 * DOWN)
self.add(a,b)
imgs= Group()
total_frames= 60
previews= len(frames)
for i, frame in enumerate(frames):
position = int(total_frames/previews*i)
img= ImageMobject(f"media/images/first_point/ExampleScene{position}.png").move_to(frame).scale(0.42)
imgs.add(img)
self.add(imgs)
class FameIdeaNo1(Scene):
def construct(self):
pw= PreviewWindows()
self.add(pw) Maybe we should wait with this feature until the click pr is merged: #1013 |
Beta Was this translation helpful? Give feedback.
-
Thanks for the consideration, but the logic for the flag can be easily swapped into #1013 later so if someone wants to work on this before that's merged/closed, feel free. |
Beta Was this translation helpful? Give feedback.
-
That's a nice idea, I like it. |
Beta Was this translation helpful? Give feedback.
-
For building up complex scenes, It might be useful to not render the whole video but to only have a preview at some frames of it.
To give an example, this Video:
39944e6eec0105b537e1e507e69bfd19580b1158.mp4
Could also be displayed as this image:
I can think of a lot of use cases where this could be helpful. Also with this method, we could have video-tests without building a video-test infrastructure.
This could be implemented as a new flag, e.g.
-thumbnails
Beta Was this translation helpful? Give feedback.
All reactions