Jump to content

DOP Fluid Impact Data Per Point Attribute


Annon

Recommended Posts

Or something like the title suggests :lol:

I have a SPH fluid hitting a collision object, when it collides I want to store an attribute on the point, say "hasImpacted" that I can later use in a pointSOP to color it. Really I'm going to use this in the DOPPOP for some funky stuff.

Currently I have only worked out how to store an attribute per object, I want per particle.

Any ideas?

Thanks

Christian

Link to comment
Share on other sites

You should dive inside your POP Solver (which gives you control about the sph particles) and create a collision POP.

This way you can easily store attributes (there are presets), i.e. the numhit attribute (number of collided times),

you can store the hit id, hit position, hit normal usw, very helpful over all.

cheers,

Manu

Link to comment
Share on other sites

Well I'd rather use DOP Collisions seeing as they're volume based and not geometry based. I have the impact data, just need to copy that to a point attribute or something.

Thanks for your suggestion non the less.

Anyone else?

Christian

Link to comment
Share on other sites

Thanks guys, I quickly checked out the denting example, I've looked at it before, but didn't think of it when trying to accomplish this.

I'll have a proper look at it tomorrow and post a scene if I get it working for others that are after something similar.

Macha, can I have a direct connection to the Houdini part of your brain please! :blink:

Looking forward to some more fun on your vimeo page btw...

Later

Christian

Link to comment
Share on other sites

Ok I had a quick go this morning and can get it working with an expression in a point node to get the max of $CR based on impact across the timerange.

I can't however do the same thing based on a custom point attribute. I think it might be something to do with local variables, for instance this will kind of work:

max(opinputpath(".", 0), $PT, "impact", 0), $IMPACT2)

But this wont:

max($IMPACT, $IMPACT2)

Neither however will preserve the max attribute across the timerange (except doing it with color).

Anyone mind having a quick look to see if I've missed something? There's a switch in the SOPDOP to switch between the working color way and the faulty attribute way.

Thanks

Christian

cjw_impactTest_v001.hip

Link to comment
Share on other sites

it seems that your variable is not transfered to dops, that's expected

so just append attribCreate before left input of point_attribute node

and just fill in the name 'impact' and un-check Write Values, so that the attriCreate will just initialize the IMPACT variable which then can be used downstream

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