How to add custom material to Box volume created by the primitive API?

I created a Box volume through primitive API and added a “SpecularMap” type material to it, but it just won’t work. But when I created another Cylinder volume through the same way using primitive API and added the same SpecularMap material, it worked fine. What’s the reason and how could I use SpecularMap material for the Box volume created by primitive API? It seems strange…

fabricSpecularMap = {
type:“SpecularMap”,
uniforms:{
channel: “r”
},
components: {
specular: ‘1.0’
}
}

var Box = scene.primitives.add(
new Cesium.Primitive({
geometryInstances: new Cesium.GeometryInstance({
geometry: box1,
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA)
},
id : ‘box1’
}),
appearance: new Cesium.MaterialAppearance({
material: new Cesium.Material({
fabric: fabricSpecularMap
})
})}
) )

@xwdu

Welcome to the community and thank you for the detailed post :rocket: :confetti_ball: Any updates on this issue? Could you please send over a sandcastle demo that showcases the error that you are receiving?

Looking forward to learning more!

-Sam