extruding in direction of point normals

   9865   13   1
User Avatar
Member
224 posts
Joined: June 2009
Offline
I have a pair of points with normals. I then create a line between these points using the Add SOP. I now want to extrude the line in the direction of the point normals, but the normal for the line is not the same as the points. Any suggestions how to do this?
Patrick
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Hi Patrick ,
Please check out the scene file for a workflow.

rob

Attachments:
rse_movePointsAlongNormal.hip (50.5 KB)

Gone fishing
User Avatar
Member
224 posts
Joined: June 2009
Offline
thanks - the peak sop works great
looks like it will be a useful in many ways
Patrick
User Avatar
Member
224 posts
Joined: June 2009
Offline
I got stuck again - how do you transfer a normal from a primitive to a point?

In rob's example, he typed it in manually using a point SOP, but I need to get it from existing geometry - from the primitive.
Patrick
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
How about attribute transfer sop

Rob
Gone fishing
User Avatar
Member
224 posts
Joined: June 2009
Offline
still have some trouble with normals
Attribute transfer seems to work ok from points to points
Now I want to orient some geometry according to the points / normals

see attached

I am trying to make the tubes stick out of the box at right angles to the sides

Attachments:
tubes.hipnc (57.3 KB)

Patrick
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Attribute transfer seems to work ok from points to points

Use a attribute promote then ! prim > point

I had a brief look at your scene. I don't understand what you are trying to do at all with it . but please look at my attached fixed scene where I attached tubes to points without the need of a foreach sop.

Rob

Attachments:
tubes_714_fixed.hipnc (78.1 KB)

Gone fishing
User Avatar
Member
224 posts
Joined: June 2009
Offline
Thanks for the response rob - I discovered a few new tricks.

The attached file shows 4 different ways of achieving what I was trying to do - using 2, 3, 4 and 8 nodes. The key as always is knowing what all the nodes can do:
- the facet SOP: can unique points and calculate normals
- the polyextrude SOP: can scale and consolidate points

Attachments:
normal_test.hipnc (90.2 KB)

Patrick
User Avatar
Member
224 posts
Joined: June 2009
Offline
Patrick wrote:
> Attribute transfer seems to work ok from points to points

Rob wrote:
> Use a attribute promote then ! prim > point

This bit I still don't get… See attached file.

I seem to have trouble directly accessing the primitive normal. The only thing that seems to give me access to it are the local variable in the Primitive SOP (NX, NY, NZ)

How do I use attribPromote to get the primitive normal? Is seems to have no name - i tried N but it does not seem to work.

That only way seems to be to transfer the normals to the points (using the Point SOP, or other SOPs that do the same, lice facet), and then to access the normals in the points instead. Maybe this is OK… is there a better way?

Attachments:
normal_test2.hipnc (51.3 KB)

Patrick
User Avatar
Member
678 posts
Joined: July 2005
Offline
Better do this with VOPs and “op:” expression.

NOTE: Sometimes you don't need null but when you find that something don't work while it should try placing null. In my case It didn't wan't pickup normal directly from sphere1 so I used null. It started to work directly after restarting Houdini, but you don't wanna restart program all the time, right . One null more is not a big deal.
Edited by - Feb. 25, 2010 12:58:39

Attachments:
getPrimNormal.hipnc (50.6 KB)

User Avatar
Member
224 posts
Joined: June 2009
Offline
thanks swann - I will look into your VOP examples, lot of stuff there that I have been avoiding
Patrick
User Avatar
Member
224 posts
Joined: June 2009
Offline
I have hit a problem similar to my previous question about normals and copying. I am copying some primitives onto the centre point of some other primitives, orientated to their normals. All works, except…

the objects being copied are rotating around the normal in unpredictable and seemingly random ways - how do I get them to be rotated in the same way? See attached…

Attachments:
test_copy.hipnc (62.5 KB)

Patrick
User Avatar
Member
1145 posts
Joined: July 2005
Offline
Add an up vector with a point sop, then the triangles can be rotated with a transform sop.

Attachments:
test_copy_200_PR.hipnc (71.7 KB)

“gravity is not a force, it is a boundary layer”
“everything is coincident”
“Love; the state of suspended anticipation.”
User Avatar
Member
224 posts
Joined: June 2009
Offline
thanks!
Patrick
  • Quick Links