ManimCommunity / ManimCommunity/manim

render problem 3d camera distance

Open
#975 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue:bug
Dominant language
Python
Stars
40.9k
Forks
3.1k
Avg merge
3d 12h
Merged PRs (30d)
25

Description

## Description of bug / unexpected behavior
If setting the distance in camera orientation too close to 3d axes
white frames are rendered and the axes are curved.

This can be bypassed by setting the distance further away
or probably with some tricks in scaling, but can be surprising and hard
to debug also.

## Expected behavior
Distance of 3d camera shouldn't create rendering problems and not bend the axes.

## How to reproduce the issue

Code for reproducing the problem

```py
def construct(self):

self.set_camera_orientation(
phi=80 * DEGREES,
theta=45*DEGREES,
distance=2 # causes trouble
)

axes = ThreeDAxes()

s = Sphere()

self.add(axes)
self.play(Write(s))
self.begin_ambient_camera_rotation(rate=0.2)
self.wait(10)
```

## Additional media files

Images/GIFs

![bug_distance_camera](https://user-images.githubusercontent.com/11498317/106166145-280a2000-618c-11eb-89fb-908aeca0535c.gif)

## Logs
Everything goes fine even with log level debug.

## System specifications

System Details

- OS Fedora 33
- RAM: 16GB
- Python version: 3.9.1

FFMPEG

Output of `ffmpeg -version`: 4.3.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the provided construct example with set_camera_orientation, ThreeDAxes, Sphere, and ambient camera rotation at distance=2. Inspect the camera-orientation and 3D rendering paths involved in the reproduction. Done means the example no longer produces white frames or visibly curved axes at the reported distance, with regression coverage added where the relevant rendering behavior is tested.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.