ganzo Posted May 7, 2011 Share Posted May 7, 2011 I have a small problem I have been unable to solve. I am feeding a group of points (not in group got deleted) that get fed into a pop network. Since the groups contents changes every frame (thus point numbers) I created an attribute to hold the original point numbers called orig_point. So even though the grouped points might have a different point number...they still hold the original point data they came from. I feed this into pops and I am running through the ptnums in vops (for loop)and checking if the current evaluated particle has an orig_point value equivalent to a previous particle (for counter)....and my intention is to delete such a particle if it was born from the same original point. Although thus far I have been unable to do so....any ideas? Quote Link to comment Share on other sites More sharing options...
ganzo Posted May 7, 2011 Author Share Posted May 7, 2011 Oh yeah...here is a sample file. test.hip Quote Link to comment Share on other sites More sharing options...
Macha Posted May 7, 2011 Share Posted May 7, 2011 Can you put this into a sopsolver and create an attribute that stores the availability of the source points? Quote Link to comment Share on other sites More sharing options...
ganzo Posted May 7, 2011 Author Share Posted May 7, 2011 Could you elaborate a bit on that? I honestly have never used sopsolver so wouldnt even know where to start. I wanted to kinda keep a history of the activated points...kind of like how you keep a birthgroup and add to it. Or possibly somehow mark those points as dirty Quote Link to comment Share on other sites More sharing options...
Emanuele Berti Posted May 7, 2011 Share Posted May 7, 2011 If you want to kill the duplicates after they are born... here you can find a Python expression solution: test_python.hip Other solutions, even faster, could be to delete those particles inside your POP network or exclude the points that have already generated particles before entering in POP. Cheers, Emanuele Quote Link to comment Share on other sites More sharing options...
anim Posted May 7, 2011 Share Posted May 7, 2011 here is example with SOP Solver for remembering active points remember_active_sop_solver.hip Quote Link to comment Share on other sites More sharing options...
ganzo Posted May 7, 2011 Author Share Posted May 7, 2011 Other solutions, even faster, could be to delete those particles inside your POP network or exclude the points that have already generated particles before entering in POP. Thanks Emanuele, works like a charm...very helpful indeed, although I wanted to get a more procedural approach to this problem. I actually tried to delete the particles within my pop network, but lets say that at each timestep 10 particles were created...I could only delete the last particle if it was a duplicate..I could not delete the other duplicates. "exclude the points that have already generated particles before entering in POP." I originally tried this, but I could not keep a historical record of the points....how can I add points to a group node the way a pop birth group works? Or some way of keeping a permanent record that does not change over time? Sort of the way your list works in python to feed to the delete? Quote Link to comment Share on other sites More sharing options...
ganzo Posted May 7, 2011 Author Share Posted May 7, 2011 Thanks anim, I guess that is the pre pop approach to delete points that have already been activated. I'm still new to the sop solver node, but from what I am seeing is that it does keep record of things from the previous frame am I right? Could you explain the group nodes inside the sop solver? The first "was active" brings in the data from the previous frame right? And the last "was active" updates the group contents at current frame? Is the "was_active" group the only one that has data being added to at each time step? Sorry, just trying to get my head around this...still new and tutoring is always appreciated Quote Link to comment Share on other sites More sharing options...
Emanuele Berti Posted May 7, 2011 Share Posted May 7, 2011 although I wanted to get a more procedural approach to this problem I thought my solution was totally procedural, even with substeps... Am I wrong? Anyway, the SOP Solver solution from anim works great. Quote Link to comment Share on other sites More sharing options...
ganzo Posted May 7, 2011 Author Share Posted May 7, 2011 I thought my solution was totally procedural, even with substeps... Am I wrong? Ha ha sorry Emanuele, did not mean it that way I meant it more of staying with what I could do just with nodes and not go into python. Although I must admit that your solution has given me new insight of what I can accomplish with python in houdini. I had used it for basic channel exports and such, but this really expands my options in the future..so thanks for that! Quote Link to comment Share on other sites More sharing options...
anim Posted May 7, 2011 Share Posted May 7, 2011 a little explanation of nodes inside SOP Solver object_merge_points - just brings live geometry in, nothing simulated, it contains your "active" group (with 0 or more points) dop_geometry - brings previous frame geometry from DOPs (default node in SOP Solver) groupcopy_was_active - copies "was_active" group to live geometry group_source - substracts "was_active" from "active" (so that no points that were active in the past could be used again) and stores it in new "source" group, because we will need "active" group later group_was_active - appends "active" group to "was_active" so it can be used in the next frame (timestep) it is then read again through dop_geometry node and copied to live geometry and so on Quote Link to comment Share on other sites More sharing options...
ganzo Posted May 8, 2011 Author Share Posted May 8, 2011 Thanks for explaining it anim. Got a much better grasp on the way sop solver functions. Seems this is one of the few ways to keep history on attributes. Cool stuff....thanks guys! Quote Link to comment Share on other sites More sharing options...
anim Posted May 8, 2011 Share Posted May 8, 2011 ... Seems this is one of the few ways to keep history on attributes. ... every technique in Houdini is one of a few, here are the others you can use for that (and maybe I am missing some): SOP Solver DOP has the advantage that the result can be automatically cached into memory and it can be multithreaded to some extend if you use VOPs inside, but I am not sure how much speed you can get since Object Merge SOP is probably singlethreaded POPs are great way of keeping history too, so you can fly it through POPs before using the result in another POP network almost the same way as through SOP Solver (and you can use VOPs too to speed things up) You can also use CHOPs to accumulate attribute over time and do some magic inside which is not possible in frame by frame accumulators, since in CHOPs you can work with the whole animation curve at once There is also Feedback SOP, currently unsupported, but you can install it through protoinstall and I find it very useful sometimes and of course the old-school method by writing geometry to disk and reading back the previous file from disk next step it may be not used very often in SOPs nowadays, but this is invaluable in COPs Quote Link to comment Share on other sites More sharing options...
ganzo Posted May 8, 2011 Author Share Posted May 8, 2011 Oooooh....more knowledge to soak up. Awesome! So in pops you can create an attribute and accumulate with the result of the past frame? similar to what was being done inside sop solver? Quote Link to comment Share on other sites More sharing options...
anim Posted May 8, 2011 Share Posted May 8, 2011 sure, as long as particle lives, it can accumulate anything you want but for this example it was easier in SOP Solver 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.