ManimCommunity / ManimCommunity/manim
Orientation of line differs between cairo and opengl render
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
When I render a scene with the Line3D object, the orientation of the line differs between the Cairo and OpenGL based render.
## Expected behavior
I would expect to see the same from both renderers.
## How to reproduce the issue
Code for reproducing the problem
```py
from manim import *
RENDERER_TYPE: RendererType = RendererType.CAIRO
# RENDERER_TYPE: RendererType = RendererType.OPENGL
class LineIn3DExample(ThreeDScene):
def construct(self):
renderer_str = f"renderer: {config.renderer.value}"
renderer_text = Text(renderer_str, font_size=24)
self.add_fixed_in_frame_mobjects(renderer_text)
renderer_text.to_corner(UL)
self.set_camera_orientation(phi=-15 * DEGREES, theta=-90 * DEGREES, gamma=0 * DEGREES)
line: Line3D = Line3D(LEFT, RIGHT)
# With the cairo render the line is horisontal.
# With the opengl render the line is vertical.
self.add(line)
# For running the scene directly
if __name__ == "__main__":
print(RENDERER_TYPE)
with tempconfig({
"renderer": RENDERER_TYPE
}):
scene = LineIn3DExample()
scene.render()
```
## Additional media files
Images/GIFs
## Additional comments
The issue was found while debugging this issue https://github.com/ManimCommunity/manim/issues/4337
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 Line3D and ThreeDScene reproduction with both Cairo and OpenGL renderers, then compare the renderer paths that construct or orient the line. Done means the same line orientation is produced by both renderers for this scene.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100