**Hello there, **
**I am running into a “problem” with the rendering of a polyline volume.
We have code running which create cables between two transmission towers using the poliline volume entity. **
This is working quite nice except for one small problem. In order to scale everything correctly with the world we have to create cables with a quite small width.
When looking at these cables from up close everything is quite fine, however when we zoom out a bit more part of the cable simply disapear and alot of fragmenting starts to happen.
I’ve added an image showing what I mean exactly
Here’s the code used to create the polylines
setCables(entityCollection) {
const positions = [
{ x: 3835369.6903347694, y: 365541.5544081299, z: 5066048.086579057 },
{ x: 3835364.0289227036, y: 365539.7900486491, z: 5066051.2289879825 },
{ x: 3835358.5336588803, y: 365538.04152801464, z: 5066054.592335832 },
{ x: 3835353.1850333693, y: 365536.3069866331, z: 5066058.150679963 },
{ x: 3835347.969665103, y: 365534.58514905727, z: 5066061.886227598 },
{ x: 3835342.8797426056, y: 365532.87527067616, z: 5066065.7885922175 },
{ x: 3835337.912697508, y: 365531.1771065879, z: 5066069.854359463 },
{ x: 3835333.0710971877, y: 365529.4909013608, z: 5066074.08694446 },
{ x: 3835328.3627520637, y: 365527.81739925063, z: 5066078.496734553 },
{ x: 3835323.801042004, y: 365526.1578752999, z: 5066083.101523448 },
{ x: 3835319.405475511, y: 365524.51418862323, z: 5066087.927254895 }
];
const entity = new Cesium.Entity({
show: true,
polylineVolume: {
show: true,
positions,
shape: computeCable(0.015),
material: new Cesium.Color(55, 55, 55, 1),
fill: true,
shadows: Cesium.ShadowMode.CAST_ONLY
}
});
entityCollection.entities.add(entity);
}
computeCable(radius: number) {
const positions = ;
for (let i = 0; i < 6; i++) {
const radians = Cesium.Math.toRadians(i * 60);
positions.push(new Cesium.Cartesian2(radius * Math.cos(radians), radius * Math.sin(radians)));
}
return positions;
}
You can change the positions however you want but this is it for one of the cables.
What I would love to see, if possilble are clear lines at a realistic distance. Right now if you stand below the transmission tower the cables already start getting atrifacts/flickering.
However I also somewhat expect that this is because we made the cables so thin.
We’re always using the newest version of Cesium and are running on Chrome.
I hope the code and image are enough to help someone understand my question. If not please let me know and I’ll try to clarify it some more.
Best regards,
Wilco