#4949·manim

No zoom for opengl Camera

Author: himanshmCreated Aug 21, 2026Updated Aug 21, 2026

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

python
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
python
self.set_camera_orientation(phi=70 * DEGREES, theta=-35 * DEGREES, zoom=0.72)

Additional media files

Images/GIFs

Logs

Terminal output
bash
~/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
LaTeX details
  • LaTeX distribution (e.g. TeX Live 2020):
  • Installed LaTeX packages:

new.txt

Additional comments