'2017/07/26'에 해당되는 글 1건

  1. 2017.07.26 Maya 의 Face Normal 의 방향
posted by cimple 2017. 7. 26. 10:13

Maya 에서 face normal 의 방향은, vertex 의 index 순서에 다라서 오른손 법칙에 따라 결정된다.

다음과 같은 코드로 vertex 의 index 를 확인할 수 있다.


sList = om.MSelectionList()
sList.add('srcShape')
meshDagPath = sList.getDagPath(0)
meshFn = om.MFnMesh(meshDagPath)
vtxIdxList = meshFn.getPolygonVertices(0) # vertex indes list of 0th face
print vtxIdxList


만약 Maya 의 face normal reverse 기능으로 노말 방향을 뒤집으면

이 index list의 순서도 바뀌는 것을 확인할 수 있다.