updateVertexPositions too slow to use for real-time animation loops
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 242
- Avg merge
- 11m
- Merged PRs (30d)
- 1
Description
I'm wondering if I'm using the updateVertexPositions and userCallback correctly. Currently I'm getting around 260 ms/f (4 FPS) when I update the positions of a mesh with 262,144 faces inside the draw loop callback.
If I run a similar animation in the libigl viewer I'm getting 19.9 ms/f (50 FPS). In that scenario I'm using set_vertices and callback_pre_draw.
Here's a video screenshot on my intel macbook pro running catalina:
https://user-images.githubusercontent.com/2241689/147182765-78b15f28-a1ce-4fc6-abf0-f6b44af2728e.mov
( Turning off the polyscope groundplane doesn't seem to change anything. I'm guessing the slowdown is happening in updateVertexPositions)
Contributor guide
No contributing guide indexed for this repository
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 at the updateVertexPositions and userCallback entry points used inside the draw loop, and compare their behavior with libigl's set_vertices and callback_pre_draw path. Profile the 262,144-face animation on the reported macOS setup to identify the source of the frame-time difference. Done means the cause and correct usage are established, with a reproducible performance comparison or a documented limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100