Jump to content

Maintain carve node animation after merging overlapping paths?


Recommended Posts

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:

  1. 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)
  2. 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 by Sead
Link to comment
Share on other sites

  • Sead changed the title to Maintain carve node animation after merging overlapping paths?
7 hours ago, hannes603 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.

Edited by Sead
Link to comment
Share on other sites

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

growth_carve_random_for_each.hip

Edited by hannes603
Link to comment
Share on other sites

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

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?

Link to comment
Share on other sites

On 12/20/2024 at 1:19 AM, hannes603 said:

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 by Sead
Link to comment
Share on other sites

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 by Sead
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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,

image.thumb.png.c25dca65de8a00c6f47498c498d13c41.png

I don't know why, could you take a look for me? Thanks again.

Match_Carve_v3.hip

Edited by Sead
Link to comment
Share on other sites

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 by Aizatulin
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

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)

image.png.1ea38aa2e4d175741bc5812b98cc22e1.png

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)

image.thumb.png.3008c05932c0306e37f1563cc139e74d.png

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 by Sead
Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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

  • Like 2
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...