Is it possible to change the primitive normal direction? Because I want to polyextrude a face and I have some problems when extruding.
With Regards. Thank You.
Nope. There is actually no such thing as a primitive normal. Unlike a point normal, a primitive normal is a derivation based on the vertices of the primitive. It's shown (and look-upable) as any other attribute, but it is not stored anywhere – just look at a .geo file, and you'll find point N, but no prim N. So to “change” the primitive normal, you need to move the points that belong to the poly.
Is it possible to change the primitive normal direction? Because I want to polyextrude a face and I have some problems when extruding.
With Regards. Thank You.
If you want to “flip” the primitive normal then use the Reverse SOP. It will reverse the vertex ordering of the primitive thus causing the primitive's ‘normal’ to point in the opposite direction.
I'm not sure I understand what “problems with extruding” are you having in the first place. The default orientation is the polygon normal. If you want to use a different direction, you can just move/rotate the PolyExtrude handle.
This was my #1 search hit on the topic without filtering the search by date so, I'd figure I throw this little support gem I got from Hector:
In Vex, you can get the primitive normal by:
// prim_normal(<geometry>geometry, int prim_number, float u, float v)// in this case the u/v coordinates refer to the parametric coordinates// of the single primitive, not the user defined UVsvectornormal = prim_normal(0, @primnum, 0.5, 0.5);
In my case, I was constructing something flat and wanted all normals to face up, so a group can be created that gets used in a reverse sop.
// add prims with bad normals to groupif(normal.y < 0) {i@group_reverse = 1;
}
Hopefully that helps someone being after this type of information.