Ray POP N attribute

I want to use the N type for the Ray attribute in POP. However, after changing it,It works correctly.

It seems like some kind of bug related to attribute initialization.

The geometry itself does not originally have an N attribute. But once the POP sequence initializes and starts cooking, the N attribute suddenly appears, and then I can switch the Ray attribute to N.

The strange part is that if I restart the particles, it says that N does not exist again. To make it work, I have to switch the Ray attribute back to P, then switch again to N, and suddenly the N attribute appears as if it already exists.

Because of this behavior, the particle motion becomes unstable and spreads incorrectly.

Has anyone experienced this issue before, or is there a proper way to initialize the N attribute for POPs?

PJ-03.40.toe (16.3 KB)

Hello @Talalae

The N attribute is added by the Ray POP from its second input, but only when the operator cooks successfully. That N attribute is then fed back into the loop by the Particle POP.
To avoid issues, make sure the N attribute exists before the end of the loop. You can do this either by assigning a constant N value directly in the Particle POP, or by computing a proper direction vector based on how each particle’s position changes from one frame to the next.