Copy sop, point order on first copy reversed

   1851   4   0
User Avatar
Member
210 posts
Joined: Jan. 2014
Offline
The gods are good!!!!
With the new changes in H16 I'm now super stoked and finally fully commited to switch to Houdini.

But I've been absent from Houdini for some years and have unlearned quite a bit.
I'm stuck on this prolem that I want to copy a curve shape onto a circle primitive and than skin it to basically get a custom torus, if you like.
Allthoght it should be a no-brainer I just can't pull this off.
The point numbers on the first copy are in reversed order to all the other primitives and thus I get a twisted connection where the circle closes.
See hip file attached. I colorcoded the good green prims and the bad red one.

I'm probably just missing some setting or missing normals somewhere in the tree.

I appreciate your help.

Attachments:
skintest.hipnc (69.9 KB)

User Avatar
Staff
6179 posts
Joined: July 2005
Offline
The problem is that only specifying normal does not precisely specify how to orient your points. We need an up-vector as well to try and figure out how to rotate the point around the normal. In this case, the -Z point happens to pick an inverted rotation from the rest, thus the strange twist.

You can specify an explicit up vector of 1,0,0 so the normal orientation will be consistent, then adjust the transform to get the right profile, as shown in the attached.

I would recommend the Copy to Points and the new Point SOP, however.

Attachments:
skintest_fix.hipnc (117.6 KB)

User Avatar
Member
210 posts
Joined: Jan. 2014
Offline
Oh, thanks so much. I expected it to be something related to the up vetcor, I experimented with it in the old point sop but was completely in the dark.
Allthough I generally understand what your solution does, I'm failing to understand the setup itself. In the Attribute Expression you create an “up” attribute with the Constant Value (1,0,0) and then you're running the VEXpression “value” on it. So as far as I understand that, every point gets the constant (1,0,0)? Which means that the up vecor for every point on that circle is pointing to the positive x. Which confuses me because I thought the up vector for each point should be perpendicular to the circles curve. Like every human, when asked where is “up”, they would point up to the sky, where in fact they are just pointing outwards from the center of the earth, perpendicular to the ground they are currently standing on. So I assumed the up vector for every point to be (@P.x,@P.y,@P.z), just like the normals pointing outwards.

Why x?
I probably just got a twist in my brain.
Edited by anon_user_21411066 - May 25, 2017 11:36:16
User Avatar
Staff
6179 posts
Joined: July 2005
Offline
N tells which way to point the Z-axis of your input. But this isn't enough information to know where to put the other two axes. They need to be perpendicular to N, but you could spin them any which way.

The up vector is to tell you which way to put the y-axis. It is rotated around N until it is lined up.

So if up and N point in the same way, you are back to the same problem of being able to orient in any direction.

The circle's curve has three main directions:
Tangent - the direction it is pointing in
Normal - The direction outwards, based on curvature
Binormal - The direction perpendicular to those two.

Thus while your N is perpendicular to the curve, so is (1, 0, 0) because your curve lies in the YZ plane.
User Avatar
Member
210 posts
Joined: Jan. 2014
Offline
jlait
N tells which way to point the Z-axis of your input. But this isn't enough information to know where to put the other two axes. They need to be perpendicular to N, but you could spin them any which way.

The up vector is to tell you which way to put the y-axis.

Aaaawwww great, thanks so much. These are exactly the words that i needed it to be explained with.
  • Quick Links