CesiumGS / CesiumGS/cesium

Add option to draw point cloud points as spheres or circles instead of squares

Open
#9,488 1 comment 0 reactions 0 assignees View on GitHub
category - 3d tiles category - graphics type - enhancement
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

Currently, points in a point cloud is drawn as squares by default.

![image](https://user-images.githubusercontent.com/38567338/114614863-0ab8fe00-9c73-11eb-8a08-0f0234f56a3f.png)
From [3D Tiles Point Cloud Styling](https://sandcastle.cesium.com/?src=3D%20Tiles%20Point%20Cloud%20Styling.html) Sandcastle.

This is because WebGL by default draw points as squares. It would be nice for visualization purposes to add an option (potentially to [PointCloudShading](https://cesium.com/docs/cesiumjs-ref-doc/PointCloudShading.html)) allowing the points to be drawn in a more circular shape.

A suggestion from @lilleyse: one way to do this is to pass the point position to the frag shader and then in the frag shader get the fragment's position and render any fragment whose distance to the point position is less than the circle radius.

Contributor guide

Open the contributing guide

Research direction

Start with PointCloudShading and the point-cloud rendering shaders, then compare the 3D Tiles Point Cloud Styling Sandcastle example. The work is complete when users can choose circular or spherical point rendering instead of the default square points, with the selected shape visible in point-cloud visualization.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.