I need your guidance. I’m rendering 3d polygon primitives but I’m not able to find a way to see the delineation of corners or joints of the walls of the polygon. Is there a way to set an outline color for the polygon? I tried to see the delineation of the walls by setting translucent to true but the rendered shape doesn’t look translucent.
I’m using Cesium.MaterialAppearance instead of the PerInstanceColorAppearance because MaterialAppearance allows me to
easily change the color of the shape (material.uniforms.color) after it is already created.
My code is below:
var geometryInstance = new Cesium.GeometryInstance({
geometry: Cesium.PolygonGeometry.fromPoints({
positions: positions,
vertexFormat: Cesium.PerInstanceColorAppearance.VERTEX_FORMAT,
perPositionHeight: true})
attributes: { color: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.Yellow)}
});
var material = new Cesium.Material.fromType(“Color”);
material.uniforms.color = Cesium.Color.Yellow;
var appearance = new Cesium.MaterialAppearance({
material: material,
translucent: true,
closed: true,
renderState: { lineWidth: Math.min(2.0, this.scene.maximumAliasedLineWidth), lineColor: Cesium.Color.Black},
faceForward: true});
var primitive = new Cesium.Primitive({
geometryInstances: geometryInstance,
allowPicking: pickable,
interleave: true,
appearance: appearance,
releaseGeometryInstances: false});
Thanks,
Alberto