Goals:
- Simplify the sampling code by using an algorithm with less special cases.
- Generalize the sampling to support non-sorted samples.
Differential D15348
BLI: Refactor length parameterization. Authored by Jacques Lucke (JacquesLucke) on Jul 2 2022, 7:03 PM. Tags None Subscribers None
Details Goals:
Diff Detail
Event TimelineComment Actions This is great. It will make the sample node much simpler! If you want, the commit message could mention that it's inspired by (or at least similar to) OpenVDB's ValueAccessor. This will probably be more beneficial when up-sampling, since the hint will be useful more often is the segments are long compared to the samples. Unfortunately the two tests I added in D15340 still fail. That doesn't need to block this patch, it should be easier to look into after anyway.
Comment Actions
I was looking at the tests now. I might be wrong but it feels like the test cases are just wrong. They are mixing up point values with segment lengths.
Vector<float> point_values;
point_values.append(4.0f);
for (float &length : lengths) {
point_values.append(point_values.first() + length);
}Comment Actions I was suspicious about that but not sure. Makes sense in retrospect. And good news! Thanks for looking into it. | |||||||||