Sim as collider

Hi all,

I just tried to use one sim as a collider to another to have a smoke stream push into another, but it doesn’t seem to do much. Probably user error or maybe I have to cache the collision branch first?
This is what I did:

Cheers,
frank

Hi Frank!
That doesn’t work to my knowledge, a collider must be an SDF from my experience, there may be a way though…

However, this setup does work, and is probably what you want in most cases for gaseous volumes. I’m reading the velocity channel back into an emitter guide(strong) and into velocity of the other element. Alternatively you could have the fields in the same element setup/emitter, depends on how different they are sim-wise I guess.

image

Script linked here.

Hope that helps.
MattB

cool, thanks, will have a look at this soon

1 Like

Hi Frank,

yes Matt is right, you need an isosurface to collide and it doesn’t have to be a signed distance function per se.

you can try to add a negative constant value from the density channel, to essentially extract an iso surface ( the interface is where the value goes from positive -> negative ).
make sure you enable iso surface viewing in the merge node that does the add of the negative value.
then use this node instead of the density channel directly. the smoothness of the iso surface really depends on the value range of your input density and works best if you have some value ranges and a smoother gradient of the values.

cheers,
Christoph

Hi frank,

i forgot one thing last night. you’ll have to flip the sign around after the subtraction.
so add another merge node and mult it by -1, to correct the normals.
i haven’t had a chance to try it, but let me know if you get stuck and I’ll set it up for you.

Cheers,
Christoph

Thanks Christoph,

I will play with this some more hopefully on the weekend (if the current
deadline allows). I’d really like to understand this in detail.

Cheers,
frank

I will definitely have a go at this, thank you