Quick Flow
text
asset path
-> parse nodes, meshes, materials
-> convert coordinate system·units·winding
-> build vertex/index arrays and bounds
-> create immutable/default GPU buffers
-> load textures and create SRVs
-> store submesh ranges + material handlesImporter의 CPU scene 객체를 draw loop에 그대로 두기보다 runtime에서 필요한 compact mesh·material 구조로 변환합니다.
변환 경계
Position뿐 아니라 normal, tangent, UV, bone weight와 animation transform에 같은 coordinate-system 변환을 적용합니다. Handedness가 바뀌면 triangle winding, tangent sign과 cull mode도 함께 맞춥니다.
Submesh는 보통 한 index range와 material을 연결합니다. Vertex format과 input layout, index format과 최대 vertex 수를 GPU buffer 생성 전에 검증합니다. Bounds는 culling에 사용하므로 변환된 runtime 좌표 기준으로 다시 계산하거나 정확히 변환합니다.
자주 틀리는 점
- Relative texture path의 기준 directory를 process working directory로 두지 않습니다.
- Imported scene의 임시 pointer를 GPU resource owner에 남기지 않습니다.
- 32-bit index가 필요한 mesh를 16-bit로 잘라 저장하지 않습니다.
- Missing normal·tangent·texture에 명시적인 fallback을 둡니다.
참고 링크
2 sources