3b1b / 3b1b/manim

Use more than one Camera

Open
#1,384 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
93.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

As mentioned in QnA discussion https://github.com/3b1b/manim/discussions/1374#discussion-3191310, I am trying to recreate zoomed scene functionality in manim shaders. But as soon as I am trying to create a new Camera instance, the whole screen goes black, and all the objects disappear.

### Code
```
from manimlib.imports import *

class MultiCam(Scene):
def construct(self):
earth = self.get_earth()
self.add(earth)

right_cam = Camera()

def get_earth(self):
sphere = Sphere(radius=3)
day_texture = "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Whole_world_-_land_and_oceans.jpg/1280px-Whole_world_-_land_and_oceans.jpg"
night_texture = "https://upload.wikimedia.org/wikipedia/commons/thumb/b/ba/The_earth_at_night.jpg/1280px-The_earth_at_night.jpg"
earth = TexturedSurface(sphere, day_texture, night_texture)
return earth
```

### Result
The earth disappears because of this line `right_cam = Camera()`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.