DRAFT PR: Add QuakeMDL interpolation between frames#3214
Draft
jasonchen270 wants to merge 1 commit into
Draft
Conversation
mwestphal
reviewed
Jun 4, 2026
mwestphal
reviewed
Jun 4, 2026
| (found == times.end() - 1) ? times.size() - 2 : std::distance(times.begin(), found); | ||
| // If time at index i > timeValue, then choose the previous frame | ||
| const size_t frameIndex = times[i] > timeValue && i > 0 ? i - 1 : i; | ||
| // Make sure time is in valid range |
Member
There was a problem hiding this comment.
not needed, time is always in the valid range I think ?
mwestphal
reviewed
Jun 4, 2026
| // Index of frame at or immediately after clamped time | ||
| size_t upperFrameIndex = | ||
| std::distance(times.begin(), std::lower_bound(times.begin(), times.end() - 1, clampedTime)); | ||
| size_t lowerFrameIndex = upperFrameIndex > 0 ? upperFrameIndex - 1 : 0; |
Member
There was a problem hiding this comment.
you may want to check when you are on the exact time and shortcut in that case
mwestphal
reviewed
Jun 4, 2026
| lowerCoord[2] + alpha * (upperCoord[2] - lowerCoord[2])); // z | ||
| } | ||
|
|
||
| vtkNew<vtkPolyData> interpolatedMesh; |
Member
There was a problem hiding this comment.
while this approach works for interpolating points, you may be missing other data to interpolate between frames (eg tcoords, normals and such).
To get a proper interpolation, use vtkInterpolateDataSetAttributes.
mwestphal
requested changes
Jun 4, 2026
mwestphal
left a comment
Member
There was a problem hiding this comment.
Please also note that you will need to add a reader option to control this behavior, interpolation should not always be done between keyframes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
Issue ticket number and link if any
Fixes #2138
Checklist for finalizing the PR
.github/workflows/versions.json, I have updateddocker_timestampAI Disclosure
Continuous integration
\ci fast
Please write a comment to run CI, eg:
\ci fast.See here for more info.