# JKeil

Members

21

0 Neutral

• Rank
Peon

• Name
Justin Keil
1. ## Orientation Matrix Help?

thanks galagast. That was incredibly intuitive and helpful (thanks for the notes within the file as well).
2. ## Orientation Matrix Help?

Hello all, I am trying to get a firm grasp of orientation matrixes: special thanks 1) to tokeru, 2) this site 3) and this page here https://www.sidefx.com/forum/topic/6679/ for helping me get a grasp of how the copy sop works with N, Up, and Orient. Im getting it slowly, but now Ive hit well, a road block lol. I have attached an example file. Basically here is what I have: I have a curve , and am attaching other lines to this curve using a copy sop. These curves have a stamped random noise, a stamped random scale, and most importantly, an orientation attribute that forces them to wrap around the line at the angle I specify. . Thing is I want to do to 2 more things to these lines. I want to be able to control their angle or orientation away from the curve, and I also want to be able to skin geometry along the lines as well, having the geometry skinning hold up if I do any rotations. Here is where it stands now (just head to attached if that makes it easier). The following code is where I get my initial @orient info for the copy stamp. I am using the transform within the copy sop to 'tweak things' (mostly likely the source of the problem). Wrangle 1: @rotter = float(@ptnum)/float(@numpt); //the incrementally increasing angle I will use within my quaternion. In the following vop sop I fit this value between 0 and 360-- then promote the attribute. Wrangle 2 (after vop sop) @angle = radians(@rotter); vector axis = @N; //this defines the main path (y axis?) of my line. I tried both @N --generated using polyframe tangent u, and just an arbitrary up vector (0,1,0)--both had issues matrix3 m = ident(); rotate(m, @angle, axis); //rotating around my specified vector @orient = quaternion(m); //promotion to usable attribute It works great! Sort of. The way this is set up I have limited control over additional rotation, and cant control the axis during skinning. If I set the vector axis to the normal, then with no rotation within the copy sop, the skinning works at first. When I rotate it though, the tubes start to flatten (see attached). Conversely, if I just use an Up vector (0,1,0), the skinning only works when there is not transform, and now the tubes point straight up! Not what I want at all. Ill point out that this transformation in Z within the copy sop is actually perfect for this secondary rotation control, of only the skinning would follow suit. Okay! My thoughts for a solution. I tried to build a new Up and N vector within the loop itself, but this did not seem to help. Not sure if this is a precedence thing or what---after all the rules of the copy sop might not apply to skinning. I then tried to generate a new orient attribute but this didnt work either. I have a hunch that WAY back in time, my original orientation wrangle MIGHT need a bit more info. Any pointers would be great! Thank you water_flower_v005_upl.hipnc
3. ## Copy Stamping Noise Vop_Varying Seed

Thanks! Using the inverse of the current point position to transform it back, prior to copy but after the stamped attribute. Perfect. And thanks for showing me a new expression point(surface_node, point_number, attribute, index).
4. ## PtNum Shuffle?

Thanks for the post, makes perfect sense
5. ## Copy Stamping Noise Vop_Varying Seed

Hey all. Trying to rap my head around a problem. I am copying a line to a curve. I have a simple noise applied to the line to be copied. The issue is the noise is going to be the same for each copy I make. I would like to randomize the noise if possible without changing key parameters like amplitude or roughness. I have attached a file--it is what is within the purple backdrop. Atypically I would do this via stamping: if I was trying to randomize scale i would create a scale attribute in the copy sop and then stamp this back upstream into a transform. Problem is, there are no parameters for noise (as far as I can see) that I can use as sort of fake SEED attribute to actually stamp in the first place. Amplitude, roughness, are a no go, as is 3d Frequency. 3d offset, which might work, shifts the noise off the origin, which creates a problem when it comes to copying the line to the curve in the first place. I would like it to stay snapped to the origin if I can. I was originally trying to use the 3d offset and then a fit range within vops to to snap the initial point (0) back to the origin, but wasn't having much success. I would prefer to avoid the brute force approach of setting initial point values to zero using setpointattrib if possible. Any suggestions on how to get around this? Thanks! stampingnoise_o.hipnc
6. ## Drive Attribute with Chops

Matt it makes perfect sense! Thanks for the excellent and detailed explanation--il be saving this post for later reference. Onward!
7. ## Drive Attribute with Chops

Hey all, doing some chops studies here. I would like to use a channel I have created in chops (jitter) to drive the scale parameter within a jitter node. (See attached--red backdrop). I believe I have everything set up correctly, but apparently I cannot just plug in the attribute jitter, or its channel name, to get the desired affect? And this is despite the fact tha I can see the jitter float attribute in the geo spreadsheet behaving the way I want it to. What gives? Looking through some stuff on Tokeru (love that site!), I noticed that when chops are used to drive attributes, it is often to drive ones that exists already, say a channel called zscale being applied to zscale in an extrude later downstream. Is this the way you have to do this? Or maybe I am missing something very simple. Thanks! chop_studies.hipnc
8. ## For Loop Versus Copy Sop?

Thanks Again, appreciate all the help.
9. ## For Loop Versus Copy Sop?

That is! Thank you very much. Its the second time ive seen a meta import node used within a loop. If you dont mind me asking a couple questions? So you created a meta import node, which is linked to the timeshift sop-utilizing the detail variable iteration. Did you have to create this iteration variable or is it generated by default with the meta data node, along with numeriterations, value and ivalue? Also, your expression, i can see it is subtracting the iteration number from the frame number, how come this now has the ability to force the points to populate over time? Does it have something to do with the spare input0. Regardless Ill try to decode this. Thanks for the help!
10. ## For Loop Versus Copy Sop?

Hello all, Im trying to replace the copy sop with the for loop in a project file (see attached). I've been building it while following some training from an older tutorial. Honestly, I am getting pretty frustrated with my inability to understand how to make a For Loop iterate through points over time-it pretty much indicates how little I understand about how Houdini processes data. Any pointers on this? Also, anybody willing to show me a few things for this in an attribute wrangle rather than a for loop would be amazing--Ive been REALLY trying to learn this software, and I feel like every time I start making progress, I hit some seemingly simple pothole of a problem, and inevitably can't get passed it. Like this one, I tried to figure this out myself for a while, now I'm all but giving up (until tomorrow of course! )and asking for help . Sorry for the noob post. Thanks! Ive attached the project file. Procedural_Animation_v003.hipnc
11. ## For Loop Versus Copy Sop?

Hello all, Im trying to replace the copy sop with the for loop in a project file (see attached). I've been building it while following some training from an older tutorial. Honestly, I am getting pretty frustrated with my inability to understand how to make a For Loop iterate through points over time-it pretty much indicates how little I understand about how Houdini processes data. Any pointers on this? Also, anybody willing to show me a few things for this in an attribute wrangle rather than a for loop would be amazing--Ive been REALLY trying to learn this software, and I feel like every time I start making progress, I hit some seemingly simple pothole of a problem, and inevitably can't get passed it. Like this one, I tried to figure this out myself for a while, now I'm all but giving up (until tomorrow of course! )and asking for help . Sorry for the noob post. Thanks! Ive attached the project file. Procedural_Animation_v003.hipnc
12. ## Pt Num Shuffle (REV)

Hey All--revising my earlier question Simple question here. Id like to randomly reorder the points on a line WITHOUT using the sort node. I dont want positions to change (@P) just the ids (ptnums)-- self imposed technical challenge. Example start: ptnum 1 @P {0,1,0}; ptnum 2 @P {0,2,0}; ptnum 3 @P {0,3,0}; ptnum 4 @P {0,4,0}; ptnum 5 @P {0,5,0}; ptnum 6 @P {0,6,0}; Example Desired result ptnum 3 @P {0,1,0}; ptnum 2 @P {0,2,0}; ptnum 1 @P {0,3,0}; ptnum 5 @P {0,4,0}; ptnum 6 @P {0,5,0}; ptnum 4 @P {0,6,0}; I know you can do this with a Sort Sop (random) but I'd like to do it in a Vex Sop Specifically, and then in a wrangle afterwards--its a tech challenge thing. I feel like this is simple and Im missing something pretty basic. This is what it says about the Random method for Sort Random Using the random seed, each point or primitive is assigned a random priority. They are then reordered according to that priority. This has the effect of generating a random ordering of the points or primitives. Helpful info or not in this case? If so, how can I apply this in a Vop Sop, and then later on if possible an Attribute Wrangle. All the random operators within the point vop give arbitrary new positions, so I dont really know how to go about doing this. In python, the solution is a prexisting method for random so that is not helpful here either. import random >>> x = [1,2,3,4,5] >>> random.shuffle(x) >>> x [5, 2, 4, 3, 1] A pointer in the right direction would be appreciated. Thanks Also, bonus question, what is the difference between ptnum and id in vop globals? They are behaving as if they were the same thing when I am running orders (say random) across points within the point Vop. Thanks!
13. ## PtNum Shuffle?

Hey All, Simple question here. If you have a line, can you randomize the ptnum using only the existing ptnum values (0-24) and associated P positions? So ptnum 1 (0,4,0) is now ptnum 7 (0,12,0), ptnum 3 is now (0,12,0), replacing ptnum 12, etc. I know you can do this with a Sort Sop (random) but I'd like to do it in a Vex Sop Specifically, and then in a wrangle afterwards--its a tech challenge thing. I feel like this is simple and Im missing something pretty basic. Also, bonus question, what is the difference between ptnum and id in vop globals? They are behaving as if they were the same thing when I am running orders (say random) across points. Thanks!
14. ## Recreating the Golden Ratio_ Attribute Wrangle

Thanks f1480187 That helps
15. ## Recreating the Golden Ratio_ Attribute Wrangle

Hey all I am working my way through Ari Danesh's Attribute wrangle tutorial, and I am at the point where he uses a wrangle to generate a costumizable curve, one that uses the golden ratio value to dictate its curvature. I am having a little trouble understanding a specific point in the code (see attached file) Here is the full code f@G = (0.618033989)+ch("pattern_offset"); //the golden ration in radians f@rad = ch("radius"); @rad *= ch("growth"); f@rot = @G * (@ptnum); @P.x += @rad*cos(@rot)*@ptnum*.001; @P.z += @rad * sin (@rot) * @ptnum *.001; @N.x = @P.x; @N.z = @P.z; @N.y = @P.y * ((@Npt- @ptnum)*ch("flatness")*.1); @up = {0,1,0}; @pscale = (@ptnum/(@Npt - 1.0))*2; My issue is with these three steps right here f@rot = @G * (@ptnum); @P.x += @rad*cos(@rot)*@ptnum*.001; @P.z += @rad * sin (@rot) * @ptnum *.001; I am failing to see how multiplying the ptnum by the golden ratio, then using the sin or cos of this value and assigning it to the points position in space, gives you the result you desire. A bit of a technical breakdown of this would help. Initially, I thought that I would have done it differently. I would have tried to use the golden angle (rather than golden ratio) and used it directly to direct the circular movement of my point values in my primary axis and secondary axis, and then controlled the y axis similar to the way he did with channels. However, I realized this would only work if each point move happened sequentially in a solver or an l system. If I applied the cos and sin of 137 to each point at the same time, I would just move the line entirely, not generate curvature. Ugh, I wish I understood this better. Is this method something of a workaround in the first place? Any help explaining Ari's method from a math perspective would be really helpful, along with perhaps alternative solutions to the same problem. Thank you! wrangling_golden ratio_public.hipnc
×
• Donations