The gravity thing doesn’t work, because it compresses the fluid so much that at some point it will just explode. Gives you funky wave-like patterns.

Not sure if I’m allowed to post this, so keep your mouth shut.

```
fn PreSim = (
global nBlackHole = getNodeByName "FumeFX Black Hole" --GRAVITY NODE USED FOR BLACK HOLE -- ICONSIZE = RANGE -- STRENGTH = ATTRACT SPEED -- DECAY = SMOKE REDUCTION AMOUNT -- RANGE INDICATORS = KEEP SPEED DIRECTION
if classOf nBlackHole == gravity then
(
ffxPrintToStatus "FOUND BLACK HOLE NODE!!!"
ffxPrintToStatus nBlackHole.name
ffxPrintToStatus "FOUND BLACK HOLE NODE!!!"
)
)
-- after velocity has been pressure corrected. you can make further adjustments to the velocity,
-- and also you can prepare other values - temp, smoke... - which will be moved next
fn PostPressure = (
if classOf nBlackHole == gravity then
(-- BLACK HOLE REQUIRES GRAVITY SPACE WARP
--BOUNDINGBOX OF BLACK HOLE IN FUMEFX VOCEL SPACE
local p3BlackHoleBoundingBoxStart = ffxWorldPtToVoxel (nBlackHole.pos - [nBlackHole.iconSize,nBlackHole.iconSize,nBlackHole.iconSize])
local p3BlackHoleBoundingBoxEnd = ffxWorldPtToVoxel (nBlackHole.pos + [nBlackHole.iconSize,nBlackHole.iconSize,nBlackHole.iconSize])
for i in 1 to 3 do
(--CLAMP BLACK HOLE BOUNDING BOX TO SIMULATION BOUNDING BOX
local iCurrentMax = case i of
(
1: (nx-1)
2: (ny-1)
3: (nz-1)
)
p3BlackHoleBoundingBoxStart[i] = aMax #(p3BlackHoleBoundingBoxStart[i],0)
p3BlackHoleBoundingBoxEnd[i] = aMin #(p3BlackHoleBoundingBoxEnd[i],iCurrentMax)
)
--REDUCE SMOKE AS IT GETS CLOSER TO THE BLACK HOLE - ATTRACT VELOCITY TO CENTER OF BLACK HOLE
for i in p3BlackHoleBoundingBoxStart.x to p3BlackHoleBoundingBoxEnd.x do
(
for j in p3BlackHoleBoundingBoxStart.y to p3BlackHoleBoundingBoxEnd.y do
(
for k in p3BlackHoleBoundingBoxStart.z to p3BlackHoleBoundingBoxEnd.z do
(
if (GetSmoke i j k) > .001 then
(--THRESHOLD TO AVOID COMPUTATION FOR EMPTY VOXELS
local p3VoxelInWorld = ffxVoxelPtToWorld [i,j,k] --WORLD POSITION OF CURRENT VOXEL
local fFalloff = aMin #(((distance p3VoxelInWorld nBlackHole.pos)/nBlackHole.iconSize), 1.0) --FALLOFF AT CURRENT VOXEL -- 0 AT CENTER, 1 AT RANGE END
local fFalloffWithDecay = pow fFalloff nBlackHole.decay --FALLOFF AT CURRENT VOXEL -- 1 AT CENTER, 0 AT RANGE END -- WITH DECAY
local p3AttractVelocity = (normalize (nBlackHole.pos - p3VoxelInWorld)) * nBlackHole.strength --VELOCITY VECTOR TO BLEND WITH VOXEL'S VELOCITY
if nBlackHole.hoopson then
(--KEEP SPEED DIRECTION WHEN RANGE INDICATORS TAGGED
p3AttractVelocity = p3AttractVelocity*(1-fFalloff) + (GetVel i j k)*fFalloff
)
SetSmoke i j k ((GetSmoke i j k) * fFalloffWithDecay) --REDUCE SMOKE ACCORDING TO DISTANCE TO BLACK HOLE
SetVel i j k ((GetVel i j k)*(1-fFalloff) + p3AttractVelocity*fFalloff) --SET VELOCITY ACCORDING TO DISTANCE TO BLACK HOLE
)
)
)
)
)
)
```

Basically it attracts the smoke and slowly dissipates it at the same time - so no compression and no explosion.

Just a quick hack - not user-friendly or anything.

Requires a gravity node called “FumeFX Black Hole” (just palce it in the scene - do not add to fumeFX sim!).