问题描述
我试图通过应用重复频率低得多的凹凸贴图来打破纹理中的重复.不幸的是,它似乎采用了低于 (64) 的 'landTexture' 重复值,而不是我将其设置为 (1) 的值.
I'm trying to break up the repetition in my texture by applying a bump map which repeats much less frequently. Unfortunately, it seems to take on the repeat value of 'landTexture' below (64), instead of the value I set it to (1).
landTexture.wrapS = landTexture.wrapT = THREE.RepeatWrapping;
landTexture.repeat.set(64, 64);
bumpTexture.wrapS = bumpTexture.wrapT = THREE.RepeatWrapping;
bumpTexture.repeat.set(1, 1);
var m = new THREE.MeshPhongMaterial({map:landTexture,
ambient: 0x552811,
specular: 0x333333,
shininess: 25,
bumpMap: bumpTexture,
bumpScale: 1,
metal: false });
如果我注释掉 map:landTexture
,那么凹凸贴图比例为 1.我可以以某种方式混合这两个重复值吗?
If I comment out map:landTexture
, then the bump map scale is 1. Can I mix these two repeat values somehow?
推荐答案
没有.偏移量和重复值默认为其中之一:
No. The offset and repeat values default to one of them:
// uv repeat and offset setting priorities
// 1. color map
// 2. specular map
// 3. displacement map
// 4. normal map
// 5. bump map
// 5. roughness map
// 5. metalness map
// 6. alpha map
// 7. emissive map
在您的情况下,这将是 landTexture
设置.
In your case, that would be the landTexture
settings.
解决方法是修改您的纹理,或创建自定义ShaderMaterial
.
The workaround is to modify your textures, or create a custom ShaderMaterial
.
光照贴图和环境光遮挡贴图除外,它们均使用第二组 UV.这允许其他纹理比光照/AO 贴图具有更高的细节.
The exception is light map and ambient occlusion map, which each use the second set of UVs. This allows the other textures to be of higher detail than the light/AO map.
three.js r.84
three.js r.84
这篇关于Three.js 材质的凹凸贴图和纹理贴图可以有单独的重复值吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!