개발/three.js / / 2022. 9. 27. 12:33

three.js Material - MeshMatcapMaterial + (Free MatCaps Site)

반응형

https://www.deviantart.com/sespider/art/163-FREE-MatCaps-258893793

 

163 FREE MatCaps by SEspider on DeviantArt

 

www.deviantart.com

참고로 위 주소에서 Free MatCap 리소스들을 구할 수 있다. (구글 로그인으로 무료)

 

const textureLoader = new THREE.TextureLoader(loadingManager);
const matcapTex = textureLoader.load('Matcap Material Texture 경로');

...

// Mesh
const geometry = new THREE.BoxGeometry(2, 2, 2);
const material = new THREE.MeshMatcapMaterial({
    matcap: matcapTex
});
const mesh = new THREE.Mesh(geometry, material);
scene.add(mesh);

MeshMatcapMaterial은 구 형태의 Material에 입체감이나 질감을 표현한 리소스를 토대로 다른 모양의 도형에 적용시키는 기능을 할 수 있다. 

유니티의 Material 객체의 preview를 기본적으로 구 형태로 띄워주는 것은 아무래도 Matcap Material의 역할을 기본적으로 하고 있기 때문일 것이다.

반응형
  • 네이버 블로그 공유
  • 네이버 밴드 공유
  • 페이스북 공유
  • 카카오스토리 공유