Phoenix FD Fluid Source SDK?

Hi,

I’m writing a particle simulation system plugin that’s a replacement for particle flow. I’ve used the Phoenix SDK to allow field velocity input from Phoenix sims, but there doesn’t seem to be an SDK interface that allows me to add particle input to a sim.

In other words, right now if you select a particle flow as an input node on a sim, it is able to properly add particle velocities and positions to the sim to drive/generate smoke. Is there a way to get any plugin to be able to provide Phoenix with that data (pos/vel of a point cloud)? Or is that a special implementation designed specifically for particle flow by the Phoenix team, rather than a generic interface any plugin can support?

Hey,

Looking forward to your plugin!

The Phoenix sources currently use the ParticleObject interface for reading particle data and IParticleObjectExt is only used for getting the number of particles. Eventually we’d add full support for both interfaces with one being a fallback for the other, so ParticleObject should always be supported by the sources.

Cheers!

Cool, so if I understand you correctly…

If my plugin returns a proper particle count in NumParticles() within IParticleObjectExt and then returns proper values in ParticlePosition()/ParticleVelocity()/ParticleSize() of the ParticleObject interface, everything should work? Any other functions I should be returning data with?

Hey,

This is correct. The Phoenix Source currently calls UpdateParticles(), NumParticles() and GetParticleAgeByIndex() - the latest is needed to check if the particle age is not -1 but is not mandatory.

The Phoenix Particle Shader also uses the same wrapper, so once the Source works, the Particle Shader should also be able to render your particles.

If you have any issues, please ping me and we’ll resolve them.

Cheers!

Great, thanks for the help!

Yaaaaaaaaay :slight_smile:

Implemented it as directed and it works like a charm. Thanks again!

Woo! Glad to hear such good news!