Are Bifrost Collision With Other Dynamic Objects Possible?

Are Bifrost Collision With Other Dynamic Objects Possible?

InNeedOfHelp
Advocate Advocate
4,664 Views
8 Replies
Message 1 of 9

Are Bifrost Collision With Other Dynamic Objects Possible?

InNeedOfHelp
Advocate
Advocate

I have a scene where a jet of water sprays through a window into a room with a bunch of objects. I used bifrost to simulate the water jet and having it collide with the objects in the room is straight forward enough but I'm also wanting the objects to get pushed around and float in the liquid as the room starts to fill up. After searching around a little I haven't been able to find a way to do this, is it possible for bifrost to interact with other dynamic objects like ncloths/rigid bodies/particles etc.?

Accepted solutions (1)
4,665 Views
8 Replies
Replies (8)
Message 2 of 9

teddude75
Collaborator
Collaborator
Accepted solution

Tricky, tricky, tricky, yeah you can use ncloth with Bifrost. It's probably not physically accurate and using Bifrost this way may give you unexpected results. First all tell how to do it the safe way. I would cache out your Bifrost mesh and import it as an alembic and make that an ncloth. Then, all the colliding objects would be ncloth also (not passive). In the colliding objects set there mass to something realistic. Now this is the problem with that method, it's not interacting with the Bifrost water. So, we need two different simulation (ncloth and Bifrost) to simulate at the same time and interact with each other. Ok, once your Bifrost mesh looks good, select it and make it an ncloth and select all your colliding objects (objects that the water would effect) and make those ncloth. Get that set up for the ncloth objects that they react to bifrost mesh. Once the simulation of the ncloth (not the Bifrost sim) object looks good and move correctly (like a hard object), than copy each object and apply a wrap deformer to each. ie wrap a copy glass object to the ncloth glass object. This is were the Bifrost come in. That wrap deformer will follow the ncloth and that can be a collider for Bifrost. Just select the bifrost liquid and the wrapped object  and add a collider.  It works, I tested it, and get both simulation working together and there might be a better way. But I hope I helped

TED

Message 3 of 9

InNeedOfHelp
Advocate
Advocate

Hey thanks for the suggestion, I gave it a try and got decent results. Going off what you said I tried a couple other things and came up with a solution that I think looks really convincing. So for anyone else trying to do this the process goes something like this

Setting up the liquid:

*Setup your bifrost sim

*disable bifrost scratch cache and background processing

*convert the bifrost particles to nparticles (I used a plugin from soupdev to do this)

*disable collisions on the particles and enable force field generation

*(optional but for a more accurate sim) create a runtime expression for "pointFieldScalePP" and set it equal to the magnitude of the particles velocity vector

 

Setting up the objects you want the liquid to interact with

*duplicate the object

*make the original an ncloth and then wrap deform the duplicate to the ncloth

*make the duplicate a bifrost collider

 

Once you have all that set up you'll just need to tweak the the point field magnitude and point field distance attributes in the nparticle shape until you get the results you want.

And if you're trying to sim an object in a pool of bifrost water you'll need to add a gravity field pushing up to act as buoyancy and a drag field to act as water resistance. And you'll want to make sure the area of influence for these fields are restricted to the body of water.

 

 

0 Likes
Message 4 of 9

teddude75
Collaborator
Collaborator

Awesome you got it working. It looks really good. I haven't heard of soup's Bifrost to nparticles.  Is it open vbd or another node? I've been trying to do wet maps for Bifrost (not camera projection) and I was able to get it to work with nparticle but not Bifrost. So if I can convert the Bifrost to particle than I might be able to do it. Or even if you have any ideas let me know.

TED

0 Likes
Message 5 of 9

InNeedOfHelp
Advocate
Advocate

Thanks, and yeah it's one of the OVDB nodes called bifrosttoarray, or bifrostfiletoarray if you want to used a bif cache. Then you just need to make two connections from that node to your nParticleShape, and those are:

 

Out Dynamic Array -> Cache Array Data

Out Position -> Positions

 

Hope this helps.

0 Likes
Message 6 of 9

nourdeen
Explorer
Explorer

I am sick of workarounds in Maya. But thank you for the amazing suggestion.

0 Likes
Message 7 of 9

sepu6
Advisor
Advisor

Use the Bifrost Graph if you do not want work arounds. The system is more unified in the graph and easier to do stuff and solve.

0 Likes
Message 8 of 9

nourdeen
Explorer
Explorer
Do you have a tutorial i can follow?
0 Likes
Message 9 of 9

sepu6
Advisor
Advisor

on what exactly @nourdeen ? 

If you check the solvers in Bifrost they all look basically the same. So just interacting between them is a lot easier. 

Now obviously depending what you want to do you might have to use different techniques to accomplish the task ahead.  MPM can interact with all the different sources since is a multi solver. You can also make particles or aero work with the rest or vice versa. 

 

I would recommend going through the Bifrost Bootcamp if you are new.

 

Screenshot 2024-08-24 at 18.16.40.png

0 Likes