ManimCommunity / ManimCommunity/manim
OpenGL Bug for small elements rendering too big
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
I do not know why this happens by now but it must probably be some error in the shader somewhere i kind of suspect that it is the anti aliasing which breaks that part because it doesn't scale with the objects? But that might also be a red hairing so please do your own research on why this might be happeing
## Expected behavior
1080p Renderings
### Rendered with OpenGL

### Rendered with OpenGL AntiAliasing kind of removed

### Rendered with Cairo

4k Renderings
### Rendered with OpenGL

### Rendered with OpenGL AntiAliasing kind of removed

### Rendered with Cairo

In those two screenshots you can clearly see that theres a problem with rendering at small size for OpenGL where everything is just a big blob of color instead of clearly defined shapes. The red points are for visualizing that problem because they should disappear at some point because they are so small.
But rendering without antialiasing is not really feasible if we want to have a good looking result so i think the Antialiasing might add a weird extra width around the shapes.
## How to reproduce the issue
```py
class SizeGlitch(MovingCameraScene):
def construct(self):
for i in range(1, 10):
text = Text(
f"20",
# font="Sans",
weight=BOLD,
use_svg_cache=True,
).shift(LEFT * 5 + RIGHT * i)
text2 = (
Text(str(0.1 / (i * 10)))
.shift(DOWN)
.scale(0.1)
.shift(LEFT * 5 + RIGHT * i)
)
text2 = Text("A").shift(UP).scale(1 / i).shift(LEFT * 5 + RIGHT * i)
dots = [
Dot(p, radius=0.1 / (i * 10), color=RED) for p in text.get_all_points()
]
self.add(text, text2, *dots)
```
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 with the SizeGlitch MovingCameraScene reproduction and compare its OpenGL output with the anti-aliasing-disabled and Cairo examples. Trace how the small Text shapes and Dot objects are rendered at 1080p and 4K. Done means small elements remain clearly defined and appropriately scaled while normal anti-aliasing remains enabled.
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
- Needs clarification
- Newbie friendliness
- 25/100