No zoom for opengl Camera
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- computer-graphics
Research direction
Start with scene/three_d_scene.py at set_camera_orientation and trace the OpenGLCamera implementation implicated by the traceback. Reproduce the issue with the provided Python snippet and the --renderer opengl command. Done means the zoom argument works for the OpenGL renderer without raising AttributeError.
Written by the indexing model from the issue text.
Description
Description of bug / unexpected behavior
set zoom for camera doesn't work with opengl renderer
Expected behavior
it should work
How to reproduce the issue
Focus on the zoom part
self.set_camera_orientation(phi=70 * DEGREES, theta=-35 * DEGREES, zoom=0.72)
add this in the file and run with manim --renderer opengl -ql main.py
Code for reproducing the problem
self.set_camera_orientation(phi=70 * DEGREES, theta=-35 * DEGREES, zoom=0.72)
Additional media files
Images/GIFs
Logs
Terminal output
~/Desktop/video
.venv ❯ manim render --renderer opengl -qh --disable_caching \
--resolution 1080,1920 --frame_rate 60 \
--format mp4 \
main.py --write_to_movie
Manim Community v0.21.0
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/himanshm/Desktop/video/.venv/lib/python3.13/site-packages/manim/cli/render/commands.py:107 │
│ in render │
│ │
│ 104 │ │ │ │ for SceneClass in scene_classes_from_file(file): │
│ 105 │ │ │ │ │ with tempconfig({}): │
│ 106 │ │ │ │ │ │ scene = SceneClass(renderer) │
│ ❱ 107 │ │ │ │ │ │ rerun = scene.render() │
│ 108 │ │ │ │ │ if rerun or config["write_all"]: │
│ 109 │ │ │ │ │ │ renderer.num_plays = 0 │
│ 110 │ │ │ │ │ │ continue │
│ │
│ /home/himanshm/Desktop/video/.venv/lib/python3.13/site-packages/manim/scene/scene.py:259 in │
│ render │
│ │
│ 256 │ │ """ │
│ 257 │ │ self.setup() │
│ 258 │ │ try: │
│ ❱ 259 │ │ │ self.construct() │
│ 260 │ │ except EndSceneEarlyException: │
│ 261 │ │ │ pass │
│ 262 │ │ except RerunSceneException: │
│ │
│ /home/himanshm/Desktop/video/main.py:44 in construct │
│ │
│ 41 │ │ ) │
│ 42 │ │ │
│ 43 │ │ # Camera (now valid because we inherit ThreeDScene) │
│ ❱ 44 │ │ self.set_camera_orientation(phi=70 * DEGREES, theta=-35 * DEGREES, zoom=0.72) │
│ 45 │ │ self.begin_ambient_camera_rotation(rate=0.06) │
│ 46 │ │ │
│ 47 │ │ nodes, edges, edge_map = self._build_graph() │
│ │
│ /home/himanshm/Desktop/video/.venv/lib/python3.13/site-packages/manim/scene/three_d_scene.py:98 │
│ in set_camera_orientation │
│ │
│ 95 │ │ if gamma is not None: │
│ 96 │ │ │ self.renderer.camera.set_gamma(gamma) │
│ 97 │ │ if zoom is not None: │
│ ❱ 98 │ │ │ self.renderer.camera.set_zoom(zoom) │
│ 99 │ │ if frame_center is not None: │
│ 100 │ │ │ self.renderer.camera._frame_center.move_to(frame_center) │
│ 101 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'OpenGLCamera' object has no attribute 'set_zoom'
System specifications
System Details
- OS (with version, e.g., Windows 10 v2004 or macOS 10.15 (Catalina)):
- RAM:
- Python version (
python/py/python3 --version): - Installed modules (provide output from
pip list):
Operating System: CachyOS Linux
KDE Plasma Version: 6.7.4
KDE Frameworks Version: 6.29.0
Qt Version: 6.11.1
Kernel Version: 7.1.8-1-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i7-6600U CPU @ 2.60GHz
Memory: 8 GiB of RAM (7.6 GiB usable)
Graphics Processor 1: Intel® HD Graphics 520
Graphics Processor 2: AMD Radeon R7 M360
Manufacturer: Dell Inc.
Product Name: Latitude E5470
Additional comments
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
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.
More from ManimCommunity/manim
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
ManimCommunity/manim#4983 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ManimCommunity/manim#4817 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ManimCommunity/manim#4734 · 1 comment ·
-
good first issue new feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ManimCommunity/manim#4183 · 10 comments ·
-
easy enhancement good first issue
Difficulty 2/5 Half a day Newbie friendliness 62/100
ManimCommunity/manim#2502 · 4 comments ·
All issues in ManimCommunity/manim
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100