Jump to content

RBD to FLIP, delete piece after feeding it to FLIP


Farmfield

Recommended Posts

So I did this simple setup, basically using the shelf tools and some modding, feeding pieces out of a RBD sim into FLIP, but I can't figure out a simple way to only feed in each piece once. I guess I could add each added piece name to an array and do a foreach, then deleting any piece in that array - but there just gotta be a simpler way, right?

And this is such a "Houdini-problem", you think it would be easy but the only solution you can come up with is something overly complicated. :D

 

 

rbd_to_flip.v1.hiplc

Link to comment
Share on other sites

I may be confused on what you are wanting here but from looking at your file, you just want to push the rbd pieces into one flip simulation with each piece being one body of fluid? If so, all you have to do is just add a points from volume before your OUT_FLIP and just change the particle separation as you need to. On your flipfluidobect1, change the input type to particle field and you will have points for each piece. Granted, this can get heavy if you have alot of pieces so, you have some limitations to this. Attached is what I got...

rbd_to_flip.v1_RB.hiplc

Link to comment
Share on other sites

As it works now, the pieces are fed in on every fame, I want them fed in once, then delete them or any other way that won't continue feeding them into the FLIP sim.

But I'll check the file, either you did that or not. ;)

Edit: LOL, no, I dunno what you did, really, other than move the point creation form the SOP solver to the SOP, it still feeds the pieces into the FLIP sim continuously. :D

Though I think I might have come up with one just this instant - hmm, lets test creating an age and deleting them from that. :)

Edited by Farmfield
Link to comment
Share on other sites

From the setup you were deleting based on P.y so, I just assumed you were going for a rbd morphing into a flip thing and were going to blend shape them together? I am guessing that you mean you want each piece to initialize the flip fluid on the first frame and then delete its source after that?

Link to comment
Share on other sites

Exactly, I just want to add the piece-points to the flip once, then delete the piece - or something to that effect.

Worst case scenario, I'll have to do that array thingy, but there just gotta be a simpler way than doing a per piece lookup in VEX for solving this, I know there's something simple I'm missing.

Edit: Also kinda confused why I would use blend shapes..? It's already turning to FLIP, it's just doing it too many times per piece, so to speak. ;) 

Edited by Farmfield
Link to comment
Share on other sites

Hehe, I just put this thing together due to a question in another thread here at ODF, but I couldn't figure out a good solution for feeding each piece into FLIP just once - and I'm doing other Houdini work - like actual work :D - so I can't let that go and figure this out right now. I'll see if I get more time tomorrow and see if I can figure it out - and I'm talking about a simple solution, I already know a complicated one but for doing this type of stuff, helping people here or the files I put on Vimeo, the goal is to simplify it to the max.

Link to comment
Share on other sites

I created this setup for this guy, but I kinda got stuck with this issue...

@Pavel

You confused the shit out of me with that one - I know what you did, does, if I look at it on a per node basis, so to speak - but I don't get how the data flows. :blink:

Well, I'll break it down and figure it out I hope. Damn, Houdini (and this forum) is really good at making me feel really dumb. :D

Edited by Farmfield
Link to comment
Share on other sites

I'ts the same flow of data you used, I only added another Geometry data to flip object to store used pieces.

I just realized, that you already store pieces in Geometry data anyway, so you can go even simpler...just add name attribute to /obj/torus/unpack1 and check for name attribute in /obj/FLIP_SIM/sopsolver1/attribwrangle2

This will work only if you don't erase pieces from flip object Geometry data, so be careful!

rbd_to_flip.v1_FIX2.hiplc.hipnc

Edited by rayman
Link to comment
Share on other sites

Naeh, I mean data flow like in the execution order, I still haven't really got my head around that fully in regard to Houdini DOPs - though my main battle with it has been in POPs with groups and streams, not in RBD, Pyro or FLIP. (until now)

Looking at your mod of my setup, it's just over my head, and I think it's due to the above. Let's just take your piecesData->OUT_PCDATA chain in the torus SOP network. I don't understand what you are fetching from the OUT_PCDATA and/or if (and where?) you feed something from DOPs back into the piecesData. And you say you are storing pieces in the SOP geometry node? My best guess is you are importing the reference of the pieces from the torus, comparing if they already exist in the SOP solver, and if so deleting them..?

And wow, I'm really not used to feeling this stupid. I have a close friend who's a Ph.D in particle physicis and we can talk quantum field theory without me feeling as lost as you usually make me feel. :D

Edited by Farmfield
Link to comment
Share on other sites

Well,if you play a bit more with DOPS you'll find that it's not that complicated.

Data is usually processed left to right,top to bottom and if there are multiple multi solvers/merge nodes , you have to dive inside assets to find the order of execution. I think they messed it up a bit with "new" POPs, making it a bit more confusing, but if you check inside pop nodes there is usually  merge node inside them, so data is still flowing the same way.

In this particular case I'm attaching SOP data to flip object and it is computed only once in DOPS ,when the object is created. I'm importing it from SOPs instead of leaving it completely empty, only because I want the "name" attribute to be present at the begining. Thats the whole reason for  piecesData->OUT_PCDATA nodes - they are here only for initialization and are not used during the simulation. I think you can also uncheck Use External SOP and put the piecesData->OUT_PCDATA nodes inside InitPiecesData node.

Then after new points/pieces are added to flip I check this data (PiecesData) and if new piece is added to sim and not previously present , I add new point with the name of the new piece (updatePiecesData node) to PiecesData . So during the next iteration if some pieces are previously sourced inside flip, I delete them before merge them to the flip sim (/obj/FLIP_SIM/sopsolver1/attribwrangle2).

As you can see its not that complex, still second file is much more easier to understand as it is basically the same thing, but instead of creating new data to store the pieces I just use the default Geometry data.

Link to comment
Share on other sites

Hehe, like I haven't played with DOPs over these 1-1/2 years I've been using Houdini... ;) I think I'm somehow over-complicating it and that I at some point will have a serious DUH moment realizing how stupid I have been - but for some reason I haven't got there yet. It's probably because I got into Houdini just as the new POPs where introduced and spent a lot of time trying to figure them out, replicating setups I had done in TP, etc. - it scrambled my head in regard to DOPs in general. And it's not like I can't do a lot in DOPs, it's just that I don't get how the data flows through the system so when I run into something like this, it becomes a trial and error type situation.

Well, I do get most of your first setup now, I get what it does and how, so perhaps if I break it down further I'll get a clearer picture of how the data flows and perhaps I'll have that DUH moment. I haven't checked your second file yet but I will as soon as I post this reply. :)

Link to comment
Share on other sites

Hmm, the second file works in regard to killing the duplicate geo's, but it also feeds geometry into the flip solver, trying to figure out the point rasterizing now but not having much luck.

I think the whole idea of doing any of that step in DOPs is a miscalculation from my side, if you set this up in a solver on the incoming (unpacked) pieces, then unpack and rasterize to points, you only feed in the points in a SOP solver. 

LOL, how the hell did this turn out to be complicated?

Link to comment
Share on other sites

Well, I'm pretty satisfied with the simplicity of it - and I knew there was a simple solution, the complicated part was figuring it out.  

And I guess now it's time to do it the other way around in some fun way - water to ice to breakage perhaps? :D

 

 

Link to comment
Share on other sites

Tnx, but the solution was in your work, I just shuffled it into the very beginning of the transfer. And it's very similar to the solution I thought of first, that is adding name or ID into an array and doing a foreach, iterating over it, comparing if a piece is used or not.

And I appreciate all help and input, I learned more from looking through the posted files here than I did solving the actual problem. So much appreciated. :D

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...