Where to start for writing custom matrials

So, i am new to Cesium and working on my first cesium application and was wondering what would be good reading points or examples to learn about doing custom matrials.

The goal I am trying to solve first is from the following data:

“path”:{

  "width":5,
  "show":true,
  "material":{
    "solidColor":{
      "color":{
        "rgba":[
          255,255,0,255
        ]
      }
    }
  }
},
"position":{
  "epoch":"2015-08-13T14:57:56Z",
  "cartographicDegrees":[
    0,12.538470088003283,55.697276400984904,0,
    3,12.538448295053739,55.69725837989201,0,
    4,12.538442092445022,55.69727095274752,0,
    5,12.538430609236991,55.697267599986056,0,
    6,12.538422311152358,55.697225522829626,0,
    7,12.53836003360808,55.69732174708377,0,


]
}

``

which shows up as a solid colored path and instead I would like to create a material that also shows a small dot on the path for each position point in the position list.

Also I am wondering if I can develop these side by side to Cesium or I will need to develop them as part of the Cesium stuff and build it together.

This isn’t exactly what you are looking for, and it is a bit dated, but here is the guide for creating custom materials:

Fabric · CesiumGS/cesium Wiki · GitHub

Patrick

Thanks. I took a look and with my current lvl of knowledge it’s a steep learning curve with the linked document.

I will give it some time during the week to try digest it little by little. It will help me if you confirm that that it is materials I should be looking at if I wanted to create something that draw the path and also some small dots for each data point.

Alternative I guess one could also look at it from two drawing problems, draw the path and then draw a lot of billboards, but this seems like I will be representing the data twice.

Hi Poul,

Actually, you are probably better off using a separate polyline and billboards. We do this a lot in Cesium and other 3D engines we have worked on. There is some duplication but it is cleaner, easier, and more flexible than trying to do it procedurally in fragment shader in a material.

Patrick