FunnyName Posted August 3, 2021 Share Posted August 3, 2021 Hello all!, I am trying to create two different flip sims, which should collide with each other. Sim A is a flat tank, with a suction force and some vortex force. Sim B is a simple sphere emitting fluid. I want Sim B fluid to collide with Sim A fluid. Problem is if I do these inside one DOP network, Sim B inherits all the forces attached to Sim A, I am trying to prevent that. Maybe I'm overcomplicating this whole thing. Any ideas on how I can get them to collide with each other? Please refer to the attached hip file. Thank you all for your time. TwistForce.hipnc Quote Link to comment Share on other sites More sharing options...
Atom Posted August 3, 2021 Share Posted August 3, 2021 (edited) Don't use two solvers. Connect the sphere Volume Source to input #4 on the flat tank solver, then extend the flip sim boundary to include that emitter within the domain. Edited August 3, 2021 by Atom 3 Quote Link to comment Share on other sites More sharing options...
FunnyName Posted August 4, 2021 Author Share Posted August 4, 2021 Hey Atom! Thanks a lot for taking the time to help! This setup works, however the problem that I am having with it is that now the emitted particles also have a suction force, and are affected by the vortex force. Is there any way to exclude the falling particles from these forces? Quote Link to comment Share on other sites More sharing options...
Eyeracker Posted August 4, 2021 Share Posted August 4, 2021 Hello FunnyName, Have you tried putting the two different fluid particles into different groups? The only thing is that you have to assign the groups outside of the DOPNET, in the SOPs level. What I'm trying to say is that we assign the flat tank particles with group A and the sphere emitter with group B. Then all particles born in the sphere emitter will, by default, belong to group B inside the DOPNET. Then we can use the group option in the forces node to isolate the forces to act only on that group. So in a sense, you have control over which forces will act on each group. I have attached a screenshot of the group option for your reference: I hope this helps you out. Quote Link to comment Share on other sites More sharing options...
FunnyName Posted August 4, 2021 Author Share Posted August 4, 2021 Hey thanks a lot Eyeracker! That's a neat trick, I didn't know you could create groups in the SOPs level. It solved most of my problem. However, while the other forces do have the option to work on a specific group, the suction force doesn't, or not that I could find. Is there any workaround for it? Thanks again for your help so far Quote Link to comment Share on other sites More sharing options...
Eyeracker Posted August 4, 2021 Share Posted August 4, 2021 (edited) Okay, I think I have a solution. Here is the file: suctionforce_Modified.hipnc I added a group functionality in the code. It's not as versatile as the Houdini group parameter, but it should help you out with the problem you are having. Here is how it works: Type in the groups that you need in the parameter separated by a space. You can type multiple groups or single groups in the slot. If there is more than one group please see to it that it's separated by a space otherwise it won't work. However, if nothing is typed in the group parameter slot, the entire node is turned off. So you need at least one group to make it work. Please note that the normal wildcards and group operations such as "*", "!", "^" etc will not work. So you will have to type the group name exactly as it is. There are more elegant ways of doing this, but that would require a lot of python coding and attaching codes to parameters. Unfortunately, I lack the knowledge to implement those features. So sorry about that. But for the most part, this should work. You can take a look at the code and implement a similar technique for your other nodes which don't have the group functionality; Maybe you can even improve it. I haven't done extensive testing on this, so I'm kind of waiting for your feedback on this. See if this solves the problem. Edited August 4, 2021 by Eyeracker 1 Quote Link to comment Share on other sites More sharing options...
FunnyName Posted August 5, 2021 Author Share Posted August 5, 2021 Hey Eyeracker, Thanks a lot for putting so much effort into helping me! This is great helped my solve my problem. Don't worry about the solution being less elegant, it's all that I need! Again, thank you very much. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.