copy per primitive (Polygon)

   12364   8   1
User Avatar
Member
9 posts
Joined: March 2014
Offline
Hi gang,

Slowly getting to houdini here, and I have a dumb question that might have a simple answer.

I'm trying to do a copy of an object (cube) onto another object (torus), but instead of copying per point, I'd like to copy per primitive (polygon).
So that in the end I have one little cube centered on each polygon of the torus.

While I'm able to position each cube centered onto each polygon, I'm having serious difficulties having them well oriented to their corresponding polygon.

I can have the cube oriented with the normal, that works “okay”, but I still need some kind of up vector to have a local orientation.

If someone can point me to the right direction, or to a tutorial that would be awesome
Thank's

Attachments:
Copy_Per_Polygon.hiplc (241.7 KB)

User Avatar
Member
636 posts
Joined: June 2006
Offline
there was a post on odfroce about it:
http://forums.odforce.net/topic/14603-how-to-create-a-point-at-the-center-of-every-primitive-on-a-grid-sop/ [forums.odforce.net]

i find this one from rdg pretty cool :-)

FacetSOP( unique points)
PrimitiveSOP transform scale 0,0,0
FuseSOP

kgoossens also have made a nice one using the dived sop.
User Avatar
Member
9 posts
Joined: March 2014
Offline
Hi Mandrake and thank you.

Yes, I'm aware of this thread @Odforce, but it's only about placing the object at the center of each poly, which I think I already got well.
Though, the convert to circle seems to do some magic.

I'm looking for a good way to orient the object localy per polygon.
I've watched Kim Goossen's tut, I'm ok with normals. The “up” part is interesting as it shows what Houdini expects. For an “overal” up looking at Y (0,1,0) it's ok. But a bit like what he shows with the Comb technique, I'm looking for some Per Polygon orientation.
In xsi we have PolyReference frame, I believe it outputs a Matrix or something convertible to an orientation, and it's per Polygon.

Thank you !
User Avatar
Member
606 posts
Joined: May 2007
Offline
Sounds like PolyFrame SOP?
User Avatar
Member
575 posts
Joined: Nov. 2005
Offline
You coul also create the points to copy to with a attributewrangle per primitive and set orientatian attributes here. either You geometry has that attributes, or You can create them by inspecting the geometry in the wrangle.
User Avatar
Member
9 posts
Joined: March 2014
Offline
Hi Eetu. Yes, in polyframe I tried it, I can set a N and (tangent)up Vectors.
But I'm not sure of the result for the up.

Hi Sanostol. Can you elaborate on the Vex method ? could you share the syntax? I'm bold with Vex, is it possible to build it in VopSop as well ? I'm specialy interested in that orientation you describe.

Thank's a lot for your help guys
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
Do you wanna making something like this ?
I think it can help you :?

Attachments:
JK_Copy_to_Prim.hip (87.9 KB)

https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
If you wanna doing it with VOP , you can use this example file.
Of course I just use VOP SOP for position of each piece , But you can use same method for importing Up and N vector and using Look At node for orientation.

Using VOP SOP is so FASTER than using Copy SOP.
Of course you have to use one Duplicate node for first copy before VOP SOP !

Attachments:
JK_Copy_to_Prim_VOP.hip (83.6 KB)

https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
4486 posts
Joined: Feb. 2012
Offline
You can also use this to create centroidal points as fast as possible without using the HDK:
http://www.orbolt.com/asset/animatrix::centroidalPoints::1.00 [orbolt.com]
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
  • Quick Links