manim icon indicating copy to clipboard operation
manim copied to clipboard

lines and graphs are not shown!

Open Shafagh777 opened this issue 3 years ago • 18 comments

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.

Shafagh777 avatar Apr 07 '21 08:04 Shafagh777

I bet this is the same reason as #1456 issue

fabriciosb avatar Apr 14 '21 11:04 fabriciosb

Which is also the same as #1455

fabriciosb avatar Apr 14 '21 11:04 fabriciosb

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.

rodriuru avatar Apr 20 '21 13:04 rodriuru

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?

fabriciosb avatar Apr 20 '21 13:04 fabriciosb

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?

Darylgolden avatar Apr 21 '21 02:04 Darylgolden

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 avatar Apr 21 '21 19:04 rodriuru

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

rodriuru avatar Apr 21 '21 19:04 rodriuru

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.

Darylgolden avatar Jun 02 '21 23:06 Darylgolden

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 avatar Jun 16 '21 13:06 niedong

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 avatar Jun 16 '21 13:06 niedong

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

niedong avatar Jun 16 '21 13:06 niedong

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 avatar Jun 26 '21 11:06 enga018

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??

enga018 avatar Jun 26 '21 11:06 enga018

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.

niedong avatar Jun 26 '21 12:06 niedong

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. 🥺

enga018 avatar Jun 26 '21 18:06 enga018

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).

fabriciosb avatar Jun 26 '21 20:06 fabriciosb

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.

enga018 avatar Jun 27 '21 08:06 enga018

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

levyliao avatar Apr 03 '22 04:04 levyliao