Page 1 of 1

Granular Particles changing IDs during animation

Posted: Wed Aug 22, 2018 11:51 am
by bendreality
Hi all,

since a few days I'm trying to solve a problem with particle IDs of granular particles. For a project I tried to use Dyverso Granular particles as input for the Maya instancer to simulate ground dust. Im instancing one of 12 different geometries on each particle. Problem is that the Particles change their IDs during the animation, so from time to time one particle changes from one geometrie to another.

I tried both one simulation with stable particle count and another with changing particle count. The problem is present in both versions.

I use rpc particles imported with the "RFConnect|Maya" Plugin into Maya 2018.3

If I show the particle ID they change randomly after a while. (not on every frame)

In the cinema 4D particle importer, there is a "Keep order of particles" checkbox.
Is there a way to get the same functionality in Maya? Or is there a known workflow/workaround to avoid flickering through changing IDs in animation?


Re: Granular Particles changing IDs during animation

Posted: Fri Aug 24, 2018 6:52 am
by tsn
Unfortunately there's no out-of-the-box solution for this issue. In Dyverso, particle IDs change every few frames. The main reason for this behaviour was to make Dyverso ready for GPU simulations: particles are not sorted by ID, but based on their location in the (V)RAM to accelerate the simulations. So, when the particles' locations change in the computer's (V)RAM then the IDs will be redistributed as well. This new distribution makes all ID-based actions nearly impossible. When you simulate on the CPU results will most probably turn out slightly better, but the errors will still be there.

The C4D plugin's "Keep order of particles" doesn't help here, because this function does nothing more then sorting particles according to their IDs, but when the IDs change, then the plugin's function is useless again.

It's really a super annoying bug. RealFlow|Cinema 4D is the only tool where particles keep their IDs throughout the entire simulation, but in RF standalone this bug hasn't been fixed so far (and I doubt that it'll be addressed anytime soon). The only way is to write a script/create a graph that goes through your cache files, recalculates the IDs, and saves the simulation in a new sequence. But that's not trvial, because you also have keep track of thisngs like velocity and other channels. Things will be easier abd faster if you dont mind losing most of the channel information.

Re: Granular Particles changing IDs during animation

Posted: Tue Sep 04, 2018 4:09 pm
by bendreality
Hi tsn,

sorry for the late answer. A huge project hit me pretty hard, but now, finally, I was able to take the time.^^

Thanks for this great reply. Actually, this is the most sophisticated answer on the topic I saw, untill now.

By recalculating the IDs, do you mean read the cache file via script and calculate the approximate position of the particle in the next frame using the vector, velocity and rotation and search trough the particles on the next frame find the one with the esimated position to give it the same ID as the particle in the last frame and save it in a separate cache file?

king regards,