【问题标题】:How to fix grey squares showing on gltf model in a-frame?如何修复a-frame中gltf模型上显示的灰色方块?
【发布时间】:2020-01-14 21:48:06
【问题描述】:

在 aframe 中查看模型时,我在 gltf 模型上看到奇怪的方块。

我尝试制作一个 AR HTML 来扫描标记并在其上显示模型。当我在线查看 gltf 查看器中的模型时,它很好,但通过 webapp 查看它上面有灰色方块。有人见过这个吗?

<a-scene embedded
    vr-mode-ui="enabled: false"
    shadow="type: pcf"
    arjs='sourceType: webcam; sourceWidth:1280; sourceHeight:960; 
displayWidth: 1280; displayHeight: 960; debugUIEnabled: false;'>

               <!-- add your models -->
        <a-asset-item id="animated-asset" 
         src="https://artshirtsonline.com/shanatova/models/test2.gltf"  > 
                   </a-asset-item>
                           </a-assets>
    <a-entity animation-mixer="loop: repeat" gltf-model='#animated-asset' 
            scale="1 1 1"
            shadow="cast: true"
            rotation="-90 0 0"></a-entity>

【问题讨论】:

    标签: three.js aframe gltf


    【解决方案1】:

    查找 shadowMap.bias 您可以调整它以调整阴影痤疮。还要确保您的阴影相机近处和远处与您的场景所覆盖的范围非常匹配。

    【讨论】:

    • 谢谢,曼特拉克斯!你有代码中的任何例子吗?我应该写什么来调整它或远近的相机?谢谢
    • 我想我设法用 shadowBias 纠正了它..:) 谢谢!!
    • @Adam 介意告诉你在哪里调整了偏差属性? (渲染器对象,mesh.material)?
    • 实体灯下
    猜你喜欢
    • 2018-07-21
    • 2019-02-04
    • 2019-12-19
    • 1970-01-01
    • 2021-08-07
    • 2022-06-14
    • 2019-02-05
    • 1970-01-01
    • 2017-10-09
    相关资源
    最近更新 更多