# Material for a b3dm tiles

**URL:** <https://community.cesium.com/t/material-for-a-b3dm-tiles/10432>\
**Category:** CesiumJS\
**Created:** [August 3, 2020, 10:11am UTC](https://community.cesium.com/t/material-for-a-b3dm-tiles/10432 "2020-08-03T10:11:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![91raan1mpg](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/91raan1mpg/32/1987_2.png) [@91raan1mpg](https://community.cesium.com/u/91raan1mpg)\
**Post date:** [August 3, 2020, 10:11am UTC](https://community.cesium.com/t/material-for-a-b3dm-tiles/10432/1 "2020-08-03T10:11:10Z")

</div>

Hi,  
I transformed CityGML with FME into the b3dm format and I want to change the Material definition for the b3dm tiles. Is there a way to change the material of the features like the changing of the color with the Cesium3DTileStyle?

The b3dm files have a material definition in the gltf JSON. Swapping the material there is working.

`"materials":[{"name":"default_material","pbrMetallicRoughness":{"baseColorFactor":[0.8,0.8,0.8,1],"roughnessFactor":0.30000000000000004,"metallicFactor":0.5}}]`  
 ![grafik](https://global.discourse-cdn.com/cesium/original/2X/1/1f944e70a0310759508623d6fd9d5daf1d6de753.png)

`"materials":[{"name":"default_material","pbrMetallicRoughness":{"baseColorFactor":[1.0,0.7,0.3,1],"roughnessFactor":0.00000000000000000,"metallicFactor":1.0}}]`

![grafik](https://global.discourse-cdn.com/cesium/original/2X/b/b36d0dba611f4944fb20adec9e530f2de96e0386.png)

Is there a way without touching the b3dm files and specify it via CesiumJS?

I am using:

- Cesium 1.69.0
- Windows 10
- Firefox 79.0

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [August 5, 2020, 8:41pm UTC](https://community.cesium.com/t/material-for-a-b3dm-tiles/10432/2 "2020-08-05T20:41:30Z")

</div>

CesiumJS doesn’t support dynamically changing the material in 3D Tiles (like changing roughness/metallic factors), although you can use the 3D Tiles styling language to change color and opacity like in this code example: [https://sandcastle.cesium.com/index.html?src=3D%20Tiles%20Feature%20Styling.html](https://sandcastle.cesium.com/index.html?src=3D%20Tiles%20Feature%20Styling.html).
