【问题标题】:Spherical environment map blurry球面环境图模糊
【发布时间】:2021-08-14 02:01:51
【问题描述】:

我从three.js docs sample 中取了一个equirectangular envMap,它在球体上看起来很锋利。

如果我使用以下参数将相同的材质加载到我的 场景中

material="spherical-env-map: /assets/models/1/envtest.jpeg; roughness: 0; metalness: 1"

它看起来像这样模糊

我做错了什么?

通过故障重现的示例:https://glitch.com/edit/#!/sepia-forest-keyboard

设置故障时我注意到的:

  • 使用Aframe 1.0.3 是模糊的
  • 使用Aframe 1.2.0,无论我做什么,它都是黑色的

【问题讨论】:

    标签: aframe three.js aframe


    【解决方案1】:

    这是因为您在代码中使用了 PBR 材质,因为 A-Frame 的默认材质是 MeshStandardMaterial。意思是试图呈现物理正确的材料。官方three.js 示例使用MeshLambertMaterial,它不是PBR 材料。两种材质实现环境贴图的方式不同。

    当使用 PBR 材质时,建议使用同样经过 PMREMGenerator 预处理的 HDR 环境贴图,例如:https://threejs.org/examples/webgl_loader_gltf

    【讨论】:

    • 谢谢!我看不到如何在aframe 中实现PREMGenerator。我确实有一个可用于环境的.hdr 文件,但是在使用spherical-env-map 时它根本没有加载(也没有错误消息)。不幸的是,几乎没有关于此的文档,我很感激任何提示!
    • 您可以尝试 registering a shader(应用 MeshLambertMaterial),或者仅使用 entity.getObject3D("mesh").material 引用来应用任何“原始”三种材料(如 this glitch
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-04-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-24
    • 2018-10-02
    相关资源
    最近更新 更多