Converting primitive normals to points with matching normals

   4151   6   0
User Avatar
Member
23 posts
Joined: Nov. 2007
Offline
Hi,

This is my first post on the Houdini forums. I've been steadily learning H9 since the Apprentice version was released, and find Houdini's procedural approach to, well, *everything* a real breath of fresh air (compared to 3ds max and maya, which constitute my experience of 3d animation software to date). I've bought both books on the subject (Magic of Houdini and Houdini On The Spot) and have followed practically all of the tutorials at SideFX and odForce. (I even attended the H9.5 launch event in London last year). There are, however, some things I'm still finding difficult, so I thought I'd start without something that (I believe) should be trivial - but I have yet to figure it out. So here goes:

How would I go about taking the primitive normals from a polygonal mesh and convert these into points with matching normals? Essentially I want to place a point at the geometric centre of each primitive that has a normal aligned in the direction of the primitive normal. Sounds easy, huh? Solution has thus far evaded me.

Any thoughts?

YBM
User Avatar
Member
606 posts
Joined: May 2007
Offline
Here's one way; detaching polygons with Facet SOP, scaling each by 0 with primitive SOP, deleting the polygons and then fusing the points with Fuse SOP.

There are probably a dozen different ways, though

eetu.

Attachments:
primpoints.hip (259.2 KB)

User Avatar
Member
23 posts
Joined: Nov. 2007
Offline
Well, yes, that seems to work, but it doesn't seem very elegant - there surely must be a simpler way to achieve this. Afterall, the viewport can display primitive normals if necessary, and I doubt that it is internally processing the points in the manner you suggest. Although I can't think of a better solution, so thanks for suggesting this one. I'll use it for the time being.

YBM
User Avatar
Member
1908 posts
Joined: Nov. 2006
Online
I'd just copy some points and use a point sop with some prim() expressions for P and N. See the attached file.

Attachments:
points_with_N_at_prim_centers.hip (61.5 KB)

Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
23 posts
Joined: Nov. 2007
Offline
Now you're talking! Kudos to Graham - that works great, and it's elegant. In fact I think I might create a re-usable digital asset out of it for future use.

YBM
User Avatar
Member
606 posts
Joined: May 2007
Offline
Yeap, cleaner for sure. Now we're just missing 11 more ways!

eetu.
User Avatar
Member
11 posts
Joined: Oct. 2008
Offline
YoBeardMaestro
Now you're talking! Kudos to Graham - that works great, and it's elegant. In fact I think I might create a re-usable digital asset out of it for future use.

YBM

I just played around a little bit and here it is ! Maybe someone is interested.

Chris

Attachments:
centerPoints.otl (6.5 KB)

  • Quick Links