Search the Community
Showing results for tags 'propagate'.
-
[Edit Oct. 10 2020] Hey, it's been a while. Version 2.1 free here: https://gum.co/tuftMaker So, I think I got totally carried away adding parameters and functionality. Good exercise, but I'm lost in it and probably you will be, too. Anyway, feel free to dissect the HDA and I hope there are bits and pieces that could be useful. That's not to say it doesn't work or anything, it does but it takes a moment to understand how, haha! Cheers! PAST BETA UPDATES: - Fixed: wrong falloff values with geo coming in through input #2 - Fixed: Global seed for scattering not working when input #4 is connected. - New: outputting 'type' primitive int attribute based on the iteration attribute if such is coming in through input #4 - The following documentation video demos available via F1: LATEST WIP UPDATE: Debugging - Fixed scaling for anything outside the unit circle. - Fixed curve framing with extreme angles by using dihedral to minimize rotation (thanks to Entagma for the theoretical insight on this one) - Addressing tiny falloff value differences with a statistical variance check and a threshold parameter. (e.g. when the sample points are in a circle). - Floating-point precision fix. - Post carve 'curveu' recalculation takes care of the vertex colors ramp now. Features - Added point sampling mode switch (cone cap or cone volume) - Added twist control - (Obsolete since H18) Added per connected mesh UVs using Toraku's "Get correct uvs with a sweep sop" fix - http://www.tokeru.com/cgwiki/index.php?title=Houdini#Get_correct_uvs_with_a_sweep_sop - "Listening" for N and iteration attributes. - Using the new sweep sop now. ---------------------------------------------------------------------------------------------------------------------------------------------------- THE BEGINNING OF THIS THREAD BELOW ---------------------------------------------------------------------------------------------------------------------------------------------------- Hi folks, How would you go about adding points in a propagating manner in VEX. Here's what I mean: - Start with several incoming base points, each with an up vector. - For each one, add a new point somewhere along its up vector. - Calculate a new up vector by subtracting base positions from new point positions and setting the new point up vector to the result - Add the next new point somewhere along the previous point's up vector So, I called it propagating, because every next point in part defines the following. I think I'm on the right track here, but my gut's telling me I'm missing something. I'm stuck. Here's what I got: vector up = point(0, "up", @ptnum); vector currentPos = point(0, "P", @ptnum); vector newPos = {0,0,0}; int pts[]; for(int i=0; i<@numelem; i++) { append(pts,i); } int iteration = chi("iteration"); for(int j=0; j<=iteration-1; j++){ newPos = currentPos+up; int newPoint = addpoint(0, newPos); setpointattrib(0, "up", len(pts)+j, normalize(newPos), "set"); currentPos = point(0, "P", len(pts)+j); up = normalize(newPos-currentPos); currentPos = newPos; } Where do you think I'm wrong here. What would you do? Cheers!