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

[BUG] Manim Slides Showing Black Screen Only #402

Closed
NikoMolecule opened this issue Apr 6, 2024 · 7 comments
Closed

[BUG] Manim Slides Showing Black Screen Only #402

NikoMolecule opened this issue Apr 6, 2024 · 7 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists present Related to the main "present" feature qt Related to Qt (or its Python binding)

Comments

@NikoMolecule
Copy link

Please explain the issue you're experiencing (with as much detail as possible):

Hello, so i downloaded qt bindings and everything and manim_slides finnaly started running but i ran into the problem, where manim_slides only show black slides and nothing more. can anyone help me out to fix this problem?

this is code:

from manim import *
from manim_slides import Slide
import numpy as np

class rectangle(Slide):
    def construct(self):
        box1 = Rectangle(stroke_color = RED_C, stroke_opacity = 0.7, fill_color = RED_B, fill_opacity=0.5, height = 1, width = 2).shift(3 * RIGHT)
        name1 = Tex("Discriminator D(z)", font_size = 18).move_to(box1.get_center())

        box2 = Rectangle(stroke_color = GREEN_C, stroke_opacity = 0.7, fill_color = GREEN_B, fill_opacity=0.5, height = 1, width = 2).shift(2.5 * DOWN + 3.75 * LEFT)
        name2 = Tex("Generator G(z)", font_size = 18).move_to(box2.get_center())

        box3 = Rectangle(stroke_color = GREY_A, stroke_opacity = 0.7, fill_color = BLACK, fill_opacity=0, height = 2, width = 2).shift(2.5 * UP + 1 * LEFT)
        name3 = Tex("Real Images", font_size = 18).move_to(box3.get_top())

        image1r = ImageMobject("../manim/logo/10.jpg").scale(0.25).move_to(box3.get_center()).shift(0.5 * UP + 0.5 * LEFT)
        image2r = ImageMobject("../manim/logo/1012.jpg").scale(0.25).move_to(box3.get_center()).shift(0.5 * UP + 0.5 * RIGHT)
        image3r = ImageMobject("../manim/logo/1022.jpg").scale(0.25).move_to(box3.get_center()).shift(0.5 * DOWN + 0.5 * LEFT)
        image4r = ImageMobject("../manim/logo/1032.jpg").scale(0.25).move_to(box3.get_center()).shift(0.5 * DOWN + 0.5 * RIGHT)

        box4 = Rectangle(stroke_color = GREY_A, stroke_opacity = 0.7, fill_color = BLACK, fill_opacity=0.5, height = 2, width = 1).shift(2.5 * DOWN + 5.6 * LEFT)
        name4 = Text("\n 0.000 \n -0.234 \n -3.456 \n 1.293 \n 0.015 \n ... \n -1.102 \n 0.998 \n -0.122", font_size = 18).move_to(box4.get_center())

        brace1 = Brace(box4, LEFT)
        name5 = Tex("100", font_size = 18).next_to(brace1, LEFT)
        name6 = Tex("Random Noise", font_size = 18).next_to(box4, 0.25 * UP)

        box7 = Rectangle(stroke_color = GREY_A, stroke_opacity = 0.7, fill_color = BLACK, fill_opacity=0, height = 2, width = 2).shift(2.5 * DOWN + 1 * LEFT)
        name7 = Tex("Fake Images", font_size = 18).move_to(box7.get_bottom())

        image1f = ImageMobject("../manim/logo/generated_plot_epoch-960.png").move_to(box7.get_center()).shift(0.5 * UP + 0.5 * LEFT)
        image2f = ImageMobject("../manim/logo/generated_plot_epoch-961.png").move_to(box7.get_center()).shift(0.5 * UP + 0.5 * RIGHT)
        image3f = ImageMobject("../manim/logo/generated_plot_epoch-962.png").move_to(box7.get_center()).shift(0.5 * DOWN + 0.5 * LEFT)
        image4f = ImageMobject("../manim/logo/generated_plot_epoch-963.png").move_to(box7.get_center()).shift(0.5 * DOWN + 0.5 * RIGHT)

        arrow_1 = Arrow(start = box3.get_right(), end = box1.get_left(), color = WHITE)
        arrow_2 = Arrow(start = box7.get_right(), end = box1.get_left(), color = WHITE)
        arrow_3 = Arrow(start = box2.get_right(), end = box7.get_left(), color = WHITE)
        arrow_4 = Arrow(start = box4.get_right(), end = box2.get_left(), color = WHITE)


        self.play(Create(box4), Create(name4), Create(brace1), Create(name5), Create(name6))
        self.next_slide()

        self.play(Create(arrow_4), Create(box2), Create(name2))
        self.next_slide()

        self.play(Create(arrow_3), Create(box7), Create(name7), FadeIn(image1f), FadeIn(image2f),FadeIn(image3f), FadeIn(image4f))
        self.play(Create(box3), Create(name3), FadeIn(image1r), FadeIn(image2r), FadeIn(image3r), FadeIn(image4r))
        self.next_slide()

        self.play(Create(arrow_1), Create(arrow_2), Create(box1), Create(name1))
        self.wait()

and this is the message before running manim_slides

[04/05/24 22:18:52] WARNING  You are using API = 'pyqt6', QTVERSION = '6.6.1', but we recommend installing 'PySide6==6.5.2', mainly to avoid flashing        __init.py:23
                             screens between slides, see issue https://github.com/jeertmans/manim-slides/issues/293. You can do so with pip install
                             'manim-slides[pyside6]'.
qt.qpa.window: QtWindows::DpiAwareness::PerMonitorVersion2 is not supported by current system.
QWindowsVistaStylePrivate: Load OpenThemeDataForDpi in uxtheme.dll failed
No QtMultimedia backends found. Only QMediaDevices, QAudioDevice, QSoundEffect, QAudioSink, and QAudioSource are available.
Failed to create QVideoSink "Not available"
Failed to initialize QMediaPlayer "Not available"
Failed to create QVideoSink "Not available"
Failed to create QVideoSink "Not available"
Failed to initialize QMediaPlayer "Not available"
@NikoMolecule NikoMolecule added the question Further information is requested label Apr 6, 2024
@jeertmans jeertmans added bug Something isn't working and removed question Further information is requested labels Apr 8, 2024
@jeertmans jeertmans changed the title Support: Manim Slides Showing Black Screen Only [BUG] Manim Slides Showing Black Screen Only Apr 8, 2024
@jeertmans jeertmans added present Related to the main "present" feature qt Related to Qt (or its Python binding) labels Apr 8, 2024
@jeertmans
Copy link
Owner

Hello @NikoMolecule, can you check with a smaller code, like this one from example.py:

from manim import *
from manim_slides import Slide, ThreeDSlide


class BasicExample(Slide):
    def construct(self):
        circle = Circle(radius=3, color=BLUE)
        dot = Dot()

        self.play(GrowFromCenter(circle))

        self.next_slide(loop=True)
        self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear)
        self.next_slide()

        self.play(dot.animate.move_to(ORIGIN))

Then:

manim-slides render yourfile.py BasicExample

And:

manim-slides -v DEBUG BasicExample

@NikoMolecule
Copy link
Author

@jeertmans it outputed this: "python -m manim_slides, version 5.1.3"

@jeertmans
Copy link
Owner

Oops, sorry, this was manim-slides BasicExample -v DEBUG.

@NikoMolecule
Copy link
Author

@jeertmans
image

@jeertmans
Copy link
Owner

This is likely similar to #315 (or even #377). Can you try manim-slides BasicExample --hide-info-window?

@NikoMolecule
Copy link
Author

@jeertmans thx so much <33

@jeertmans
Copy link
Owner

Happy it solved your problem, and I am sorry for all the troubles with Windows!

@jeertmans jeertmans added the duplicate This issue or pull request already exists label Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists present Related to the main "present" feature qt Related to Qt (or its Python binding)
Projects
None yet
Development

No branches or pull requests

2 participants