【问题标题】:Is it possible to use Wireframe on a 3D gltf x-model in HTML?是否可以在 HTML 中的 3D gltf x-model 上使用 Wireframe?
【发布时间】:2021-01-06 18:58:21
【问题描述】:

我正在努力实现这一目标: https://threejs.org/examples/?q=wireframe#webgl_materials_wireframe

按照本教程: https://keithclark.co.uk/articles/3d-models-in-html-documents/

我已经实现了模型,为它制作了材质和纹理,但到目前为止我已经实现了这样的目标:https://tomb.pl/projects/laptop/

但是这个线框(在我的例子中)只是纹理,我想获得一个真正的线框作为渲染模型材料。有可能这样吗?还是我应该改变方向? (我想坚持 x-model 的可能性,因为这将是未来实现模型的好方法)。

我已经在 glTF 文件中找到了一个材质代码

{
        "alphaMode": "OPAQUE",
        "doubleSided": true,
        
        "emissiveFactor": [
            0.0,
            0.0,
            0.0
        ],
        "extensions": {
            "KHR_materials_unlit": {}
        },
        "name": "lines",
        
        "pbrMetallicRoughness": {
            "baseColorTexture": {
                "extensions": {
                    "KHR_texture_transform": {
                        "scale": [
                            -1.0,
                            -1.0
                        ]
                    }
                },
                "index": 0
            }
        }
    }

这是我的主要材料,但可以通过此代码更改它吗? 感谢每一个答案。

【问题讨论】:

    标签: html three.js model 3d gltf


    【解决方案1】:

    嗯...如果没有人知道我已经切换到 xeogl - 更好更快的结果。 我也相信更好的表现。这是最终结果: https://tomb.pl/projects/examples/effects_ghost_materials.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-09-26
      • 1970-01-01
      • 2018-04-25
      • 1970-01-01
      • 1970-01-01
      • 2012-11-17
      • 1970-01-01
      • 2021-05-06
      相关资源
      最近更新 更多