How to set a primitive's direction to the value of a vector?

   1981   7   1
User Avatar
Member
7 posts
Joined: July 2021
Offline
Hi~,I created a curve and copied the grid to the points of the curve with the copytopoint node. The orientation of the grid is the normal direction of the points on the curve. However, due to the project, I need to use the foreach primitives node to process each face, in which the orientation of each grid needs to be set to the vector direction of (1,0,0). What should I do? Please help to answer, thank you~~
User Avatar
Member
679 posts
Joined: Feb. 2017
Offline
Hey patricia19991201,

it's best to post a hip file and an image or in-file mockup that illustrates what you are trying to achieve.

Cheers
CYTE
Edited by CYTE - Aug. 3, 2021 10:21:13
User Avatar
Member
8544 posts
Joined: July 2007
Online
easiest may be to set normal direction on your curve points to {1,0,0} beforehand, e.g. using wrangle:
v@N = {1,0,0};
then the copied grids will already align that way

alernatively if you are not using any other point transforms like pscale, etc, you can uncheck Transform Using Target Point Orientations on Copy To Points SOP and just align your source grid in any way you want
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
7 posts
Joined: July 2021
Offline
赛特
Hey patricia19991201,

it's best to post a hip file and an image or in-file mockup that illustrates what you are trying to achieve.

Cheers
CYTE
Thank You!!I just forgot it:S
User Avatar
Member
7 posts
Joined: July 2021
Offline
tamte
easiest may be to set normal direction on your curve points to {1,0,0} beforehand, e.g. using wrangle:
v@N = {1,0,0};
then the copied grids will already align that way

alernatively if you are not using any other point transforms like pscale, etc, you can uncheck Transform Using Target Point Orientations on Copy To Points SOP and just align your source grid in any way you want

Thanks! Here is my hip,I still need to use the normal direction of the curve to copy primitives, because I need to pass these patches through a model, and then make each primitive record some information of the model through for each primitive, and then make these recorded primitives as large and oriented as the matchsize primitive B, but I find that due to the rotation of patches, the primitives can't completely fill the matchsize, so I want to change the orientation of the primitives, or is there a better way? Hope you could answer me

Attachments:
rotate_Primitive.hip (125.2 KB)

User Avatar
Member
7 posts
Joined: July 2021
Offline
Here is my hip.Can someone help me?

Attachments:
rotate_Primitive.hip (125.2 KB)

User Avatar
Member
679 posts
Joined: Feb. 2017
Offline
Hey patricia19991201,

You have to set the Normal N on the points before coping the grids onto it. See the attached file.
Or get rid of the polyframe node as it explicitly creates those Normals for you.

Cheers
CYTE
Edited by CYTE - Aug. 4, 2021 08:26:32

Attachments:
rotate_Primitive_2.hiplc (120.8 KB)

User Avatar
Member
7 posts
Joined: July 2021
Offline
CYTE
Hey patricia19991201,

You have to set the Normal N on the points before coping the grids onto it. See the attached file.
Or get rid of the polyframe node as it explicitly creates those Normals for you.

Cheers
CYTE

Thank you so much!! I had another method yesterday.I according to the normal value of each primitive, calculate their angles, and then translate them to fill the matchsize well.
Thanks your answer again!!
  • Quick Links