ManimCommunity / ManimCommunity/manim
Point always visible through other objects in `ThreeDScene` when using Cairo
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
`Point` objects are always visible when in a `ThreeDScene`, even when they should be occluded by other objects.
## Expected behavior
If a point is behind or inside another object it should not be visible. Just like in a 2D scene.
## How to reproduce the issue
Place a `Point` in a `ThreeDScene` behind or inside another object. Here I have placed a point inside a cube and it is still visible.
Code for reproducing the problem
```py
class PointInsideCube(ThreeDScene):
def construct(self):
self.add(Point(color=BLACK))
self.add(Cube(side_length=2, fill_opacity=1.0))
self.wait(1)
```
If the `ThreeDScene` in the above example is replaced with `Scene` the desired behavior is achieved.
## Additional media files
Frame using `ThreeDScene`

Frame using `Scene`

## Additional comments
I don't know if this is expected behavior for `ThreeDScene` but it doesn't seem right to me. I tried the `shade_in_3d=True` keyword argument that is listed in #2032 but `Point` does not accept it and it has no effect on `Cube`. Am I missing something else?
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 running the provided PointInsideCube reproduction and compare the output from ThreeDScene with Scene. Trace how ThreeDScene renders or orders Point and Cube objects under Cairo. Done means a point behind or inside an opaque object is no longer visible in ThreeDScene, while the existing 2D behavior remains unchanged.
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