서의 공간

assimp 라이브러리 소개 본문

Graphics Theory/관련 정보

assimp 라이브러리 소개

홍서의 2020. 11. 21. 16:55

[assimp 위키피디아]: en.wikipedia.org/wiki/Open_Asset_Import_Library

[assimp에 대해 더 자세히]: learnopengl.com/Model-Loading/Assimp

[assimp 번역]: heinleinsgame.tistory.com/21?category=757483

[assimp 깃허브]: github.com/assimp/assimp

 

간단히 얘기하자면 크로스 플랫폼 3D 모델을 프로젝트에 임포트 해주는 라이브러리이다.

다양한 3D 애셋 파일 형식에 대한 공통적인 API를 제공한다.

 

즉 .obj나 .3dm 등을 가진 파일들을 내 프로젝트의 환경에 맞도록 import 해주는 라이브러리라는 것이다.

.obj : 마야, 3d맥스, Zbrush 등에서 사용하는 3D모델링 파일 확장자

.3dm : Rhino 3D와 CADian 3D에서 사용하는 확장자

 

 

assimp 구조 모델

 

  • All the data of the scene/model is contained in the Scene object like all the materials and the meshes. It also contains a reference to the root node of the scene.
  • The Root node of the scene may contain children nodes (like all other nodes) and could have a set of indices that point to mesh data in the scene object's mMeshes array. The scene's mMeshes array contains the actual Mesh objects, the values in the mMeshes array of a node are only indices for the scene's meshes array.
  • A Mesh object itself contains all the relevant data required for rendering, think of vertex positions, normal vectors, texture coordinates, faces, and the material of the object.
  • A mesh contains several faces. A Face represents a render primitive of the object (triangles, squares, points). A face contains the indices of the vertices that form a primitive. Because the vertices and the indices are separated, this makes it easy for us to render via an index buffer.
  • Finally a mesh also links to a Material object that hosts several functions to retrieve the material properties of an object. Think of colors and/or texture maps (like diffuse and specular maps).
Comments