Point Cloud Rendering
SVL Simulator supports scenes containing point cloud data. Point clouds can be rendered alongside other geometry like meshes or particles, are combatible with most of the features available in high definition render pipeline and can be detected by multiple sensors, including LiDAR.
Point cloud rendering in Simulator can handle large point clouds (hundreds of millions of points) thanks to octree-based structure and selective, frustum-based culling.
If you want to create your own point cloud based environment, you should start with importing your point cloud data into simulator. This step is not necessary for pre-built point cloud environments - they do not require any additional setup.
Most of the features available for point cloud renderers are optional and can be toggled based on individual use cases. Lighting, for example, can be turned off if point cloud has light data already baked in, or calculated fully based on scene settings like time of day or weather.
Most notable features include:
- Full deferred lighting compatible with HDRP's lighting system
- Filling holes between points
- Rendering multiple point clouds at once
- Normals estimation
- Shadow casting/receiving
- Point streaming
- Point budget (for memory and render buffer)
- Camera frustum or distance-based culling
- Mesh collider generation
- Support for color/depth camera sensors and LiDAR
The easiest way to set up point cloud rendering is to perform an import with the target scene open in the background. When importing is done, you will be prompted with a choice to automatically add all of the required components to the open scene. If accepted, point cloud with default rendering settings will immediately show up in scene view.
Alternatively, a prefab located in
Assets/Prefabs/PointCloudRenderer.prefab can be added to any scene for a quick setup. This requires to specify point cloud data path in
More complex setups with multiple point clouds or masked rendering require setting up components manually. Details can be found in Components Overview section.
In the most common scenario with a single point cloud, one of each of the components described below will be present on a scene.
For more complex cases (e.g. multiple point clouds or separate color and intensity data) it's possible to add multiple instances of
NodeTreeRenderer to one scene. Only one instance of
PointCloudManager should ever be present.
This component is responsible for keeping track of shared point cloud resources and orchestrating rendering for one or more point cloud renderers. It will also automatically set up HDRP passes and enable or disable them depending on all renderers' settings.
There are no settings available for this component. Only one instance should be active at a time. Disabling this component will disable rendering of all point cloud data.
This component is responsible for managing single point cloud's data in memory. It will load chunks of point cloud data from mass storage based on each renderer's requests (performed on a separate thread) and will keep track of total amount of points loaded into memory. When defined point budget is exceeded, older points will be unloaded.
Single instance of this component can only operate on one point cloud, but multiple renderers can use data stored in a single
This component can also optionally load mesh colliders for a point cloud if they were generated during import process.
This component represents a single point cloud to render and stores all related settings.
Transform to which this component is tied affects translation, rotation and scale of the point cloud.
By default, point cloud rendered by a single renderer will be visible in all cameras and compatible sensors, but not in shadow caster pass. This can be controlled on a per-renderer basis.
Note that this component will not actively trigger any rendering. It's used mostly as a container for data that will be used by
NodeTreeRenderer is default implementation that includes camera-based culling, which will make load requests to
NodeTreeLoader. Adding other culling methods can be done by extending the base class,
Depending on the requirements, there are multiple combinations of rendering modes available. Sensors supported in point cloud rendering are compatible with all of them.
The most simple one (
Points) will render points with size dependent on distance from the camera. This image is stable, but does not support lighting and will show holes if point cloud is not dense enough. Improved version of this mode (
Cones) will use 3D cones instead of 2D circles, which creates better transitions between very close points, but has a slight performance cost.
More advanced rendering mode,
Solid, will remove points that should be invisible from observer's position and interpolate color and depth data between leftover points. It can also reconstruct normals data from depth, and subsequently calculate lighting for point cloud. Filters used here are executed in screen space, which means that camera position and rotation affect rendering output. This might introduce some artifacts around edges, especially around large depth differences.
It's suggested to test available modes and choose the one best suited for given point cloud and use case. If lighting is required, solid rendering mode is the only one currently supporting it.
|Data Path||string||Directory in which imported point cloud data is stored. Paths starting with
|Point Limit||int||Maximum amount of points that can be loaded into memory at once. These points are treated as cache between render buffer and hard drive. When point limit is exceeded, older points will be unloaded.|
|Load Meshes||bool||If this option is enabled, collider meshes will loaded alongside the point cloud data. This requires
Settings visible for renderer depend on currently selected rendering mode. Irrelevant settings will be hidden in inspector. Enabling additional features will sometimes show new settings related to them.
|Colorize||enum||Colorization mode to use for point cloud. If selected data is not present in source point cloud, result will be black. Available modes:
|Render Mode||enum||Describes how points should be represented. Available modes:
|Mask||enum||Enum flags used to enable or disable renderer's visibility. Point cloud will be visible only in selected passes. Available options:
|Shadow Point Size||float||Only visible if
|Shadow Bias||float||Only visible if
|Constant Size||bool||If this option is enabled, point size will not depend on distance from camera.|
|Pixel Size||float||Only visible with
|Absolute Size||float||Only visible with
|Min Pixel Size||float||Only visible with
Cascades options for Remove Hidden and Smooth Normals stages affect filter window size for both these effects and its scaling with distance for camera. They can be visualized by toggling
Show Preview option on.
Cascade options for Remove Hidden stage will only be visible if
Hidden Point Removal option is set to
Screen Space. For
Depth Prepass, they will be replaced with point rendering settings.
|Lighting Mode||enum||Determines how light will affect the point cloud. Available modes:
|Hidden Point Removal||enum||Method used for removing obscured points.
|Calculate Normals||bool||If enabled, normals approximation stage will be performed and world-space normals will be available. Required for lighting.|
|Smooth Normals||bool||If enabled, additional normals smoothing stage will be performed to reduce noise. Results will replace normals data from
|FoV Reprojection||bool||If enabled, wider image of point cloud will be rendered internally and it will be reprojected to desired camera FOV. This option reduces artifacts near the edges of the image. Does not affect final FOV.|
|Reprojection Ratio||float||Multiplier determining ratio between FOV used internally for
Solid rendering also has some debug options under separate tab. These are mostly directly affecting separate rendering stages, but some of them can me modified to affect final image.
|Linear depth||bool||If enabled, linear depth will be used throughout all compute shaders instead of depth buffer values.|
|Force fill||bool||If enabled, holes below horizon line will be filled regardless of their size. Can create blurred artifacts for large holes, but removes all holes in road for low density point clouds.|
|Fill threshold||float||Sets height threshold under which
|Blend sky||bool||If enabled, point cloud color and intensity will be blended to sky color instead of black. Removes black color around edges, but requires additional sky pre-render for lit mode.|
|Node Tree Loader||NodeTreeLoader||Reference to loader that will be queried for point cache updates.|
|Cull Camera||Camera||Reference to camera used for culling. If this field is left empty, main simulator camera will be used after simulation is started.|
|Cull Mode||enum||Determines how points are evaluated for visibility. Available modes:
|Point Limit||int||Number of points that should be pushed to render buffer. This value determines maximum amount of points that are visible at once and directly affects buffer size.|
|Min Projection||float||Minimum screen projection size along single axis (in pixels) that octree node has to occupy to be traversed further. Nodes below this threshold will not be visible.|
|Rebuild Steps||int||Number of frames to spend for render buffer rebuild. Previous fully completed buffer will be used until new one is ready. Values higher than 1 reduce per-frame cost of buffer rebuild, but can introduce popping.|