Annon Posted February 13, 2012 Share Posted February 13, 2012 Or something like the title suggests 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 Quote Link to comment Share on other sites More sharing options...
asnowcappedromance Posted February 13, 2012 Share Posted February 13, 2012 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 Quote Link to comment Share on other sites More sharing options...
Annon Posted February 13, 2012 Author Share Posted February 13, 2012 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 Quote Link to comment Share on other sites More sharing options...
asnowcappedromance Posted February 13, 2012 Share Posted February 13, 2012 alright, then you want to use a SOP Solver to do that. Check out the example file "denting with pops" that comes shipped with Houdini, that should give you an idea of how to grab the impact data in SOPs with the dopfield expression. Quote Link to comment Share on other sites More sharing options...
Macha Posted February 13, 2012 Share Posted February 13, 2012 I think that since H11 there's even a default impact subnet inside the sopsolver to get you started. Quote Link to comment Share on other sites More sharing options...
Annon Posted February 14, 2012 Author Share Posted February 14, 2012 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! Looking forward to some more fun on your vimeo page btw... Later Christian Quote Link to comment Share on other sites More sharing options...
Annon Posted February 14, 2012 Author Share Posted February 14, 2012 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 Quote Link to comment Share on other sites More sharing options...
anim Posted February 14, 2012 Share Posted February 14, 2012 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 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.