noc2 Posted February 14, 2024 Share Posted February 14, 2024 Hi; I have come to see that one needs to use a wrangle inside a foreach loop to get an additive recursive operation. But I really need to know if I really need to do that. Let me present a scenario first: Imagine there's a line with say, 5 points. Using a Point Wrangle Sop, I want to: Rotate the first point 0 around its neighbor, which is 1. Then I want to rotate point number 1 and 0 in its just previously altered position around point number 2. Then I want to rotate point 0, 1 in their just previously altered position and 2 around point 3, and so on... My problem is that I can't get the point wrangler to retrieve the altered point positions to work on inside a for() loop. The point() function simply returns the initial positions of the points :-/ Now, I got this to work inside a foreach loop, but when the point count reaches somewhere around 100, the cooking rate drops like crazy And for something as easy as this task, I found it overkill to use a foreach() sop inside a compiled block and such. I would be more than grateful if someone could enlighten me on the very subject. Many thanx in advance. Cheers; AJ Quote Link to comment Share on other sites More sharing options...
tamagochy Posted February 14, 2024 Share Posted February 14, 2024 Look here curve unroll setups, maybe you will find answer there Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted February 14, 2024 Share Posted February 14, 2024 Hi Ajlan, you'd usually take a rig wrangle after a rig doctor: float u = vertexcurveparam(0, i@vtxnum); float amount = chramp('roll', u) - 0.5; rotate(4@localtransform, amount, {1,0,0}); roll_curve.hip 1 Quote Link to comment Share on other sites More sharing options...
noc2 Posted February 14, 2024 Author Share Posted February 14, 2024 Hey there @konstantin magnus; Thank you so much for your reply. I was keeping kinefx as a backup for this task as it provides a built-in parent-child relation between points, which is great! Thank you so much for the code, highly appreciated I came across this mini tutorial on YT based on Geometry Nodes in Blender a while back: So essentially, Geo Nodes is a one big VOP in itself. Here, he makes use of the repeat zone, which is a for-each loop basically, to roll the points upward. I kind of set this one as a challenge for myself, thinking that if this is easily doable in geometry nodes in a single network, maybe I could do it in a single wrangle... It turns out that although geo nodes is able to do an additive recursion, I found that that may not be entirely the case in Houdini, hence the reason I wanted to consult on the matter in od-force. I also checked out Matt's CGwiki page and checked out his article where he first tackles unrolling a rolled up line geometry and then gets into the reverse of the prcedure, which is the exercise I gave myself Just wanted to see if I could get it done in a single point wrangle without having make use of a for-each sop without referring Matt's methodology directly and coming up with my own, no matter how clunky it may be So basically, mu question is this; is it not possible to deform points and recursively deform those deformed points in Houdini? Cheers; AJ Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted February 14, 2024 Share Posted February 14, 2024 (edited) feadback_loop_rot.hipncYou can use a feedback loop for example feadback_loop_rot.hipnc @edit: you can do it within a wrangle aswell feadback_loop_rotA.hipnc Edited February 14, 2024 by Aizatulin 1 Quote Link to comment Share on other sites More sharing options...
noc2 Posted February 14, 2024 Author Share Posted February 14, 2024 Ah, thank you so much @Aizatulin This is exactly what I was trying to accomplish. So much to study here and learn from. I truly appreciate you taking the time to do this. Lotsa cheers; AJ 1 Quote Link to comment Share on other sites More sharing options...
hannes603 Posted February 15, 2024 Share Posted February 15, 2024 you can also use path deform node . then you dont need code for this at all spiral_path_deform_enroll_curve_growth.hip 1 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.