Asking for seconds
Registered: 1290534737 Posts: 108
Reply with quote #1
Think I may have just run across a bug, either in my code, or in the API regarding NParticles.
I'm working on updating the code for partio4Maya, and something seems to have changed in 2015 or 2016 and for the life of me, I now cannot force an update to Nparticles any other way except running it per frame via mel code frame stepping forward, and exporting a frame. Slightly complicating things is that this seems to only be a problem with viewport 2.0 or if the particles are pre-nucleus cached. I end up getting all the particles, the counts are correct.. but they end up all at the origin. to be clear.. (writing out cache using the api via my partio plugin) live playback + vp1.0 = success! n-cache + vp1.0 = failure (particles at the origin) live playback + vp2.0 = failure (particles at the origin) n-cache + vp2.0 = failure(particles at the origin) Legacy particles are not affected by this problem at all. Previously I was using the MFnParticleSystem function "evaluateDynamics" and it was working with both particles and NParticles, now for whatever reason I can't use it anymore becuase in cases where NParticles use lifespan of any kind, it simply forgets to kill the particles with lifespan<age. If I don't use that evaluateDynamics call, in viewport 1.0, it works correctly now. but in viewport 2.0 it fails to dirty something and all the particle positions end up at the origin... Not sure where to point my finger at this point.. it seems like a bug to me, but does anyone else know of any other functions or ways to force an update to Nucleus ? I need to look at the NCache command to see if its doing a frame step in python/mel or not.. thats my only other idea. any ideas would be welcome on this thanks -johnc
Registered: 1288636266 Posts: 4,639
Reply with quote #2
Things changed for sure in the particles area recently.
I didn't hit problems like yours but encountered different issues with initial states and stuff. The old particles are somehow less affected but nParticles are more of a headache. Maya Devs never really finished their work on them. :S I don't know what to say really. Maybe reach to Julia or Duncan at Autodesk.
Registered: 1339576245 Posts: 193
Reply with quote #3
Could this be a parallel/ DG thing?
We've had loads of issues with nParticles that were 'solved' by switching to DG evaluation mode. Of course, it could be something completely different...