Jump to content

How to assign attributes to points which are already cached.


Recommended Posts

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. 

 

 
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

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