Easy one -- even points along a curve...

   6797   6   1
User Avatar
Member
23 posts
Joined: March 2009
Offline
I know this must be easy. I have a curve, and want to generate points evenly along it.

(curve1) –> (scatter1) almost does this, but the spacing is, well, scattered.

Ideally, too, the UP for each point on my curve will point along it, like a chain of arrows. Any guidance appreciated!

==> d

P.S. unrelated question… any way to “solo” a network? That is, hide everything else in the modeling view?
User Avatar
Staff
809 posts
Joined: July 2006
Offline
polyomino
I know this must be easy. I have a curve, and want to generate points evenly along it.
(curve1) –> (scatter1) almost does this, but the spacing is, well, scattered.
Resample SOP (or Refine in some cases for NURBs)

polyomino
Ideally, too, the UP for each point on my curve will point along it, like a chain of arrows. Any guidance appreciated!
PolyFrame SOP will calculate a tangent vector.
User Avatar
Member
23 posts
Joined: March 2009
Offline
Thank you so much!
I knew it had to be there.

Hmm. I'd better just go through all the SOP's and see what they do…
User Avatar
Member
23 posts
Joined: March 2009
Offline
Okay. I've got my transform responding to the tangent vectors. I have a flat circle object, so just rotate along the Z axis (I've got Z-up). Stamping each point's transform attribute($PT,“tangent”) and so forth.

transform_y = atan2(stamp(“../copy1”,“tgtx”,.2),stamp(“../copy1”,“tgty”,.2))

Tragically, when I add a Resample node, the tangents seem to get broken up a bit.



Is there some basic usage of the Resample that I'm missing? It seems like the resampled path is discontinuous maybe. Or maybe not. I'm just guessing wildly here…

thx thx thx!

Attachments:
along_path.hipnc (171.6 KB)

User Avatar
Staff
809 posts
Joined: July 2006
Offline
I think you're getting fancier than you need to here. I would set the PolyFrame SOP to create the tangent vector straight into the N attribute, then use that to orient the copies to each point. You shouldn't need any stamping at all for this. Once you've changed the polyframe's “Tangent Name” to N, turn on normals display in the viewport and you should see whether it's calculating them correctly or not. For a curve, setting the style to “First Edge” in the PolyFrame SOP is usually necessary (sorry, left that bit out). See attached file.

(Of course for this example you can just crank up the “Division” parameter in the Circle SOP, but I'm assuming this is just an example.)

I can't find the part of the documentation right now (anyone?), but somewhere there's a list of what all the various attributes do to orient copies with the Copy Sop and with instancing. There's some info on it at odforce here. [odforce.net]

Attachments:
along_path with_N.hipnc (190.8 KB)

User Avatar
Member
1192 posts
Joined: July 2005
Offline
johner
I can't find the part of the documentation right now (anyone?)
Here it is:
http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=6679 [sidefx.com]

Dragos
Dragos Stefan
producer + director @ www.dsg.ro
www.dragosstefan.ro
User Avatar
Member
23 posts
Joined: March 2009
Offline
Johner, and d-sane, thanks so much for the pointers!
And the modified hip file. This is super informative. I am examining closely now.

Yes, the for the circle, boosting the divisions is the same, and yes, I was wondering about the general curve case…

It looks like “sweep” does some of this, too, intrinsically.

Ponder, ponder. This new set of lego is truly delightful.
  • Quick Links