Dyverso domains

Discussions about the use of Realflow
Post Reply
Posts: 5
Joined: Thu Aug 09, 2007 11:00 am

Dyverso domains

Post by cristouk » Wed Jul 24, 2019 9:34 pm

Hi all,

I have an animation of a car driving over a bump and kicking up some dyverso granular sand. I dropped patch of sand from an emitter and all works fine, but ideally, I'd only like the particles kicked up in the sim to make it to the final particle cache.

Not that familiar with Realflow scripting but found and edited a Sim flow script to transfer particles to a second dyverso domain based on the the particles velocity:

# Get the domains "DY_Domain01" and its particles, as well as "DY_Domain02"
domainA = scene.get_DY_Domain("DY_Domain01")
domainB = scene.get_DY_Domain("DY_Domain02")
particles = domainA.getParticles()
velocityMin = 7.0

# Loop through every particle and check it is colliding with an objects.
# If the particle is colliding it is shifted to "DY_Domain02" and removed at its original position
for particle in particles:
particleVelocity = particle.getVelocity().module()
if (particleVelocity >= velocityMin):
domainB.addParticle(particle.getPosition(), particle.getVelocity())

Which works fine, except when the particles get transferred to the second domain they lose the granular settings and start behaving more like dumb particles and lose the cohesion.
Both domains are set to the same parameters.

Obviously missing something here, or is this the right way to go?

Thanks for any advice,


Posts: 164
Joined: Mon Mar 15, 2010 4:36 am

Re: Dyverso domains

Post by Forester » Fri Jul 26, 2019 3:38 pm

Nice script! At first glance, this sounds like a bug. But, could you please add your domain settings to the post? I'd like to try to recreate this to test it for myself.
Windows 7 Pro 64 - Realflow (Nov 2017 patched) Standard Version

Posts: 5
Joined: Thu Aug 09, 2007 11:00 am

Re: Dyverso domains

Post by cristouk » Fri Jul 26, 2019 5:12 pm

Hey Forester,

Thanks for the reply, almost as soon as I posted this I thought this might not be the way to go, as both Dyverso domains were active in the sim and I'm passing particles from one to the other and they are both affecting each other dynamically? It would be interesting if that were a bug though.

It's been a long time since I've used Realflow so I'm a bit rusty :-)

I changed to trying a graph in a new scene - loading the simmed rpc sequence, deleting particles based on velocity and writing out a new sequence, but I couldn't make that work. I can delete particles by position ok, so I'm missing something there - have attached the graph if you want to take a peek.

So as a workaround, I'm using the velocity channel in Maya to drive a shaders opacity, and that has more or less the same effect - ideally though I'd like these particles to bee sitting in my scene with zero velocity to be hidden until they get kicked up and then stay on for the remainder of the shot(so only the particles that are actually moved become visible). With the method I have, they'll turn off again once their velocity goes below a threshold.

Anyhow here's the Dyverso settings (for both domains)
resolution 1000
density 1000
interpenetration 1.0
friction 0.7
static friction 0.8
compaction 0.25
cohesion 0.7
roughness 0.05
stacking 0.0
damping 1.0
(2.58 KiB) Downloaded 63 times

Post Reply

Return to “Realflow”