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

Fill animation discrepency with OpenGL #4081

Open
andreypluzhnik opened this issue Dec 31, 2024 · 0 comments
Open

Fill animation discrepency with OpenGL #4081

andreypluzhnik opened this issue Dec 31, 2024 · 0 comments

Comments

@andreypluzhnik
Copy link

Description of bug / unexpected behavior

The fill animation is not functioning properly in the Opengl renderer. It appears that fill is applied only on the last frame of the animation as shown in the animation below:
CircleTriangleSquareScene_Manim_opengl

Expected behavior

I would have expected a functionality similar to Cairo where the fill is visible during the course of the animation:
CircleTriangleSquareScene_Manim

How to reproduce the issue

Code for reproducing the problem
class CircleTriangleSquareScene(Scene):
    def construct(self):
        circle = Circle(radius = 1) 
        circle.set_fill(RED, opacity=0.5) 
        circle.set_stroke(RED)
        
        square = Square(side_length = 2, fill_opacity = 1)
        square.set_fill(BLUE, opacity = 0.5)
        square.set_stroke(BLUE)

        triangle = Triangle()
        triangle.set_fill(GREEN, opacity = 0.5)
        triangle.set_stroke(GREEN)
        
        circle.shift([-2,0,0])
        square.shift([2,0,0])
  
        self.play(Create(circle, run_time = 2))
        self.play(Create(triangle, run_time = 2))
        self.play(Create(square, run_time = 2)) 
        
        self.wait(0.1)

Logs

Terminal output Debug info seems to indicate that certain shaders aren't present.
manim --renderer=opengl -pqm scene.py CircleTriangleSquareScene --format=gif --verbosity=DEBUG
Manim Community v0.18.1

[12/30/24 20:04:06] DEBUG    Hashing ...                                                                               hashing.py:352
                    DEBUG    Hashing done in 0.006014 s.                                                               hashing.py:364
                    DEBUG    Hash generated :  3123472686_3371292183_223132457                                         hashing.py:367
                    DEBUG    List of the first few animation hashes of the scene: ['3123472686_3371292183_223132457']   caching.py:62
[12/30/24 20:04:07] INFO     Animation 0 : Partial movie file written in                                     scene_file_writer.py:580
                             '/home/andrey/Desktop/Manim/media/videos/scene/720p30/partial_movie_files/Circl                         
                             eTriangleSquareScene/3123472686_3371292183_223132457.mp4'                                               
                    DEBUG    Hashing ...                                                                               hashing.py:352
                    DEBUG    Hashing done in 0.008969 s.                                                               hashing.py:364
                    DEBUG    Hash generated :  1937375861_2454640191_1618962457                                        hashing.py:367
                    DEBUG    List of the first few animation hashes of the scene: ['3123472686_3371292183_223132457',   caching.py:62
                             '1937375861_2454640191_1618962457']                                                                     
[12/30/24 20:04:08] INFO     Animation 1 : Partial movie file written in                                     scene_file_writer.py:580
                             '/home/andrey/Desktop/Manim/media/videos/scene/720p30/partial_movie_files/Circl                         
                             eTriangleSquareScene/1937375861_2454640191_1618962457.mp4'                                              
                    DEBUG    Hashing ...                                                                               hashing.py:352
                    DEBUG    Hashing done in 0.012720 s.                                                               hashing.py:364
                    DEBUG    Hash generated :  1937375861_2625952423_1917516738                                        hashing.py:367
                    DEBUG    List of the first few animation hashes of the scene: ['3123472686_3371292183_223132457',   caching.py:62
                             '1937375861_2454640191_1618962457', '1937375861_2625952423_1917516738']                                 
[12/30/24 20:04:09] INFO     Animation 2 : Partial movie file written in                                     scene_file_writer.py:580
                             '/home/andrey/Desktop/Manim/media/videos/scene/720p30/partial_movie_files/Circl                         
                             eTriangleSquareScene/1937375861_2625952423_1917516738.mp4'                                              
                    DEBUG    Animation with empty mobject                                                            animation.py:190
                    DEBUG    Hashing ...                                                                               hashing.py:352
                    DEBUG    Hashing done in 0.013685 s.                                                               hashing.py:364
                    DEBUG    Hash generated :  1937375861_3161721241_2552358008                                        hashing.py:367
                    DEBUG    List of the first few animation hashes of the scene: ['3123472686_3371292183_223132457',   caching.py:62
                             '1937375861_2454640191_1618962457', '1937375861_2625952423_1917516738',                                 
                             '1937375861_3161721241_2552358008']                                                                     
                    DEBUG    /home/andrey/Desktop/Manim/manim/manim/renderer/shaders/vert.glsl does not exist.   shader_wrapper.py:35
                    DEBUG    /vert.glsl does not exist.                                                          shader_wrapper.py:35
                    DEBUG    /home/andrey/Desktop/Manim/manim/manim/renderer/shaders/geom.glsl does not exist.   shader_wrapper.py:35
                    DEBUG    /geom.glsl does not exist.                                                          shader_wrapper.py:35
                    DEBUG    /home/andrey/Desktop/Manim/manim/manim/renderer/shaders/frag.glsl does not exist.   shader_wrapper.py:35
                    DEBUG    /frag.glsl does not exist.                                                          shader_wrapper.py:35
                    INFO     Animation 3 : Partial movie file written in                                     scene_file_writer.py:580
                             '/home/andrey/Desktop/Manim/media/videos/scene/720p30/partial_movie_files/Circl                         
                             eTriangleSquareScene/1937375861_3161721241_2552358008.mp4'                                              
                    INFO     Combining to Movie file.                                                        scene_file_writer.py:731
                    DEBUG    Partial movie files to combine (4 files):                                       scene_file_writer.py:614
                             ['/home/andrey/Desktop/Manim/media/videos/scene/720p30/partial_movie_files/Circ                         
                             leTriangleSquareScene/3123472686_3371292183_223132457.mp4',                                             
                             '/home/andrey/Desktop/Manim/media/videos/scene/720p30/partial_movie_files/Circl                         
                             eTriangleSquareScene/1937375861_2454640191_1618962457.mp4',                                             
                             '/home/andrey/Desktop/Manim/media/videos/scene/720p30/partial_movie_files/Circl                         
                             eTriangleSquareScene/1937375861_2625952423_1917516738.mp4',                                             
                             '/home/andrey/Desktop/Manim/media/videos/scene/720p30/partial_movie_files/Circl                         
                             eTriangleSquareScene/1937375861_3161721241_2552358008.mp4']                                             
[12/30/24 20:04:12] INFO                                                                                     scene_file_writer.py:878
                             File ready at                                                                                           
                             '/home/andrey/Desktop/Manim/media/videos/scene/720p30/CircleTriangleSquareScene                         
                             _ManimCE_v0.18.1.gif'                                                                                   
                                                                                                                                     
                    INFO     Rendered CircleTriangleSquareScene                                                          scene.py:255
                             Played 4 animations                                                                                     
                    INFO     Previewed File at:                                                                       file_ops.py:230
                             '/home/andrey/Desktop/Manim/media/videos/scene/720p30/CircleTriangleSquareScene_ManimCE_                
                             v0.18.1.gif'                                                                                            

System specifications

System Details
- OS: Ubuntu 22.04
- Python version: python 3.10.12
- Installed modules: manim 0.18.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant