Hi! Relatively new Blender user but long time 3D graphics programmer.
I was experiencing some odd behaviour exploring how mesh face-based instancing works and in trying to figure out what I was seeing I found someone else had reported it (https://developer.blender.org/T77575).
Since I’d previously downloaded the Blender source I was curious to see if I could find the code responsibile for this and, lo and behold, the mirror modifier does work exactly as I suspected, as per this comment in
/* reverse the loop, but we keep the first vertex in the face the same, * to ensure that quads are split the same way as on the other side */
Since modifying how instancing works seems way too hairy, I was thinking of adding some extra options to the Mirror operator to control 1. how it treats normals and 2. its output vertex order.
This seems like a pretty self-contained first contribution but I thought I’d ask here before I start: am I going down a dangerous path? Should I reconsider? And am I asking this question in the right place?
Edit to add: a small rewrite later and I have more predictable behaviour under mirroring operations. I slightly misunderstood how the orientation is calculated: the Y axis appears to be always perpendicular to the normal and the first edge in the edge loop.
Before (note that X and Y axis point in seemingly random directions)
After (predictable Y axis and consistent X axis)
This has the advantage of not requiring any modifications to the instancing code and is just a small change to the Mirror modifier.