Point deform in a for each loop

   2935   7   2
User Avatar
Member
30 posts
Joined: April 2019
Offline
Not sure why the for each loop is re-calculating fractures each frame. Point deform works fine if I perform it individually. Anyone able to provide some insight?

Attachments:
for_each_loop.hipnc (331.8 KB)

User Avatar
Member
4512 posts
Joined: Feb. 2012
Online
Hi,

You can just loop over each piece and use Point Deform on that piece for Capture and Deform.

If you want the fastest performance, you have to capture once in a time independent branch and then deform every frame. To set this up you need to write some VEX code to look up the capture indices across the entire geometry as the Point Deform capture indices will be based on isolated individual pieces.

There is a pending RFE for Point Deform to support IDs, to solve this exact problem.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
30 posts
Joined: April 2019
Offline
Cheers, I'll try that. It's good to know this is being looked at.
User Avatar
Member
7760 posts
Joined: Sept. 2011
Online
animatrix_
There is a pending RFE for Point Deform to support IDs, to solve this exact problem.

This was already added, as of 18
User Avatar
Member
73 posts
Joined: March 2020
Offline
Yeah this seems fairly painless in H18. All I had to do was move the time shift before the foreach region, drop down a point wrangle to set @id to @ptnum, and set the pointdeform node to only capture. Then add another pointdeform node after the foreach_end node set to Deform and voila.
User Avatar
Member
30 posts
Joined: April 2019
Offline
ziconic
Yeah this seems fairly painless in H18. All I had to do was move the time shift before the foreach region, drop down a point wrangle to set @id to @ptnum, and set the pointdeform node to only capture. Then add another pointdeform node after the foreach_end node set to Deform and voila.

That works great! Appreciate everyone's input.
User Avatar
Member
2 posts
Joined: July 2015
Offline
Hi,

I bring back this topic as I'm working on 17.5 and can't find how to make it works.
I have a scene with hundreds of point deform to make and trying to get it to work in a prototype first, see the attached file.

animatrix_
You can just loop over each piece and use Point Deform on that piece for Capture and Deform.

If you want the fastest performance, you have to capture once in a time independent branch and then deform every frame. To set this up you need to write some VEX code to look up the capture indices across the entire geometry as the Point Deform capture indices will be based on isolated individual pieces.


I'm not sure to understand what you mean by “time independent branch”.

I am seeing the pCapPts and pCapWeights attributes but not sure how to put them together for each piece of geometry as my setup seems to only take the last piece as you explained.

I'm quite new to Houdini so if you could develop a little bit it would be much appreciated

Image Not Found

Attachments:
multiPointDeform_v001.hipnc (127.4 KB)

User Avatar
Member
2 posts
Joined: July 2015
Offline
I finally found another way. I moved my objects in space before point deform so I don't have to create one for each of them.

Thanks to jsmack
https://www.sidefx.com/forum/topic/56001/?page=1#post-250970 [www.sidefx.com]
  • Quick Links