Memo Posted May 20, 2014 Share Posted May 20, 2014 Hi all, I'm a creative C++ coder playing with Houdini - pretty beginner but with some understanding of what's going on. I've cached a flip simulation as BGEO sequence, and I'm having trouble adding custom attributes to the points which are dependent on initial position of the point in respect to the initial shape. E.g. let's say I want to melt a teapot, and I want to to use different triangulation parameters for the body and the spout. I.e. I want to mark the spout as "bodypart"==1 and the body as "bodypart"==2 and create groups based on that. This I know how to do: 1. Load the teapot in a geo node. 2. Cookie the spout with a simple shape hilighting the spout area, do points from volume, attribcreate and assign 1 for bodypart 3. repeat for other parts etc. 4. create a flip fluid out of these points and solve it 5. cache the resulting simulation as a BGEO sequence 6. load the BGEO seq, and all of my points still have the custom attributes, and I can use those for meshing and various other visualisations. This works perfectly and does exactly what I need. However problem with this, is if I decide to add/change body parts, I need to re-run the flip solver which makes no sense since the bodypart attrib has no effect on the simulation. Doing this attrib create before the flipsolver makes sense for things like color and viscosity, but it doesn't make sense for attributes which don't affect the sim I think. what I would like to do is: 1. Load a mesh and select different parts of that mesh and assign only attributes which are essential to the flip solver (e.g. Cd, viscosity etc). 2. create a flip fluid out of these points and solve it 3. cache the resulting simulation as a BGEO sequence containing only attributes which are essential to the flip solver 4. load the BGEO seq, and assign new attributes, which I will use for meshing and various other visualisations. If I use the same method (i.e. volume intersections) on the BGEO sequence, it understandably applies the volume intersection every frame, and so the attributes are re-applied every frame to the points inside the volume, and don't move with the points. What I really need is something like "at frame 1, do the cookie and attrib creation, and then maintain those attributes throughout the BGEO sequence" but I can't figure out how to do that in Houdini. Any tips welcome! P.S. I have 'reduce' set to off in my flip solver. Quote Link to comment Share on other sites More sharing options...
Skybar Posted May 20, 2014 Share Posted May 20, 2014 You can do it like this: attrPostSolve_dv.hipnc Note that you must enable "Add ID Attribute" on the FLIP Solver -> Particle Motion -> Behavior. That gives each particle a unique ID that is the same throughout the whole sim, even with changing point counts. So that is probably the key to this whole thing. Quote Link to comment Share on other sites More sharing options...
Memo Posted May 20, 2014 Author Share Posted May 20, 2014 doh, I knew there'd be a time node in there somewhere but I just couldn't figure it out So I guess the attribcopy is the crucial thing here (other than the ID), to copy the relevant attributes from the time frozen branch, to the active branch. thanks so much! Quote Link to comment Share on other sites More sharing options...
Skybar Posted May 20, 2014 Share Posted May 20, 2014 doh, I knew there'd be a time node in there somewhere but I just couldn't figure it out So I guess the attribcopy is the crucial thing here (other than the ID), to copy the relevant attributes from the time frozen branch, to the active branch. thanks so much! Exactly, but without the ID the AttribCopy SOP wont find the correct particle again - so they both go hand in hand really. 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.