# Can I use custom shader materials in CZML？

**URL:** https://community.cesium.com/t/can-i-use-custom-shader-materials-in-czml/35608
**Category:** CesiumJS
**Created:** [October 4, 2024, 1:49pm UTC](https://community.cesium.com/t/can-i-use-custom-shader-materials-in-czml/35608 "2024-10-04T13:49:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Zeng-Fan-Yi](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/zeng-fan-yi/32/25964_2.png) [@Zeng-Fan-Yi](https://community.cesium.com/u/Zeng-Fan-Yi)
#### Post date: [October 4, 2024, 1:49pm UTC](https://community.cesium.com/t/can-i-use-custom-shader-materials-in-czml/35608/1 "2024-10-04T13:49:11Z")

</div>

I am using CZML to draw dynamic paths and use the ‘path’ attribute, but I do not like the polylineOutline material provided in ‘path’. Is there any way for me to customize shader materials in CZML?

---

<div class="post-metadata">

### Author: ![jjspace](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/jjspace/32/4102_2.png) [@jjspace](https://community.cesium.com/u/jjspace)
#### Post date: [October 4, 2024, 8:59pm UTC](https://community.cesium.com/t/can-i-use-custom-shader-materials-in-czml/35608/2 "2024-10-04T20:59:00Z")

</div>

Hi @Zeng-Fan-Yi, thanks for the question.

CZML entites can be created with a range of materials other than just `polylineOutline`, for example a `solidColor`.

These can be applied in the CZML itself:

```js
const czml = [
 //...
{
    id: "test-path",
    name: "test path",
    path: {
      material: {
        solidColor: {
          color: {
            rgba: [0, 0, 255, 255],
          },
        },
      },
    },
// ...

```

Or applied after it’s loaded

```js
const testPath = dataSource.entities.getById("test-path");
testPath.path.material = Cesium.Color.fromRandom({ alpha: 1.0 });

```

the [CZML Polyline](https://sandcastle.cesium.com/?src=CZML%20Polyline.html) and [CZML Rectangle](https://sandcastle.cesium.com/?src=CZML%20Rectangle.html) Sandcastles show some other examples of modifying the material in the CZML itself. The [Geometry and Appearances](https://sandcastle.cesium.com/?src=Geometry%20and%20Appearances.html) sandcastle shows how to create some other materials using the Cesium API.

Hopefully that helps you get started
