71 views
Skip to first unread message

L Cayla

unread,
Dec 8, 2018, 5:53:20 PM12/8/18
to cesiu...@googlegroups.com
Hi, 

I have started using KHR_techniques_webgl in my gltf models and it works well so far on Cesium 1.50.
However I haven't been able to find a way to change the uniform values so far. The material does not have a name apparently so I can't call  getMaterlal and therefore can't access their values. In fact, I haven't seen in the specs a name see : 
"materials": [
    {
        "extensions": {
            "KHR_techniques_webgl": {
                "technique": 0,
                "values" : {
                    "u_light0Color": [
                        0.8,
                        0.8,
                        1.0
                    ]
                }
            }
        }
    }
]
Is there a way to achieve what I am trying to do (change  uniform values of currently loaded model)? or am I missing something?

Thanks, 

-Lionel

Omar Shehata

unread,
Dec 11, 2018, 12:25:38 PM12/11/18
to cesium-dev
This seems like a missing feature as far as I can tell. You can see the engine actually keeps track of materials by ID here:


But doesn't expose a way to get it. Feel free to open up a feature request on the GitHub issues (https://github.com/AnalyticalGraphicsInc/cesium/issues) to request this.

As a workaround, you could modify the glTF to give the material a name so you can access it.

Ikhlass Ramadan

unread,
Dec 19, 2018, 1:35:41 PM12/19/18
to cesiu...@googlegroups.com
i put the file v.gltf in the path in code but it still show the previous 3D
Capture.PNG
Reply all
Reply to author
Forward
0 new messages