Point Cloud Visualizer

by Jakub Uhlík in Scripts and Addons


Point Cloud Visualizer


Display, edit, filter, render, convert, generate and export colored point cloud PLY files.

Works with any Binary or ASCII PLY file with ‘x, y, z, nx, ny, nz, red, green, blue’ vertex values. Vertex normals and colors are optional.


Full documentation here: https://jakubuhlik.com/docs/pcv/docs.html and also included with addon files


Installation

  • Unzip files
  • Start Blender
  • Go to Preferences - Edit > Preferences
  • Choose Add-ons from left panel
  • Click Install.. button on top
  • Choose space_view3d_point_cloud_visualizer.zip and confirm with Install Add-on
  • Enable by checking the Enable checkbox

General Use

  • Add any object type to scene.
  • Go to 3d View Sidebar (N) > Point Cloud Visualizer tab, on main panel click file browser icon, select ply file, click Load.
  • Click Erase to hide point cloud and Draw button to display point cloud again.


PCV



Panels

Main

Main

Select ply file to load together with main Draw and Erase buttons.

Shader

Shader

Adjust percentage of points Display, point Size and Alpha. Shader type and its options (if any). Also display extras - point Normals and Bounding Box, extras options are shown with icon on side.

Shaders

Shaders

Load

Load

Here are options for ply loading, loaded data post-processing and safety checks.

To use partial load, first enable clicking checkbox Partial Load and set method. For extra large clouds with ordered data, you can choose Slice method which will load only a continuous part of points. To extract points from whole file you can use Spaced or Random. Spaced first load all points to system memory and then evenly spaced points from all are chosen and the rest is discarded to free system memory. This can be used when you are able to fit all points into system memory, but you don’t need to draw them all and it is still quite fast. Random method is slow, but much less system memory is needed to load subset of points. Points are read from file randomly and only single point is read each time until requested percentage is met.

Data post-processing lets you choose default color if points does not have any, convert 16bit colors, apply gamma correction, shuffle points (to be used with Shader > Display), you can disable storing of raw loaded data to save memory or disable automatic drawing after load to check number of loaded points first before drawing to prevent crashes from low gpu memory.

Safety lets you set maximum number of points to display regardless how many points are loaded to prevent crashes from low gpu memory.

Clip

Clip

To use, switch shader type to Clip. This shader is drawn with 6 clipping planes. Planes can be enabled/disabled independently with eye icon, first 3 values are plane normal (x, y, z), last value is plane distance from origin. These can be set from different object bounding box, choose object from scene in Object and hit Set Clip Planes From Object Bounding Box, object can then be hidden/deleted, set values will stay until operator is executed again. X reset all the settings to their defaults.

Edit

Edit

Quasi point cloud Edit Mode. Hit Enable Edit Mode and all points will be converted to helper mesh with vertices and entered to mesh edit mode. You can transform, delete and duplicate vertices using regular Blender’s tools.

Edit

Filter

Filter

Filter current point cloud, all changes are only temporary, original data are still intact. To keep changes, you have to export cloud as ply file.

Simplify

Simplify point cloud to exact number of evenly distributed samples or voxel-like structure.

Project

Project points on mesh (or object convertible to mesh) surface. Projects point along their normals until it hit surface or Search Distance is reached. You can choose between Positive (along normal direction), Negative (vice versa) or both. Optionally you can Discard Unprojectable points that was not possible to project and after projection Shift points a fixed distance along normal (positive value) or the other way around (negative value). Projected points can be optionally colorized by vertex colors, uv texture and vertex group from target mesh.

Project

Transfer Colors

Transfer colors from point to Target mesh object vertex colors or UV texture. By default, color is taken from closest point, optionally you average point colors in set radius. Transfer colors to UV texture requires non-overlapping UV layout fully contained in unit square on target mesh and material with active Image Texture node with loaded image to operate on. Extending margins on UV texture uses blender baking system and requires Cycles to be set as render engine.

Transfer Color

Crop

Fast crop points by object bounding box.

Boolean

Intersect or Exclude points with mesh object.

Boolean

Color Adjustment

To use, switch shader type to Color Adjustment. Adjust exposure, gamma, brightness, contrast, hue, saturation, value or invert colors.

Remove Color

Remove points with exact/similar color as chosen in color picker (Eyedropper works too).

Remove Color

Merge

Load another ply and merge with currently displayed.

Join

Join current active point cloud with another on different object.

Render

Render

Only single point cloud per render/frame is supported. Output image is RGBA 8bit PNG - transparent background with colored point cloud, which can be composed over something else later.

Convert

Convert

Convert point cloud to mesh (each point to Vertex, Equilateral Triangle, Tetrahedron, Cube or Ico Sphere), instancer (with Ico Sphere) or particle system (with Ico Sphere). Point colors will be converted to vertex colors.

Convert

Generate

Generate

Generate point cloud from mesh (or object convertible to mesh) surface or volume.

Generate

Volume

Export

Export

Export current point cloud as binary ply file.

Sequence

Sequence

Load sequence of ply files to play in viewport.

Sequence

Extras

With installed Open3D library (http://www.open3d.org/) you can use following extra features. Please read full documentation at https://jakubuhlik.com/docs/pcv/docs.html for installation and usage.

Voxel Downsample

Estimate Normals

Surface Reconstruction

Preferences

You can choose tab name for PCV to keep things organized.

API

You can use PCV to display point cloud data from other addons/custom scripts. See documentation.

Bugs? Suggestions?

Here: https://blenderartists.org/t/point-cloud-visualizer/

Changelog

1.4.0

  • MatCap and MatCap Billboard shaders
  • Fast bounding box Crop points
  • Open3D: Voxel Downsample, Estimate Normals and Surface Reconstruction
  • fixed render transparency (blender 2.9x)

1.3.0

  • Remove Color numeric input with python expression and invert selection operator
  • Convert use custom mesh as instance
  • Project filter align projected point normal to target mesh surface normal
  • fixed point generation on triangles with very small area when using Weighted Random In Triangle
  • fixed Sequence not reseting when new blend is loaded

1.2.0

  • viewport menu to batch control PCV instances
  • Height Colors, Depth Effects and Alpha shaders
  • load alpha, export alpha
  • render with manual depth sorting
  • fixed sequence animation render

1.1.0

  • transfer colors from point cloud to mesh vertex colors or uv texture
  • voxel simplification method
  • generate points in mesh volume

1.0.0

  • core completely rewritten
  • takes less system memory
  • better undo / redo handling
  • partial ply loading - slice, evenly spaced or random strategies
  • out of video memory crash prevention with maximum display points user setting
  • more shader types and shader options (Phong, Billboard, Billboard Phong, Fresnel, Bounding Box, Position with scale and offset)
  • render to image with any shader
  • optional faster triangulated conversion to mesh
  • many small fixes and optimizations

0.x.x