Hello community!
I was wondering how to replicate the Point Relax sop in VEX but I haven´t found much information about it. Having a "relax" function in VEX can be very helpful if we want to relax per frame or per iteration.
In the sideFX docs the different steps are broadly explained like the utilization of Lloyd´s algorithm, but it seems like the implementation in Houdini has some nuances that would be nice to know.
I came here to see if maybe someone has some tips about how the code inside the Point Relax works.
If not I will try starting from scratch implementing Lloyd´s algorithm in VEX and move from there.
Thanks everyone!
Point Relax in VEX
1167 7 1- Cicuta
- Member
- 55 posts
- Joined: 11月 2019
- Offline
- Robbert
- Member
- 53 posts
- Joined: 2月 2017
- Offline
- Cicuta
- Member
- 55 posts
- Joined: 11月 2019
- Offline
Hi Robbert!
Yes! But as soon as you are doing some other vex inside a SOP-solver that for example creates points and moves them per frame and you want a progressive relaxation per point to sort of drive that movement that won't work. The point relax SOP will work on all points at the same time and all at once.
The idea of having its code is for getting it into other functions.
Thanks for the reply though!
Yes! But as soon as you are doing some other vex inside a SOP-solver that for example creates points and moves them per frame and you want a progressive relaxation per point to sort of drive that movement that won't work. The point relax SOP will work on all points at the same time and all at once.
The idea of having its code is for getting it into other functions.
Thanks for the reply though!
- Robbert
- Member
- 53 posts
- Joined: 2月 2017
- Offline
Cicuta
Hi Robbert!
Yes! But as soon as you are doing some other vex inside a SOP-solver that for example creates points and moves them per frame and you want a progressive relaxation per point to sort of drive that movement that won't work. The point relax SOP will work on all points at the same time and all at once.
The idea of having its code is for getting it into other functions.
Thanks for the reply though!
Maybe you could write the newly created points into a group with setpointgroup(), put those in the point relax group (use the other points only as influencers for which you can use the second input if you want). Then remove the group from the newly created points after the first iteration. Oh well just a thought
Technical VFX artist @ Housemarque / Sony Interactive Entertainment
- Cicuta
- Member
- 55 posts
- Joined: 11月 2019
- Offline
RobbertCicuta
Hi Robbert!
Yes! But as soon as you are doing some other vex inside a SOP-solver that for example creates points and moves them per frame and you want a progressive relaxation per point to sort of drive that movement that won't work. The point relax SOP will work on all points at the same time and all at once.
The idea of having its code is for getting it into other functions.
Thanks for the reply though!
Maybe you could write the newly created points into a group with setpointgroup(), put those in the point relax group (use the other points only as influencers for which you can use the second input if you want). Then remove the group from the newly created points after the first iteration. Oh well just a thought
The issue with that is that if the points are created and moved within a first wrangler node, even if you group them, the point relax sop is working after the movement. The only way of getting the relaxation at the time of the movement and blend them, is by performing that relaxation inside the same code, which will be inside a loop that operates over each point.
- Vince Desilets
- Member
- 1 posts
- Joined: 9月 2013
- Offline
- Cicuta
- Member
- 55 posts
- Joined: 11月 2019
- Offline
- animatrix_
- Member
- 4512 posts
- Joined: 2月 2012
- Online
Vince Desilets
You can look at Pragmatic VEX training you will find all your answer about many topics included this one..
Oh yes I cover this exact topic in my VEX course but it's not an exact implementation of Point Relax just for the record, more like what Scatter SOP is doing which is the same Lloyd's relaxation algorithm which to me is more interesting and more practical in production than fully unconstrained 3d point relaxation.
It's not a single VEX function though. Also it's run inside a compiled for loop network. Lloyd's relaxation algorithm is computationally expensive.
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
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
-
- Quick Links