Hello,
Is there a way to filter inf and nan values in a pop pipeline ?
I found a way by converting to Chop and making some expressions..
But if there is a way insinde pop, i’m interested.
Thanks
Arnaud
Hello,
Is there a way to filter inf and nan values in a pop pipeline ?
I found a way by converting to Chop and making some expressions..
But if there is a way insinde pop, i’m interested.
Thanks
Arnaud
Hello,
Thanks for the feedback.
When you mean filter, do you mean removing the points/verts/prims that have inf or nan values? Or replacing the inf/nan with a value of your choice.
Some math ops susceptible to produce nan or inf internally do some testing to avoid it (leaving input value untouched then I believe), otherwise there’s not much built-in, but you could use a GLSL POP with isnan() isinf() to replace the value and then use a Delete POP by attribute.
We could make that more straightforward by adding nan and inf as values to test against in Delete POP, and also add a mode to replace inf/nan in Math POP and/or MathMix etc.
Let us know what you think would be the most useful, also if you have specific use cases that might help, and we’ll consider it for addition!
Best,
Vincent
Hey,
I think both options could be useful, but I’m more interested by the second one, replacing inf/nan with a value of my choice.
I have done a workaround with chop, i will try to make a glsl pop with isnan() and isinf() to see if it’s working.
Maybe a simple option in math pop to replace inf/nan with a value of your choice could be a good start.
My use case is a grid space audio spatializer that use pops particles attributes averages from a zone to control the cutoff and amplitude of audio filters and renders, and when there is no particle in the zone, it produce inf or nan values that i want to replace with 0.
Thanks
Arnaud
That sounds good, I’ll log it internally.
See attached for a simple example with GLSL POP.
ReplaceInvalidValue.toe (4.3 KB)
Thanks for the example, i will try it tomorrow.
You have responded better than i expected, thanks a lot for your help and your time.
bests,
Arnaud