Hi,
Is there a way to change the shape of the points generated by Cesium.Cesium3DTileset
?
Currently its a square and would like to know if there is a way to change its shape to circle.
Hi,
Is there a way to change the shape of the points generated by Cesium.Cesium3DTileset
?
Currently its a square and would like to know if there is a way to change its shape to circle.
Welcome to the community!
Can you please share a sandcastle demo or a screenshot of what you have so far? I am not sure exactly what points you are referring to. Looking forward to learning more!
-Sam
Thank you for the reply.
If you zoom in you will notice the individual points are “squares” is it possible to change it to “circle”?
I apologize for the late response - I was at GEOINT all of last week. Thank you for sharing some more details on your question. To the best of my knowledge, our API does not support changing lidar points from squares to circles. However, there are many other ways to customize your point cloud. I would start by checking out this sandcastle demo. It showcases how the visual attributes of point clouds can be modified at runtime.
-Sam
Thank you for your reply. Just want to confirm if this is possible. I will look into the link you shared.
Hello everyone! Quick check-in: any updates on the implementation for this one? I’m eager to apply a similar transformation to my point cloud, aiming to switch from square to circular points. Any insights or guidance on achieving this would be much appreciated! Thanks in advance!
No updates yet. We don’t have work for this item planned anytime soon. We’d be happy to get input on potential use cases, or give input on a code contribution.
customShader를 이용하면 포인트를 정사각형에서 원으로 변경할 수 있어.
customShader = new Cesium.CustomShader({
uniforms: {
u_pointSize: {
type: Cesium.UniformType.FLOAT,
value: PointSize,
},
},
vertexShaderText:
`void vertexMain(VertexInput vsInput, inout czm_modelVertexOutput vsOutput) {
vsOutput.positionMC += 0.1 * vsInput.attributes.normalMC;
vsOutput.pointSize = u_pointSize;
}`,
fragmentShaderText:
`void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
float distance = length(gl_PointCoord - 0.5);
if (distance > 0.5) {
discard;
}
}`
});
tileset.customShader = customShader;
이미지를 첨부할게
Good day @namjihyeon, thank you so much for your sample code. I successfully implemented it on my local machine, and below is a sample GIF of my implementation.