threejs如何让材质同时拥有高光和凹凸效果
1个回答
展开全部
map为默认材质色,添加normalMap法线贴图产生凹凸视觉, 配合roughness数值产生高光。
材质代码:
let map_d=new THREE.TextureLoader().load("常规贴图.jpg");
let map_n=new THREE.TextureLoader().load("法线贴图.jpg");
let material=new THREE.MeshStandardMaterial({
map:map_d,
normalMap:map_n,
roughness:0.1
});
let geometry = new THREE.CircleBufferGeometry( 5, 32 );
let circle = new THREE.Mesh( geometry, material );
scene.add( circle );
材质代码:
let map_d=new THREE.TextureLoader().load("常规贴图.jpg");
let map_n=new THREE.TextureLoader().load("法线贴图.jpg");
let material=new THREE.MeshStandardMaterial({
map:map_d,
normalMap:map_n,
roughness:0.1
});
let geometry = new THREE.CircleBufferGeometry( 5, 32 );
let circle = new THREE.Mesh( geometry, material );
scene.add( circle );
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询