chaindriver Posted January 2, 2013 Share Posted January 2, 2013 (edited) Hi, I'm trying to create the v attribute for my points using a Trail SOP. The problem is that the points are deleted and generated, so the point numbers are not the same, and the Trail SOP seems to be using the point numbers. Is there a Trail SOP that matches based on id? I do have an id attribute per point though. I'm currently using foreach and timeshift SOPs to match points in the previous frame using id, and then calculating the velocity from the positions. This is however very slow. Does anyone have any better ideas? Edited January 2, 2013 by chaindriver Quote Link to comment Share on other sites More sharing options...
anim Posted January 2, 2013 Share Posted January 2, 2013 you can use point SOP for that, it has Match By Attribute Mode you just need to be careful when the particle is about to die on next frame to set v to 0 or maybe get v from previous frame here is simple example recompute_v_on_particles.hip Quote Link to comment Share on other sites More sharing options...
breadbox Posted January 2, 2013 Share Posted January 2, 2013 (edited) I think you can do with a trail sop, set to compute velocity? also I think you can also sort points based on ID. check the expression in the sort sop. point("../NULL1", $PT, id, 0) I think you potentially will still get changing point numbers as the particles die. but if you have random point numbers on every frame this might make them more stable. actually this method doesn't work. I see the problem now. even with a sort expression, point numbers change when particles die. Edited January 2, 2013 by breadbox Quote Link to comment Share on other sites More sharing options...
chaindriver Posted January 3, 2013 Author Share Posted January 3, 2013 you can use point SOP for that, it has Match By Attribute Mode you just need to be careful when the particle is about to die on next frame to set v to 0 or maybe get v from previous frame here is simple example Very elegant solution, Tomas. Thanks so much for the hip file, it helped me a lot! 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.