ManimCommunity / ManimCommunity/manim

Issue rendering lines with OpenGL renderer

Open
#3,335 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue:bug opengl
Dominant language
Python
Stars
40.9k
Forks
3.1k
Avg merge
3d 12h
Merged PRs (30d)
25

Description

## Description of bug / unexpected behavior
Whenever I tried to render a straight line with OpenGL renderer (in ThreeDScene, if this is relevant), it fails to appear.

## Expected behavior
Lines should appear.

## How to reproduce the issue
Minimal example:
```python
# main.py
from manim import *

class ExampleScene(ThreeDScene):
def construct(self):
self.add(Line())
self.wait()
```

Render with `manim render main.py --renderer opengl --write_to_file`. The resulting movie is _empty_.

## Logs
Terminal output

```
$ manim render main.py --renderer opengl --write_to_movie -v debug
Manim Community v0.17.3

[08/18/23 22:25:26] DEBUG Animation with empty mobject animation.py:174
DEBUG Hashing ... hashing.py:350
DEBUG Hashing done in 0.008119 s. hashing.py:362
DEBUG Hash generated : 2465576764_2828545558_228940957 hashing.py:365
DEBUG List of the first few animation hashes of the scene: ['2465576764_2828545558_228940957'] caching.py:61
DEBUG C:\Users\hp\scoop\apps\python\current\Lib\site-packages\manim\renderer\shaders\vert.gls shader_wrapper.py:32
l does not exist.
DEBUG \vert.glsl does not exist. shader_wrapper.py:32
DEBUG C:\Users\hp\scoop\apps\python\current\Lib\site-packages\manim\renderer\shaders\geom.gls shader_wrapper.py:32
l does not exist.
DEBUG \geom.glsl does not exist. shader_wrapper.py:32
DEBUG C:\Users\hp\scoop\apps\python\current\Lib\site-packages\manim\renderer\shaders\frag.gls shader_wrapper.py:32
l does not exist.
DEBUG \frag.glsl does not exist. shader_wrapper.py:32
[08/18/23 22:25:27] INFO Animation 0 : Partial movie file written in scene_file_writer.py:527
'\media\videos\main\1080p60\partial_movie_fi
les\ExampleScene\2465576764_2828545558_228940957.mp4'
INFO Combining to Movie file. scene_file_writer.py:617
DEBUG Partial movie files to combine (1 files): scene_file_writer.py:561
['E:\\CodePro\\Animations\\manim\\art-gallery\\media\\videos\\main\\1080p60\\partia
l_movie_files\\ExampleScene\\2465576764_2828545558_228940957.mp4']
INFO scene_file_writer.py:736
File ready at
'E:\CodePro\Animations\manim\art-gallery\media\videos\main\1080p60\ExampleScene.mp4
'

INFO Rendered ExampleScene scene.py:241
Played 1 animations
```

## System specifications

System Details

- OS: Windows 10
- RAM: 16GB
- Python version (`python/py/python3 --version`): Python 3.11.1

FFMPEG

Output of `ffmpeg -version`:

```
ffmpeg version 5.0-essentials_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 11.2.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
libavutil 57. 17.100 / 57. 17.100
libavcodec 59. 18.100 / 59. 18.100
libavformat 59. 16.100 / 59. 16.100
libavdevice 59. 4.100 / 59. 4.100
libavfilter 8. 24.100 / 8. 24.100
libswscale 6. 4.100 / 6. 4.100
libswresample 4. 3.100 / 4. 3.100
libpostproc 56. 3.100 / 56. 3.100
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the minimal example in main.py and reproduce it using the documented OpenGL render command. Then inspect the OpenGL renderer and renderer/shaders paths referenced by the debug output; it is done when the resulting movie visibly contains the straight Line in ThreeDScene.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.