cesium gltf 1.0 2.0的一些扩展

本文介绍GLTF 1.0到2.0的转换过程中涉及的材质及光照模型扩展,重点讨论了KHR_techniques_webgl与KHR_materials_common扩展的应用,包括光照模型配置、材质属性设置及光照参数的指定。

       cesium中对于 gltf1.0、2.0中某些扩展需要进行解析,解析的过程是将gltf1.0的格式转换成gltf2.0的格式。
        对于解析过程中使用的某些扩展的解释:


{
    "asset": {
        "version": "2.0"
    },
    "scene": 0,
    "scenes": [
        {
            "nodes": [
                0
            ]
        }
    ],
    "nodes": [
        {
            "children": [
                2,
                1
            ],
            "matrix": [
                0.009999999776482582,
                0.0,
                0.0,
                0.0,
                0.0,
                0.009999999776482582,
                0.0,
                0.0,
                0.0,
                0.0,
                0.009999999776482582,
                0.0,
                0.0,
                0.0,
                0.0,
                1.0
            ]
        },
        {
            "matrix": [
                -0.7289686799049377,
                0.0,
                -0.6845470666885376,
                0.0,
                -0.4252049028873444,
                0.7836934328079224,
                0.4527972936630249,
                0.0,
                0.5364750623703003,
                0.6211478114128113,
                -0.571287989616394,
                0.0,
                400.1130065917969,
                463.2640075683594,
                -431.0780334472656,
                1.0
            ],
            "camera": 0
        },
        {
            "mesh": 0
        }
    ],
    "cameras": [
        {
            "perspective": {
                "aspectRatio": 1.5,
                "yfov": 0.6605925559997559,
                "zfar": 10000.0,
                "znear": 1.0
            },
            "type": "perspective"
        }
    ],
    "meshes": [
        {
            "primitives": [
                {
                    "attributes": {
                        "NORMAL": 1,
                        "POSITION": 2,
                        "TEXCOORD_0": 3,
                        "_CUSTOM_ATTRIBUTE": 4
                    },
                    "indices": 0,
                    "mode": 4,
                    "material": 0
                }
            ],
            "name": "LOD3spShape"
        }
    ],
    "accessors": [
        {
            "bufferView": 0,
            "byteOffset": 0,
            "componentType": 5123,
            "count": 12636,
            "max": [
                2398
            ],
            "min": [
                0
            ],
            "type": "SCALAR"
        },
        {
            "bufferView": 1,
            "byteOffset": 0,
            "componentType": 5126,
            "count": 2399,
            "max": [
                0.9995989799499512,
                0.999580979347229,
                0.9984359741210938
            ],
            "min": [
                -0.9990839958190918,
                -1.0,
                -0.9998319745063782
            ],
            "type": "VEC3"
        },
     
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值