Sead Posted December 17 Share Posted December 17 (edited) Hi, All. I was trying to do a growth animation, Paths was using findshortestpath node to generate, animation driven by carve node. But after I dissolved all those overlapping paths, animation from carve node changed together. The main goal is maintain the carve node animation after I dissolved all those overlapping paths. I have tried some methods down below: attatch carve node before I get rid of those overlapping paths, create an attribute to save those points position. and then put a point wrangle after I get rid of those overlapping paths to transfer P attribute. (it will appear some lines connect to points in the beginning of animation, I dont know if my problem) attatch first carve node before I get rid of those overlapping paths, then create a point attribute, and transfer it after I dissolved all those overlapping paths, and use second carve node to pick up that attribute. (Because that attribute based on point, So when they travel through the position that between points will cause lag, like skip frames did.) I use carve node instead of clip node is because I need the first points actual moving, So I can pick up their Velocities to render motionblur. Any ideas? Match_Carve.hip Edited December 17 by Sead Quote Link to comment Share on other sites More sharing options...
hannes603 Posted December 18 Share Posted December 18 untitled.mp4 maybe that helps you for the carving. cheers cost_simple.hip Quote Link to comment Share on other sites More sharing options...
Sead Posted Thursday at 02:17 AM Author Share Posted Thursday at 02:17 AM (edited) 7 hours ago, hannes603 said: untitled.mp4 51.11 kB · 0 downloads maybe that helps you for the carving. cheers cost_simple.hip 215.3 kB · 0 downloads Hi, Hanne. Thank you for reply. unfortunately, This is not what I after it. They might seem like the same, But they are not. Your result was when one path had grown, and another starts. What I after it more like, The others start to growth When the first one came by. Edited Thursday at 02:28 AM by Sead Quote Link to comment Share on other sites More sharing options...
hannes603 Posted Thursday at 10:52 AM Share Posted Thursday at 10:52 AM (edited) 8 hours ago, Sead said: Hi, Hanne. Thank you for reply. unfortunately, This is not what I after it. They might seem like the same, But they are not. Your result was when one path had grown, and another starts. What I after it more like, The others start to growth When the first one came by. you can simply but an offset or a noise to the cost attribute or use the meta data from the loop to change the timing and randomise like in the example below untitled.mp4 growth_carve_random_for_each.hip Edited Thursday at 11:09 AM by hannes603 Quote Link to comment Share on other sites More sharing options...
Sead Posted Thursday at 04:47 PM Author Share Posted Thursday at 04:47 PM 5 hours ago, hannes603 said: you can simply but an offset or a noise to the cost attribute or use the meta data from the loop to change the timing and randomise like in the example below untitled.mp4 growth_carve_random_for_each.hip 224.4 kB · 2 downloads Paths overlapping, I am new in houdini here, can you combine them in my .hip? Quote Link to comment Share on other sites More sharing options...
hannes603 Posted Thursday at 05:19 PM Share Posted Thursday at 05:19 PM rand_carve_with_cost_foreach.hip Quote Link to comment Share on other sites More sharing options...
Sead Posted Friday at 06:04 PM Author Share Posted Friday at 06:04 PM (edited) On 12/20/2024 at 1:19 AM, hannes603 said: rand_carve_with_cost_foreach.hip 321.94 kB · 3 downloads Thank you for reply. But this setup seems like quite heavy in my scene, Is another way could do it? I am thinking, is it possible to set an attribute that reference original carve node animation. (in this case which is "Second U" of original carve node) and then group all those longest paths, they start the animation first, then calculate their distance to not equal longest path group, (main goal is let others paths know longest paths have came) When the distance less to a value, and that attribute starts to kick in, and then use this attribute to drive Second Carve Node? I have done the group longest paths part, And i don't know how to do it next. mostly don't know is it possible? Anyway, Thank you for the help also, And I would like you to use my .hip file to the next step if not bother. Match_Carve_v2.hip Edited Friday at 06:06 PM by Sead Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted Saturday at 12:17 AM Share Posted Saturday at 12:17 AM (edited) You can probably try to capture the u position of the parent prim using xyzdist() limiting to the Prim_ID you have defined. Once you have the u-parameter from the start and end point you can use the fit function (to fit them to 0-1). Match_Carve_mod.hipnc Edited Saturday at 12:18 AM by Aizatulin 2 Quote Link to comment Share on other sites More sharing options...
Sead Posted Sunday at 04:39 AM Author Share Posted Sunday at 04:39 AM (edited) On 12/21/2024 at 8:17 AM, Aizatulin said: You can probably try to capture the u position of the parent prim using xyzdist() limiting to the Prim_ID you have defined. Once you have the u-parameter from the start and end point you can use the fit function (to fit them to 0-1). Match_Carve_mod.hipnc 199.79 kB · 2 downloads Hi, Aizatulin, Thanks for replying. Your method seems like worked, I don't know how you do it, I had tried this before, But not with xyzdist(). More like capture the points positions and transfer it to another. But situation in carve node is a bit complex, Because the ptnum will change, At the beginning ptnum was 0, Over time it became to growth.. and if you try to transfer positions to them, at the beginning there is nobody home. Edited Sunday at 06:36 AM by Sead Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted Sunday at 08:09 AM Share Posted Sunday at 08:09 AM Sure :-) I would prefer xyzdist() for this over attribute transfer, because you can limit the search to a subset of primitives (especially for this case one primitive, because you already know the prim id) and you gain access to the intrinsic uv value, which gives you the parametric position of the closest point on the primitive. Quote Link to comment Share on other sites More sharing options...
Sead Posted Sunday at 05:11 PM Author Share Posted Sunday at 05:11 PM (edited) 19 hours ago, Aizatulin said: Sure :-) I would prefer xyzdist() for this over attribute transfer, because you can limit the search to a subset of primitives (especially for this case one primitive, because you already know the prim id) and you gain access to the intrinsic uv value, which gives you the parametric position of the closest point on the primitive. Now I am trying to make xyzdist() based on primid, I mean, Only find those primid were matched even there were overlapping paths. (I don't know if I doing right.) I think through this method, I can attatch a resample node after merging those overlapping paths and turn on curveu attribute, and then use animated carve node to capture curveu attribute, and then use that attribute to dirve another carve node so I can skip that for each loop part to save some performance.(My another scene got hundreds paths.) But when I was capturing curveu attribute, it start to appear some wrong values, I don't know why, could you take a look for me? Thanks again. Match_Carve_v3.hip Edited yesterday at 03:24 AM by Sead Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted Sunday at 07:08 PM Share Posted Sunday at 07:08 PM (edited) There are several issues: If you look at your prim_ID attribute in "pointwrangle1" you can see, that it is always 0 (the primitive 0 is the lowest middle starting from the center -> so the values displayed are correct but probably not what you want). The reason for this (you initialize the attribute in pointwrangle1 while calling it -> to fix this you can capture the the primitive using xyzdist() as well) but on the other side, you are capturing the original geometry (overlapping) from the not overlapping geometry, which makes no sense in my opinion. What is wrong about doing the other way like in my example? @edit: here is another way capturing the position directly from carving Match_Carve_modA.hipnc Edited Sunday at 09:21 PM by Aizatulin 1 1 Quote Link to comment Share on other sites More sharing options...
Sead Posted yesterday at 02:11 AM Author Share Posted yesterday at 02:11 AM (edited) 12 hours ago, Aizatulin said: There are several issues: If you look at your prim_ID attribute in "pointwrangle1" you can see, that it is always 0 (the primitive 0 is the lowest middle starting from the center -> so the values displayed are correct but probably not what you want). The reason for this (you initialize the attribute in pointwrangle1 while calling it -> to fix this you can capture the the primitive using xyzdist() as well) but on the other side, you are capturing the original geometry (overlapping) from the not overlapping geometry, which makes no sense in my opinion. What is wrong about doing the other way like in my example? @edit: here is another way capturing the position directly from carving Match_Carve_modA.hipnc 209.8 kB · 1 download What is wrong about doing the other way like in my example? Your way is totally fine, Problem is mine, like i said I am trying to not use for each loop to save some performance, Because my other scene got too much paths. (Your method I had to save for the last in case if there is no other way that without for each loop could do it) The reason for this you initialize the attribute in pointwrangle1 while calling it I thought this way could help me match primIDs...(Like this parameter do here, corresponding IDs) you are capturing the original geometry (overlapping) from the not overlapping geometry, which makes no sense in my opinion. I was trying to move not overlapping geometry's curveu attribute to original geometry (overlapping) base on it's animation order, when it done, use this attribute to drive the new carve node that attach after not overlapping geometry. (If you take a look my .hip file you would know) Basically what I want is If your primID is 4, and then you only capture the primID that is 4 of not overlapping geometry's attribute, not others, even there have overlapping paths. (Could this be done? If could then I guess I could do this without for each loop, What I get now is they capturing what is closest, Not by ID) Sorry to bother you again, english not my mother tongue, I hope that what I describe is not making any confusions. Match_Carve_v3b.hip Edited yesterday at 07:45 AM by Sead Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted yesterday at 10:05 AM Share Posted yesterday at 10:05 AM If you want to avoid the the foreach (using carve) you can also use the clip node, which gives you the same result and it is also maintaining the point and the primitive attributes except the ordering of the point, which shouldn't be problem at all, because you store the old curveu attribute and it gets interpolated (by clip and carve aswell). Match_Carve_modB.hipnc 1 Quote Link to comment Share on other sites More sharing options...
Sead Posted yesterday at 11:44 AM Author Share Posted yesterday at 11:44 AM 1 hour ago, Aizatulin said: If you want to avoid the the foreach (using carve) you can also use the clip node, which gives you the same result and it is also maintaining the point and the primitive attributes except the ordering of the point, which shouldn't be problem at all, because you store the old curveu attribute and it gets interpolated (by clip and carve aswell). Match_Carve_modB.hipnc 217.14 kB · 0 downloads Okay. Solved! I have to spend lots of time to figure it out your second way that gets u. (Still confused me) Anyway, Cheers! And Merry Christmas!!! 2 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.