Arnold and Maya nParticle opacity ramps on spawned secondary nParticle


#1

Hello forum! I am wondering if anyone else has found a solution to my problem.

The issue is with the integration of nParticles and Arnold.
I am doing a simple sparks effect, spawning particles on a collision event to create secondary smaller sparks.
I know that you need to write out attributes in the Arnold tab of the nParticles Shape node.
I know that you need to use AIUserData nodes to read the exported attribute when using it to create the necessary gradient effect.
I’ve been using AIUserDataFloats for age, lifespanPP
and
AIUserDataColor for rgbPP and opacityPP

In the Export Attribute section of the nParticles Shape" Arnold node, I write out the following using only spaces between the attributes I am exporting…
age lifespanPP rgbPP opacityPP currentTime birthTime etc…
My goal is to use these to drive an opacity face over time.
In the hypershade,
On the primary particles, using age/lifespanPP gets me what I want when each of the aiUserDataFloat nodes is piped through a floatMath node or a multiplyDivide node set to divide. The result is piped into the V coord node of a ramp shader. running black to white to create an opacity fade.
The problem is with the spawned particles, or secondary particles. Even when set up with a randomized lifespanPP in the per particle attributes on its shape node, and lifespan set to lifespanPP, I can’t get a fade to drive the opacity of the shader on the particle. They just die out and disappear abruptly at the end of their lifespans.
I’ve tried with surface shaders mapped to transparency, B to W with a reverse. ,
and with aiStandardSurface opacity W - B,
I’ve used the same age/lifespanPP on the secondary particle, but it still doesn’t create the fade like on the primary particles.
It makes me think that the age attribute is written globally, based on the first frame, but when I set the shading of the secondary particle to numeric and view the age attribute, the age appears to reflect the corrrect age of the particle based on its arbitrary birth time in scene.
When I view the secondary particles lifespanPP in particle shading numeric mode, the numbers look correct as well.
It got me to thinking to use birthTime and current time to determine time elapsed since birth, and then divide by lifespanPP, but nothing seems to do the trick. I know this is simple, but cant help like I am missing something simple.

It is these kinds of things that make me spin my wheels with the current system
BTW, I have turned off the opaque flag on the nParticle Arnold Tab.

Any advice or guidance most welcome.

Sincerely

Adam