Jump to content

Mixing fluid objects with different properties


Arpita

Recommended Posts

Hi.

I am fairly new to fluids and am facing a challenge in a project that I'm mid way through.

- I wanted to know the way to get two separate particle fluid objects in the same dop network to interact with eachother.

- I also wanted to know how to make groups from the fluid object in the DOP network (with respect to the way the geometry was grouped in the SOP level)?

This is because I may want to have some objects have different particle separation or other properties from the rest. Also if I want to have some field forces to affect just one of them.

When I try use two separate particle fluid objects and just merge them and solve, they slide/pass through each other without really interacting or affecting one other. I would like to know what knowledge I'm missing here.

Thank you in advance for any guidance.

Link to comment
Share on other sites

Hey Arpita,

I just made a really simple example of 2 particle fluids colliding : pfluid_interract.hipnc

All done from the shelf tools so nothing fancy at all.

Just had to plug the 2 fluids and their respective pop nets in one solver which makes sense I think...

That should answer at least one question ...

Hi.

I am fairly new to fluids and am facing a challenge in a project that I'm mid way through.

- I wanted to know the way to get two separate particle fluid objects in the same dop network to interact with eachother.

- I also wanted to know how to make groups from the fluid object in the DOP network (with respect to the way the geometry was grouped in the SOP level)?

This is because I may want to have some objects have different particle separation or other properties from the rest. Also if I want to have some field forces to affect just one of them.

When I try use two separate particle fluid objects and just merge them and solve, they slide/pass through each other without really interacting or affecting one other. I would like to know what knowledge I'm missing here.

Thank you in advance for any guidance.

Link to comment
Share on other sites

Hey Arpita,

I just made a really simple example of 2 particle fluids colliding : pfluid_interract.hipnc

All done from the shelf tools so nothing fancy at all.

Just had to plug the 2 fluids and their respective pop nets in one solver which makes sense I think...

That should answer at least one question ...

Hey Julien.

Thanks so much for the quick reply. However, I am not sure if I'm clear yet :(

Please have a look at the attached file. I have just modified your file a bit, to give less friction to the gound plane and taken off the x and y vel from the diving sphere fluid object.

In the file, Example 1 has the two spheres as different fluid objects (from your example), and example 2 is identical to it in every way, except that both the spheres have been merged together to make one fluid object. I have also turned on the display for the particle fluid surface to show what my trouble is. The one from example one seems like the separate fluids have just been superimposed. However in the the second one, they seem to be advecting (I am not sure if its the right word) or deforming and affecting each other.

I was wanting to understand this, because I want to give different properties to these two mixing liquids and make them mix naturally. Hope my question makes sense :unsure:

Thanks so much.

pfluid_interact2.hipnc

Link to comment
Share on other sites

Ooops sorry it doesn't seem to work too well ...

:huh:

I tried again using groups in SOPs and using those with $OBJID in DOPs, that's better. ;)

That's more what you want to do I guess ( groups and different fluid properties from each one )

pfluid_interact3.hipnc

You can do an attribute transfer (like I did) for other attributes but that's "a bit" dirty.

There must be a way of getting attributes from SOPS to DOPS to SOPS - I'll look into that ...

Hey Julien.

Thanks so much for the quick reply. However, I am not sure if I'm clear yet :(

Please have a look at the attached file. I have just modified your file a bit, to give less friction to the gound plane and taken off the x and y vel from the diving sphere fluid object.

In the file, Example 1 has the two spheres as different fluid objects (from your example), and example 2 is identical to it in every way, except that both the spheres have been merged together to make one fluid object. I have also turned on the display for the particle fluid surface to show what my trouble is. The one from example one seems like the separate fluids have just been superimposed. However in the the second one, they seem to be advecting (I am not sure if its the right word) or deforming and affecting each other.

I was wanting to understand this, because I want to give different properties to these two mixing liquids and make them mix naturally. Hope my question makes sense :unsure:

Thanks so much.

Link to comment
Share on other sites

Ooops sorry it doesn't seem to work too well ...

:huh:

I tried again using groups in SOPs and using those with $OBJID in DOPs, that's better. ;)

That's more what you want to do I guess ( groups and different fluid properties from each one )

pfluid_interact3.hipnc

You can do an attribute transfer (like I did) for other attributes but that's "a bit" dirty.

There must be a way of getting attributes from SOPS to DOPS to SOPS - I'll look into that ...

Thanks once again Julien. Unfortunately, I'm still not clear :( I have seen the grouping in the SOP level, but do not understand how you have used these groups with $OBJID in the DOPs, how you have differentiated between the spheres. I haven't used $OBJID before, but as I observe from the details view, there is just one fluid object, hence OBJID=1. If that is the case, I do not understand how the if statements between $OBJID=0 and not0 work.

When I used the if ($OBJID ==0, 0.1, 0.05) for the particle separation, both the spheres take the same values.

The two main tasks I am facing trouble with are:

- Two liquids having different particle separation interacting and advecting eachother.

- A field force (for ex:wind force) affecting only one of the above liquids in the simulation. The force DOPs seem to function based on groups. So I do not know how to the isolate the different geometry of the fluids into groups.

And you were talking about getting attributes from sops to dops to sops. Something similar is actually there on the Fluids tutorials on Sidefx.com http://www.sidefx.com/index.php?option=com_content&task=view&id=1301&Itemid=262 (Tutorial No.14). And the file to that is attached here. Wondering if this principle could help me with my task as well.

Hope am not taking too much of your time :-s Thank you

Diffuse.hip

Edited by Arpita
Link to comment
Share on other sites

The $OBJID and the groups in SOP where things I tried but don't work in the end. <_<

you can query sop attributes from dops with a point expression as such : point("/obj/geo",pointnum,attribute,attribute_component)

But that doesn't solve anything since you can't set attributes on a per point basis in Dops, and no groups either.

Just remember you are in DOPS, not SOPS.

What kind of effects are you trying to achieve ?

[quote name=Arpita' date='05 January 2010 - 10:36 PM' timestamp='1262731009' po

st='67792]

Thanks once again Julien. Unfortunately, I'm still not clear :( I have seen the grouping in the SOP level, but do not understand how you have used these groups with $OBJID in the DOPs, how you have differentiated between the spheres. I haven't used $OBJID before, but as I observe from the details view, there is just one fluid object, hence OBJID=1. If that is the case, I do not understand how the if statements between $OBJID=0 and not0 work.

When I used the if ($OBJID ==0, 0.1, 0.05) for the particle separation, both the spheres take the same values.

The two main tasks I am facing trouble with are:

- Two liquids having different particle separation interacting and advecting eachother.

- A field force (for ex:wind force) affecting only one of the above liquids in the simulation. The force DOPs seem to function based on groups. So I do not know how to the isolate the different geometry of the fluids into groups.

And you were talking about getting attributes from sops to dops to sops. Something similar is actually there on the Fluids tutorials on Sidefx.com http://www.sidefx.com/index.php?option=com_content&task=view&id=1301&Itemid=262 (Tutorial No.14). And the file to that is attached here. Wondering if this principle could help me with my task as well.

Hope am not taking too much of your time :-s Thank you

Link to comment
Share on other sites

The $OBJID and the groups in SOP where things I tried but don't work in the end. <_<

you can query sop attributes from dops with a point expression as such : point("/obj/geo",pointnum,attribute,attribute_component)

But that doesn't solve anything since you can't set attributes on a per point basis in Dops, and no groups either.

Just remember you are in DOPS, not SOPS.

What kind of effects are you trying to achieve ?

Thank you Julien.

I have attached a basic .hip file to show you the problem I am facing. Also attached the video reference of what exactly I am trying to achieve in this shot of my project. I have got most of it under control, except for the movement of the big puddle.

I have centred the metaball used for the magnet force, at the near end of the big puddle so the smaller ones can move towards it. And smaller puddles are moving towards the big one alright. But, I do not want the bigger puddle to be affected by or respond to the magnet force.

I referred to the mercury man tutorial on the houdini exchange. But in that, he places the metaball in the centre so the puddles from all directions move towards it. And in my shot, I want to centre it at an already existing puddle so that the other smaller ones can move towards it. I do not know how to do it a way that the existing puddle doesn't move and respond to the magnet force.

And as I said earlier, if I used them both as two different fluid objects, I can restrict the bigger one from being affected by the magnet force, but then these two fluid objects do not really advect or mix with eachother. I don't know if there would be a different approach to achieving this affect, or another solution... Or maybe there is some microsolver that makes two different fluid objects mix...? :unsure:

Secondary to that is, if I want to give a different particle separation to the smaller puddles from the bigger one. After going into the fluid object>particle_configure_object>convert_to_particles, I see that the particle separation is ch.referred to the create 'points from volume' sop. I tried to make groups of the incoming geometry and then change the points from volume in the DOP SOP, with some expression referring to those groups, but couln't get very far there either.

I hope my explanation is clear. Thank you very much. I would really appreciate any kind of help or guidance.

video_2.mov

test_1.rar

Link to comment
Share on other sites

I didn't look at your file yet, but I tried something with a sop solver.

Have a look at the attached file : simplefluidsopsolver.hipnc

You can also mix this system with Peter's crowd behavior to control the interaction between the points :

have a look here :

it's particle_fight_04.hip

Thanks a bunch Julien! :) I am working on it. Will show you the final results!

Thanks again for the help. :)

Link to comment
Share on other sites

Thanks a bunch Julien! :) I am working on it. Will show you the final results!

Thanks again for the help. :)

Hey! Check this out.. My first test for this shot. Ended up using 2 different fluid objects finally. Got them to interact in the SOP level using metaballs.. And the ripples for the dynamics. Basically a combination of a couple of things we discussed. Not there yet, but yeah.. What do you think?

v1.mov

Link to comment
Share on other sites

Very nice, it works really well !

I think the ripples are a bit fast and the overall is very dark but very good

I guess it doesn't matter how you do it as long as it looks good :)

can't wait to see what comes out of the liquid :D

Hey! Check this out.. My first test for this shot. Ended up using 2 different fluid objects finally. Got them to interact in the SOP level using metaballs.. And the ripples for the dynamics. Basically a combination of a couple of things we discussed. Not there yet, but yeah.. What do you think?

Link to comment
Share on other sites

Very nice, it works really well !

I think the ripples are a bit fast and the overall is very dark but very good

I guess it doesn't matter how you do it as long as it looks good :)

can't wait to see what comes out of the liquid :D

Thanks Julien :) Yeah, I do still have a couple of things to take care of ...

Will keep you posted :)

PS: What emerges from it is nothing espectaculo :P Cos mainly focusing on the technique.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...