GroundPrimitive Render Error
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
I want to use PolygonGeometry and groundPrimitive to draw Hexagonal Grids on Terrain, but there is a problem with the color rendering of the hexagonal grid, which goes out of the edge grid.And I check the edge points to ensure points are correct.
`hexagonInstances.push(new Cesium.GeometryInstance({
geometry: new Cesium.PolygonGeometry({
polygonHierarchy: new Cesium.PolygonHierarchy(geoInfo.cartesian3Data as Cesium.Cartesian3[]),
vertexFormat: Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
}),
id: "Hexagon-" + geoInfo.indexX + "_" + geoInfo.indexY,
attributes: {
color: Cesium.ColorGeometryInstanceAttribute.fromColor(this.config.showSatelliteImage?color.withAlpha(0.2):color.withAlpha(0.8))
}
}))
this.viewer.scene.primitives.add( new Cesium.Primitive({
geometryInstances: hexagonInstances,
interleave: true,
vertexCacheOptimize: true,
allowPicking: false,
asynchronous: false,
appearance: new Cesium.PerInstanceColorAppearance({
flat: true
})
}), 0)
`

Contributor guide
Research direction
Start with the GroundPrimitive and PolygonGeometry rendering path, using the provided hexagonInstances code and screenshot as the reproduction context. Inspect how polygon edges are rendered over terrain and verify the edge color against the supplied Cartesian3 points. Done means the hexagonal grid stays within its intended boundaries when rendered on terrain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100