surt Posted June 25, 2019 Share Posted June 25, 2019 hi guys I'm new to the Houdini, and I'm having hard time understanding how to make loop nodes what i want to do is to create a gear generator, which allows me to spawn connected gears with correct rotation speed something based on the link below, but using loop iteration number as gear name and doing the adding and multiplying based on previous gears information http://deborahrfowler.com/MathForVSFX/GearRatio.html where I'm stuck is figuring out the previous gears name and adding new gears info in it. any help will be appreciated!!! thank you in advance! GearGenearatorWIP3.hipnc Quote Link to comment Share on other sites More sharing options...
flcc Posted June 25, 2019 Share Posted June 25, 2019 Are you in a hurry? Because I was about to post a gear generation asset with a gear connexion part. I already do this but in another software. Unfortunately, I'm really in a hurry to finish a job an I can't dive inside for now (not in yours, not in mine). I don't think I can get back to it for another week or two. What I can say for now is the "connexion" is fairly simple and is more a UI problem. I think the for-each approch is not the best (but it's just a quick opinion). At least the iteration use, cause the gears speeds is just about teeth numbers. You should create an attribute "numTeeth" and use it. And by the way I get an "incomplet asset" message. At the object level I just see a line. Quote Link to comment Share on other sites More sharing options...
surt Posted June 26, 2019 Author Share Posted June 26, 2019 hi flcc, no- I'm not in a hurry but this thing has been giving me a trouble for a week and i just want a good solution to it. I do have numTeeth attribute, and i am able to match gear rotation with previous one... but i just don't know how to generate it automatically in Houdini and for the file... i wonder if its not showing up because I'm still using free learning edition.. well basically the connection is very similar to hip file thats in the link above (http://deborahrfowler.com/MathForVSFX/GearRatio.html) well thanks for your time! and i would love to see how you have treated this problem in your way too Quote Link to comment Share on other sites More sharing options...
flcc Posted June 26, 2019 Share Posted June 26, 2019 The connection part is precisely what I wanted to try in houdini. In my previous use it was semi manual. A script attached to each wheel with a link to the previous wheel, with known radius and position. It was for "real" machines. For my "try" it will be more a UI exercise. How generate the gear : Giving two points and a number of gear to create in between ? Give a random (or not) grid of point and generate gear on these ? random size or not ? other ? And then generate all the links and speeds. And then I probably discover it's not so easy The gear building itself is done and almost "pure" VEX 1 Quote Link to comment Share on other sites More sharing options...
surt Posted June 26, 2019 Author Share Posted June 26, 2019 thats awesome! very close to what i was hoping to achieve as well. but i'm still too new to Houdini, i'm still having hard time figuring out the "getting info from the previous wheel" part here. I'm going to try out the loop tutorial thats stated here... (https://vimeo.com/222881605) and hope i can get something out from it. for now. if things works out, ill post it here. i also thought about the grid and point copy way as well. but i couldn't think of a way to distance the points that will change distance with different shaped gear that you create later on. but ... now that i think about it, it could be a good idea to just generate gears that matches the grid automatically ..... never thought about that. maybe it can be a good idea to think about.. thanks for input! ill keep trying! Quote Link to comment Share on other sites More sharing options...
ktonini Posted July 25, 2019 Share Posted July 25, 2019 (edited) Are you still working on the "getting info from previous wheel" part. I'm working on a similar gear generator, and have had to deal with the same issue. From my understanding, each point wrangle works on each point in parallel, meaning each point won't get real-time info on the other points effected by that wrangle. But you could do something like this - In a point wrangle - int gear_number = @ptnum; //for example i@gear_number = gear_number; //free it from the wrangle context and copy it into an attribute Then place another point wrangle beneath that one, and - int previous_gear_number = point(0, 'gear_number', @ptnum-1); Then if you were to do something like this in that same (last) wrangle - i@previous_gear_number = previous_gear_number; ...you would see in the attribute spreadsheet that each point now has an attribute containing the number of the previous point. You can use that method for any info, including arrays. Hope that makes sense and helps! Edited July 25, 2019 by ktonini 1 Quote Link to comment Share on other sites More sharing options...
surt Posted July 30, 2019 Author Share Posted July 30, 2019 i have been little away from this project because.. i couldn't figured it out, and decided to learn more basics first. but i kinda see what you mean.. ill definitely test it out today when i get home! thank you for the input! Quote Link to comment Share on other sites More sharing options...
Iskander Posted August 14, 2019 Share Posted August 14, 2019 It is in russian,but maybe will be helpful: 1 Quote Link to comment Share on other sites More sharing options...
surt Posted August 15, 2019 Author Share Posted August 15, 2019 This is amazing!! Exactly what i hoped to make!! thank you so much!! 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.