EC - Mask Channel
This export option is available as a separate fluid data channel for the RPC (RealFlow Particle Cache) and ABC (Alembic) file types. The channel simply uses a bit to describe whether a particle is considered splash or foam. This is interesting for the “Splash & Foam” emitter, but also for the “Bubbles” emitter, because here the bubble particles can be turned into foam. So, when the bit is set to 9 then the particle is a foam particle, otherwise it is a splash or bubble particle.
BIN files from standard SPH emitters also carry this bit. When it is set 12 the particle has been added by the “Sheeter” daemon. This way it is possible to separate the main body of fluid from freshly added particles.
The “Mask” channel is supported by RealFlow's “Graphs”, our node-based, visual programming engine, and Python. With the help of the “IntegerBitValue” node you are able to read out this bit value, create a mask to filter the particles, and shift them to individual emitters, for example. In Python, the mask bit can be accessed as follows:
maskId = HY_Bubbles01.getChannelId( "mask" ) mask = particle.getChannelValue( maskId ) isFoam = (mask&(1<<9)) != 0