Hello
I have been trying to set the normals so that they always face away and in the same position. I did some vex, but it only works if the mesh is square. With the code the normals keep changing depending on the size.
My current code is:
vector dir = set(0,0,0);
@N = @P + dir;
I want the normals to always stay as in nr1 in the image. Anyone have an idea on how I can achieve this?
Creating Custom Normals for Copy to Points
1749 3 1- ChrisarN
- Member
- 8 posts
- Joined: 9月 2014
- Offline
- FFD
- Member
- 80 posts
- Joined: 2月 2018
- Offline
- ChrisarN
- Member
- 8 posts
- Joined: 9月 2014
- Offline
FFD
A lot of SOPs have an option Recompute affected normals which is usually on by default, try turning this off. Alternatively you could just transfer the normals back after doing whatever it is you have to do as long as the point numbers have not changed
Hello, I am making a procedrual model, so I want the normals to stay the same direction even if I change the size. Changing size will now change the direction of the normals.
- BabaJ
- Member
- 2041 posts
- Joined: 9月 2015
- Offline
Your not changing anything by adding dir set to 0, and since your using the value of @P for your normal those normals will naturally change too because the point positions changed.
You could do what FFD says. Assign your initial normals to a named attribute and re-assign those values back to the normal attribute after the scaling.
You could do what FFD says. Assign your initial normals to a named attribute and re-assign those values back to the normal attribute after the scaling.
Edited by BabaJ - 2020年2月21日 15:45:16
-
- Quick Links