ManimCommunity / ManimCommunity/manim
Cairo/OpenGl Variable Clipping Distance for ThreeDScene to move near and far plane
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
When playing animations of `SpiralIn` for `ArrowVectorField` in 3d scenes, several frames of pure color will be generated. The exact color is unsure; I have met blue and yellow.
## Expected behavior
No pure color frame is generated when creating `ArrowVectorField` under the previously described situation.
## How to reproduce the issue
Code for reproducing the problem
```py
class BugTest(ThreeDScene):
def construct(self):
field = ArrowVectorField(lambda p: np.array([0, 0, 1.0]), x_range=[-4, 4], y_range=[-4, 4])
self.set_camera_orientation(phi= 60 * DEGREES, theta=45 * DEGREES)
self.play(SpiralIn(field), run_time=2)
self.wait(1)
```
## Additional media files
Images/GIFs
https://github.com/ManimCommunity/manim/assets/92229358/077cdd7c-f053-4a5d-af44-3821da80efed
## Logs
Terminal output
```
manim .\zyt.py BugTest -pql --fps=10
Manim Community v0.17.3
[05/28/23 00:11:46] INFO Animation 0 : Partial movie file written in scene_file_writer.py:527 INFO Combining to Movie file. scene_file_wri 'E:\prog\python\manim\calc-final-solenoid\media\videos\zyt\480p10\partial_movie_files\BugTest\3251054999_4281972853_223132457.mp4'
PS E:\prog\python\manim\calc-final-solenoid> manim .\zyt.py BugTest -pql --fps=10 -v DEBUG
Manim Community v0.17.3
[05/28/23 00:19:45] DEBUG Hashing ... hashing.py:350
[05/28/23 00:19:46] DEBUG Hashing done in 0.602525 s. hashing.py:362
DEBUG Hash generated : 3251054999_4281972853_223132457 hashing.py:365
INFO Animation 0 : Using cached data (hash : 3251054999_4281972853_223132457) cairo_renderer.py:78
DEBUG List of the first few animation hashes of the scene: ['3251054999_4281972853_223132457'] cairo_renderer.py:87
Animation 0: SpiralIn(ArrowVectorField of 289 submobjects): 0%| | 0/1 [00:00
## System specifications
System Details
- OS: Windows 10 19044.2965
- RAM: 32G
- Python version (`python/py/python3 --version`): 3.11
- Installed modules (provide output from `pip list`):
```
pip list
Package Version
------------------------ -----------
anyio 3.6.2
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
arrow 1.2.3
asttokens 2.2.1
attrs 22.2.0
autopep8 2.0.1
backcall 0.2.0
beautifulsoup4 4.12.0
bleach 6.0.0
certifi 2022.12.7
cffi 1.15.1
charset-normalizer 3.0.1
click 8.1.3
click-default-group 1.2.2
cloup 0.13.1
colorama 0.4.6
colour 0.1.5
comm 0.1.3
contourpy 1.0.7
cycler 0.11.0
debugpy 1.6.6
decorator 5.1.1
defusedxml 0.7.1
entrypoints 0.4
executing 1.2.0
fastjsonschema 2.16.3
ffmpeg 1.4
fonttools 4.38.0
fqdn 1.5.1
glcontext 2.3.7
idna 3.4
ipykernel 6.22.0
ipython 8.9.0
ipython-genutils 0.2.0
isoduration 20.11.0
isosurfaces 0.1.0
jedi 0.18.2
Jinja2 3.1.2
jsonpointer 2.3
jsonschema 4.17.3
jupyter_client 7.4.9
jupyter_core 5.3.0
jupyter-events 0.6.3
jupyter_server 2.5.0
jupyter_server_terminals 0.4.4
jupyterlab-pygments 0.2.2
kiwisolver 1.4.4
manim 0.17.3
manimgl 1.6.1
ManimPango 0.4.3
mapbox-earcut 1.0.1
markdown-it-py 2.1.0
MarkupSafe 2.1.2
matplotlib 3.6.3
matplotlib-inline 0.1.6
mdurl 0.1.2
mistune 2.0.5
moderngl 5.7.4
moderngl-window 2.4.2
mpmath 1.2.1
multipledispatch 0.6.0
nbclassic 0.5.4
nbclient 0.7.2
nbconvert 7.2.10
nbformat 5.8.0
nest-asyncio 1.5.6
networkx 2.8.8
notebook 6.5.3
notebook_shim 0.2.2
numpy 1.24.2
packaging 23.0
pandas 1.5.3
pandocfilters 1.5.0
parso 0.8.3
pickleshare 0.7.5
Pillow 9.4.0
pip 23.0
platformdirs 3.2.0
prometheus-client 0.16.0
prompt-toolkit 3.0.36
psutil 5.9.4
pure-eval 0.2.2
pycairo 1.23.0
pycodestyle 2.10.0
pycparser 2.21
pydub 0.25.1
pyglet 2.0.4
Pygments 2.14.0
pymunk 6.4.0
PyOpenGL 3.1.6
pyparsing 3.0.9
pyrr 0.10.3
pyrsistent 0.19.3
python-dateutil 2.8.2
python-json-logger 2.0.7
pytz 2023.3
pywin32 306
pywinpty 2.0.10
PyYAML 6.0
pyzmq 24.0.1
requests 2.28.2
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rich 13.3.1
scipy 1.10.0
screeninfo 0.8.1
Send2Trash 1.8.0
setuptools 65.5.0
Shapely 1.8.5.post1
six 1.16.0
skia-pathops 0.7.4
sniffio 1.3.0
soupsieve 2.4
srt 3.5.2
stack-data 0.6.2
svgelements 1.9.0
sympy 1.11.1
terminado 0.17.1
tinycss2 1.2.1
tornado 6.2
tqdm 4.64.1
traitlets 5.9.0
uri-template 1.2.0
urllib3 1.26.14
validators 0.20.0
watchdog 2.2.1
wcwidth 0.2.6
webcolors 1.13
webencodings 0.5.1
websocket-client 1.5.1
[notice] A new release of pip is available: 23.0 -> 23.1.2
[notice] To update, run: python.exe -m pip install --upgrade pip
```
LaTeX details
+ LaTeX distribution (e.g. TeX Live 2020):
+ Installed LaTeX packages:
FFMPEG
Output of `ffmpeg -version`:
```
ffmpeg version 4.4-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev6, 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 --enab
le-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-lib
vpx --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 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.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 reproducing the `ThreeDScene` example with `ArrowVectorField` and `SpiralIn`, then inspect the Cairo/OpenGL rendering path and camera clipping behavior. Done means the animation no longer produces pure-color frames and the near and far clipping distances can be varied for the scene.
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
- Mostly clear
- Newbie friendliness
- 32/100