how to clone to primitive and use primitive normal?

   6137   15   1
User Avatar
Member
25 posts
Joined: Aug. 2013
Offline
Hi all,

I am trying to use primitive normals for position and orientation of clones. I am sure its possible, but I can't figure it out. Any help would be appreciated… thanks.
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
If you use Copy SOP node , It's use Up and Normal Vector for orientation of each copied object by default !
What do you wanna do exactly ?
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
Check this example :

Attachments:
JKClone.hip (83.3 KB)

https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
25 posts
Joined: Aug. 2013
Offline
Joker386
Check this example :


Thanks for your help. This is copying to points… What I need to do is copy to poly normals. I have some geometry that is being deformed, and the resulting poly normal is what I need to use for my copy.
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
But when you use Copy SOP , It can copy objects along Normals by default !
Check attached images.

About using VOP method , I said before you can import Up and N vector in the VOP SOP , then using Look At node for rotating each copied object along N vector.

Attachments:
Normals.jpg (118.6 KB)
Copy.jpg (138.8 KB)

https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
About VOP SOP , Just import Up , N vector and connect them to Look At node , Then extract Rotation from output Matrix data of the Look At and use it in the Transformation Matrix node :idea:
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
Ok , don't worry , I made VOP SOP method with correct orientation for you , Just check attached project :wink:

Attachments:
JK_Copy_to_Prim_VOP.hip (114.5 KB)

https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
25 posts
Joined: Aug. 2013
Offline
Joker386
Ok , don't worry , I made VOP SOP method with correct orientation for you , Just check attached project :wink:

Thats it… thanks so much for taking the time to put that together. I am going to go through it a bit more and try to see exactly what you are doing. I may have a few questions…
User Avatar
Member
25 posts
Joined: Aug. 2013
Offline
Joker386
Ok , don't worry , I made VOP SOP method with correct orientation for you , Just check attached project :wink:

OK… thanks again for putting this together for me. This particular node network has been extremely helpful to me understanding how to use Houdini. I am always animating groups of connected polys nodaly in my current app, but was not clear on how to get that control in vops until I saw your setup.

I do think I understanding all that you have done here… and I only have one question.

If you put a mountain on the torus and show primitive normals in the viewport you can see that the normals from your wrangle node and the normals in the veiwport don't match up… do you know why this is, and can it be made to match the normals in the view.
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
for two reason :

1. Some of these points are shared with too many primitives , and we don't take exactly same normal for currently primitives.

2.another reason is some of quad deformed primitives are not planner , they are broken exactly on center.

So if you use a Facet SOP and turn on Unique Points option , each primitives has it's own points , now you can take unique N from currently primitive (it's not average or shared with others).

And if you use divide SOP and convert all of the quad primitives to triangle , you don't have any broken primitive.

in this case you should take exactly same result with N primitives after using any deformer !

NOTE : You should use Divide SOP and Fact SOP after your deformer !

But about solving this in the VOP Network , let me think more :?
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Haven't looked at any of the above files…

Copy SOP is the tool and it naturally copies first input geo to second input points using a number of point attributes to orient things such as N and up.

If you want to copy objects to primitive normals, you can use the Divide SOP with it's “Compute Dual” option. This constructs a second set of geometry where each point is exactly at the centre of the input polygons. Then compute the point normals and copy your stuff.

See attached file.

Attachments:
divide_sop_compute_dual_copy_to_prim_normals.jpg (201.5 KB)
divide_sop_compute_dual_copy_to_prim_normals.hip (75.6 KB)

There's at least one school like the old school!
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
Wow , That's very simpler and better way , Thanks for this tip Jeff 8)
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
25 posts
Joined: Aug. 2013
Offline
Thanks guys… I ended up using the remesh tool instead of divide and then grouping by edge. It worked like a charm. This is resolved. I will post the final animation when its done.
User Avatar
Member
25 posts
Joined: Aug. 2013
Offline
I need a bit more help with this guys…

How can I use stamp function to isolate groups? I have a few groups set up and they each need different object to be cloned to each group, and one group has to be rotated. I am able to get this to work with 3 copy sops and selecting the appropriate group, but there has got to be a way to use stamp function to mask groups…. right?
User Avatar
Member
443 posts
Joined: Sept. 2012
Offline
Change Operation type to “Group By Expression” there you can use stamp() function.
User Avatar
Member
1 posts
Joined: June 2017
Offline
Hi All,

How would I do this for cached geometry? I have selected the primitives I want to copy to and plugged in the divide node and old point vop but nothing has happened and nothing appears on the copy node

I could post the hou file but maybe the geo cache is too much for the forum.

Thanks,
Will
  • Quick Links