3b1b / manim

Animation engine for explanatory math videos
MIT License
70.39k stars 6.19k forks source link

lines and graphs are not shown! #1462

Open Shafagh777 opened 3 years ago

Shafagh777 commented 3 years ago

I am running the following codes and it seems manim has an issue with lines and graphs illustrations.

class CreateLine(Scene):
    def construct(self):
         start=(0,0,0)
         end=(4,0,0)
         line=Line(start, end)
         self.play(ShowCreation(line))
class PlotSin(Scene):
    def construct(self):
        axes = Axes((-3, 10), (-1, 8),
                 axis_config={
                     "stroke_color": GREY_A,
                     "stroke_width": 2,
                     "fill_opacity": 1,
                }
        )
        axes.add_coordinate_labels()

        self.play(Write(axes, lag_ratio=0.01, run_time=1))

        # Axes.get_graph will return the graph of a function
        sin_graph = axes.get_graph(
            lambda x: 2 * math.sin(x),
            color=BLUE,
        )

        sin_label = axes.get_graph_label(sin_graph, "\\sin(x)")

        self.play(
            ShowCreation(sin_graph),
            FadeIn(sin_label, RIGHT),
        )

I should mention that I have OpenGL V4.6 installed on my laptop and my graphic renderer is Intel(R) UHD.

fabriciosb commented 3 years ago

I bet this is the same reason as #1456 issue

fabriciosb commented 3 years ago

Which is also the same as #1455

rodriuru commented 3 years ago

I'm having the same issue. But i realize that the problem only happen in Windows. Running on Anaconda or Windows directly. In linux there is no problem.

fabriciosb commented 3 years ago

Check this related issue on the CE: https://github.com/ManimCommunity/manim/issues/1240 It happens the same to me with both 3b1b edition and CE edition. For me it is a problem with Intel GPU. Can you check if on linux you are using Intel or another graphics cards?

Darylgolden commented 3 years ago

I'm having the same issue. But i realize that the problem only happen in Windows. Running on Anaconda or Windows directly. In linux there is no problem.

Can you try python -m moderngl in both cases? Can you try installing mesa to see if it makes it work on Windows?

rodriuru commented 3 years ago

Check this related issue on the CE: ManimCommunity/manim#1240 It happens the same to me with both 3b1b edition and CE edition. For me it is a problem with Intel GPU. Can you check if on linux you are using Intel or another graphics cards?

I'm using Windows and Fedora on the same computer. GPU: Intel UHD Graphics 620

And i've installed manim using pip in both systems

rodriuru commented 3 years ago

I'm having the same issue. But i realize that the problem only happen in Windows. Running on Anaconda or Windows directly. In linux there is no problem.

Can you try python -m moderngl in both cases? Can you try installing mesa to see if it makes it work on Windows?

moderngl output:

On windows

moderngl 5.6.4

vendor: Intel renderer: Intel(R) UHD Graphics 620 version: 3.3.0 - Build 27.20.100.9466 python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] platform: win32 code: 330

On linux moderngl 5.6.4

vendor: Intel renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2) version: 4.6 (Core Profile) Mesa 20.3.5 python: 3.9.2 (default, Feb 20 2021, 00:00:00) [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] platform: linux code: 460

MESA is already installed on windows. i tried to reinstall, but dont works anyway

Darylgolden commented 3 years ago

I'm having the same issue. But i realize that the problem only happen in Windows. Running on Anaconda or Windows directly. In linux there is no problem.

Can you try python -m moderngl in both cases? Can you try installing mesa to see if it makes it work on Windows?

moderngl output:

On windows

moderngl 5.6.4

vendor: Intel

renderer: Intel(R) UHD Graphics 620 version: 3.3.0 - Build 27.20.100.9466 python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] platform: win32 code: 330

On linux

moderngl 5.6.4

vendor: Intel

renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2) version: 4.6 (Core Profile) Mesa 20.3.5 python: 3.9.2 (default, Feb 20 2021, 00:00:00) [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] platform: linux code: 460

MESA is already installed on windows. i tried to reinstall, but dont works anyway

MESA doesn't seem to be correctly installed on Windows.

niedong commented 3 years ago

Having the same issue...

moderngl 5.6.4 vendor: Intel renderer: Intel(R) HD Graphics 620 version: 3.3.0 - Build 27.20.100.8854 python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] platform: win32 code: 330

niedong commented 3 years ago

Having the same issue...

moderngl 5.6.4 vendor: Intel renderer: Intel(R) HD Graphics 620 version: 3.3.0 - Build 27.20.100.8854 python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] platform: win32 code: 330

Lines, circle, square, etc. Can't be shown on the screen

niedong commented 3 years ago

Hi, I've solved this problem. Please change your graphics processor. I changed my graphics processor and everything becomes fine.

vendor: NVIDIA Corporation renderer: GeForce 940MX/PCIe/SSE2 version: 3.3.0 NVIDIA 461.40 python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] platform: win32 code: 330

enga018 commented 3 years ago

Having the same issue... moderngl 5.6.4 vendor: Intel renderer: Intel(R) HD Graphics 620 version: 3.3.0 - Build 27.20.100.8854 python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] platform: win32 code: 330

Lines, circle, square, etc. Can't be shown on the screen

same here.

enga018 commented 3 years ago

Hi, I've solved this problem. Please change your graphics processor. I changed my graphics processor and everything becomes fine.

vendor: NVIDIA Corporation renderer: GeForce 940MX/PCIe/SSE2 version: 3.3.0 NVIDIA 461.40 python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] platform: win32 code: 330

is this your new processor or old one??

niedong commented 3 years ago

Hi, I've solved this problem. Please change your graphics processor. I changed my graphics processor and everything becomes fine. vendor: NVIDIA Corporation renderer: GeForce 940MX/PCIe/SSE2 version: 3.3.0 NVIDIA 461.40 python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] platform: win32 code: 330

is this your new processor or old one??

This is my new one. I've written my solution here. Please check it out.

enga018 commented 3 years ago

Hi, I've solved this problem. Please change your graphics processor. I changed my graphics processor and everything becomes fine. vendor: NVIDIA Corporation renderer: GeForce 940MX/PCIe/SSE2 version: 3.3.0 NVIDIA 461.40 python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] platform: win32 code: 330

is this your new processor or old one??

This is my new one. I've written my solution here. Please check it out.

I do most of my work on my laptop.Unfortunately, my laptop doesnt come with dedicated Graphics and I guess I have to change my system. 🥺

fabriciosb commented 3 years ago

Hi, I've solved this problem. Please change your graphics processor. I changed my graphics processor and everything becomes fine. vendor: NVIDIA Corporation renderer: GeForce 940MX/PCIe/SSE2 version: 3.3.0 NVIDIA 461.40 python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] platform: win32 code: 330

is this your new processor or old one??

This is my new one. I've written my solution here. Please check it out.

I do most of my work on my laptop.Unfortunately, my laptop doesnt come with dedicated Graphics and I guess I have to change my system. 🥺

You can try the community edition of manin, which does not use opengl yet: https://docs.manim.community/en/stable/ You can do mostly the same things, but the code you will write will be slight different (not compatible, overall, with 3b1b code).

enga018 commented 3 years ago

Hi, I've solved this problem. Please change your graphics processor. I changed my graphics processor and everything becomes fine. vendor: NVIDIA Corporation renderer: GeForce 940MX/PCIe/SSE2 version: 3.3.0 NVIDIA 461.40 python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] platform: win32 code: 330

is this your new processor or old one??

This is my new one. I've written my solution here. Please check it out.

I do most of my work on my laptop.Unfortunately, my laptop doesnt come with dedicated Graphics and I guess I have to change my system. 🥺

You can try the community edition of manin, which does not use opengl yet: https://docs.manim.community/en/stable/ You can do mostly the same things, but the code you will write will be slight different (not compatible, overall, with 3b1b code).

I did it and only line 1-16 are rendered. there is an error.

levyliao commented 2 years ago

I'm having the same issue. But i realize that the problem only happen in Windows. Running on Anaconda or Windows directly. In linux there is no problem.

Can you try python -m moderngl in both cases? Can you try installing mesa to see if it makes it work on Windows?

I resolved this issue by installing mesa! thanks a lot