Skip to content

Point always visible through other objects in ThreeDScene when using Cairo #2174

@hennels

Description

@hennels

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
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`

ThreeDScene

Frame using `Scene`

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue:bugSomething isn't working... For use in issues

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions