Help Finding direction of piece. (avg PrimNormalJanky)
1470 3 1- NicTanghe
- Member
- 189 posts
- Joined: Dec. 2016
- Offline
Hello i was wondering if annyone mioght b able 2 help me find a way to set the Direction the windows are facing.
( Just for the slanted part is ok i can not allow windows on the borders. )
I have a pscale atribute somewhere that in combination with a circle scale dicides the slanding and i was thinking maybe i can use that.
( Just for the slanted part is ok i can not allow windows on the borders. )
I have a pscale atribute somewhere that in combination with a circle scale dicides the slanding and i was thinking maybe i can use that.
- Aizatulin
- Member
- 470 posts
- Joined: July 2005
- Offline
- NicTanghe
- Member
- 189 posts
- Joined: Dec. 2016
- Offline
Thx allot for the help i do wich i understood what is happening here.
I dont understand why rotating by 0 around the normal suddenly fixes orientation ?
Or is that not what is happening ?
THat also stil leaves the bugs on the Corners but Those windoes need to not b there annyway.
I dont understand why rotating by 0 around the normal suddenly fixes orientation ?
Or is that not what is happening ?
THat also stil leaves the bugs on the Corners but Those windoes need to not b there annyway.
Edited by NicTanghe - May 31, 2021 13:24:11
- Aizatulin
- Member
- 470 posts
- Joined: July 2005
- Offline
Sure
The orientation depends on both (normal ~ v@N and upvector ~ v@up). If you rotate the upvector around the normal the orientation changes.
You have calculated the normal as an average of primitives. In some cases the primitives are not planar, but you can get the normal from the centroid position using xyzdist() to closest prim for example.
Here is the file, if this was the issue.
The orientation depends on both (normal ~ v@N and upvector ~ v@up). If you rotate the upvector around the normal the orientation changes.
You have calculated the normal as an average of primitives. In some cases the primitives are not planar, but you can get the normal from the centroid position using xyzdist() to closest prim for example.
Here is the file, if this was the issue.
-
- Quick Links