ManimCommunity / ManimCommunity/manim
Extraneous Lines on Sphere in OpenGL
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
## Description of bug / unexpected behavior
Some OpenGL Mobjects have extraneous lines both on and the mobject and off. The sphere demonstrates this.
## Expected behavior
To not have extralines like in cairo.
## How to reproduce the issue
Code for reproducing the problem
```py
%%manim --write_to_movie --renderer=opengl -v DEBUG -ql GL
class GL(Scene):#bug
def construct(self):
axes = ThreeDAxes()
sphere = Surface(
lambda u, v: np.array([
1.5 * np.cos(u) * np.cos(v),
1.5 * np.cos(u) * np.sin(v),
1.5 * np.sin(u)
]), v_range=[0, TAU], u_range=[-PI / 2, PI / 2],
checkerboard_colors=[RED_D, RED_E], resolution=(15, 32)
)
self.add(axes, sphere)
self.play(self.camera.animate.scale(0.5),run_time=3)
self.play(self.camera.animate.scale(2),run_time=3)
```
## Additional media files
Images/GIFs
https://user-images.githubusercontent.com/76829691/135975209-e6ff26ab-f7ca-40d4-9cbd-1e28b24940ba.mp4
## Logs
Terminal output
```
[10/05/21 02:51:33] DEBUG Hashing ... hashing.py:344
DEBUG Hashing done in 0.925535 s. hashing.py:356
DEBUG Hash generated : 435250913_1808492448_2821565324 hashing.py:359
INFO Animation 0 : Using cached data (hash : caching.py:48
435250913_1808492448_2821565324)
DEBUG List of the first few animation hashes of the caching.py:57
scene: ['435250913_1808492448_2821565324']
Animation 0: _MethodAnimation(OpenGLCamera): 0%| | 0/1 [00:00
## System specifications
System Details
- OS (with version, e.g Windows 10 v2004 or macOS 10.15 (Catalina)):
- Google Chrome OS Version 93.0.4577.95 (Official Build) (64-bit)
- RAM:
- Unknown
- Python version (`python/py/python3 --version`):
- Python 3.8.11
- Installed modules (provide output from `pip list`):
```
Package Version
------------------- ---------
backcall 0.2.0
certifi 2021.5.30
charset-normalizer 2.0.6
click 8.0.1
click-default-group 1.2.2
cloup 0.7.1
colorama 0.4.4
colour 0.1.5
commonmark 0.9.1
decorator 5.1.0
glcontext 2.3.4
idna 3.2
ipykernel 5.5.3
ipython 7.22.0
ipython-genutils 0.2.0
isosurfaces 0.1.0
jedi 0.18.0
jupyter-client 6.1.12
jupyter-core 4.7.1
manim 0.11.0
ManimPango 0.3.0
mapbox-earcut 0.12.10
moderngl 5.6.4
moderngl-window 2.4.0
multipledispatch 0.6.0
networkx 2.6.3
numpy 1.21.2
parso 0.8.2
pexpect 4.8.0
pickleshare 0.7.5
Pillow 8.3.2
pip 21.0.1
prompt-toolkit 3.0.18
ptyprocess 0.7.0
pycairo 1.20.1
pydub 0.25.1
pyglet 1.5.21
Pygments 2.8.1
pyrr 0.10.3
python-dateutil 2.8.1
pyzmq 22.0.3
requests 2.26.0
rich 10.11.0
scipy 1.7.1
screeninfo 0.6.7
setuptools 58.0.4
six 1.15.0
skia-pathops 0.7.0
tornado 6.1
tqdm 4.62.3
traitlets 5.0.5
urllib3 1.26.7
watchdog 2.1.6
wcwidth 0.2.5
wheel 0.37.0```
```
LaTeX details
+ LaTeX distribution (e.g. TeX Live 2020):
+ Installed LaTeX packages:
No output
FFMPEG
Output of `ffmpeg -version`:
```
ffmpeg version 4.1.6-1~deb10u1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --prefix=/usr --extra-version='1~deb10u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
```
## Additional comments
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided `%%manim` reproduction with `--renderer=opengl` and compare its sphere output with Cairo. Trace the OpenGL rendering path implicated by the sphere, camera scaling, and shader logs; done means the reproduced sphere has no extraneous lines on or outside the mobject.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100