Supported, maintained and updated to work in latest Blender versions. Many, many more features.
Available here: https://www.blendermarket.com/products/pcv
Full documentation is here: https://jakubuhlik.com/docs/pcv/docs.html
Display, edit, filter, render, convert, generate and export colored point cloud PLY files.
Works with any PLY file with 'x, y, z, nx, ny, nz, red, green, blue' vertex values. Vertex normals and colors are optional.
Point Cloud Visualizer
tab, click file browser icon, select ply file, click Load PLY
. Reload
button next to it reloads ply from disk.Draw
button to display point cloud, Erase
to hide point cloud. Adjust percentage of displayed points with Display
, point size with Size
and point transparency with Alpha
.Normal
icon, adjust line length with Length
next to it.Illumination
'adds' single artificial light on points, you can edit its direction and strength. Works only when vertex normals are present.Illumination
to have better cloud viewDisplay
- percentage of displayed pointsSize
- point size in pixelsAlpha
- global points alphaNormals
- display point normals as lines, adjust line length with Length
next to itIllumination
- enable extra illumination, works only when vertex normals can be loadedLight Direction
- illumination light directionLight Intensity
- illumination light intensityShadow Intensity
- illumination shadow intensityDepth
- enable depth debug shaderBrightness
- depth shader color brightnessContrast
- depth shader color contrastFalse Colors
- display depth shader in false colorsColor A
- depth shader false colors front colorColor B
- depth shader false colors back colorNormal
- enable normal debug shaderPosition
- enable position debug shaderShader 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.
Enable Clipping Planes Shader
- enable shaderPlane 0
- plane 0 normal (x, y, z), plane 0 distance from originPlane 1
- plane 1 normal (x, y, z), plane 1 distance from originPlane 2
- plane 2 normal (x, y, z), plane 2 distance from originPlane 3
- plane 3 normal (x, y, z), plane 3 distance from originPlane 4
- plane 4 normal (x, y, z), plane 4 distance from originPlane 5
- plane 5 normal (x, y, z), plane 5 distance from originObject
- object to use as bounding box sourceSet Clip Planes From Object Bounding Box
- set planes from selected object bounding boxX
- reset all the settings to their defaultsQuasi point cloud Edit Mode. Hit Start
and all points are converted to helper mesh with vertices and entered to mesh edit mode. You can transform, delete and duplicate vertices using regular Blender's tools. If you want update displayed points, hit Update
, when you are finished editing hit End
to update points for a last time and delete helper mesh. If something went wrong, select main object with cloud and hit Cancel
to reload original points, return interface to regular mode and attempt to clean helper mesh if it is still available.
Export
feature and check Use Viewport Points
because edits are only in memory, if you close Blender, edits will be lost.Start
- Start edit mode, create helper object and switch to it
Overlay Alpha
- Overlay point alpha
Overlay Size
- Overlay point size
Update
- Update displayed cloud from edited mesh
End
- Update displayed cloud from edited mesh, stop edit mode and remove helper object
Cancel
- Stop edit mode, try to remove helper object and reload original point cloud
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 point cloud to exact number of evenly distributed samples. All loaded points are processed. Higher samples counts may take a long time to finish. Surely there are better (and faster) tools for the job, but.. Basically it takes some random point and set as accepted sample, then another set of random candidates, measure distance from already accepted samples and stores the one that is most distant as another accepted, repeat until number of samples is reached.
Samples
- Number of points in simplified point cloud, best result when set to less than 20% of points, when samples has value close to total expect less points in resultCandidates
- Number of candidates used during resampling, the higher value, the slower calculation, but more evenSimplify
- run operatorProject 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.
Object
- Mesh or object convertible to meshSearch Distance
- Maximum search distance in which to search for surfacePositive
- Search along point normal forwardsNegative
- Search along point normal backwardsDiscard Unprojectable
- Discard points which didn't hit anythingColorize
- Colorize projected pointsSource
- Color source for projected point cloud
Vertex Colors
- Use active vertex colors from targetUV Texture
- Use colors from active image texture node in active material using active UV layout from targetVertex Group Monochromatic
- Use active vertex group from target, result will be shades of greyVertex Group Colorized
- Use active vertex group from target, result will be colored from red (1.0) to blue (0.0) like in weight paint viewportShift
- Shift points after projection above (positive value) or below (negative value) surfaceProject
- execute operatorIntersect or Exclude points with mesh object. Mesh have to be non-manifold.
Object
- Mesh or object convertible to meshIntersect
- Keep points inside mesh, remove points outsideExclude
- Keep points outside mesh, remove points insideRemove points with exact/similar color as chosen in color picker (Eyedropper works too). Currently i can't get to match sampled color from viewport with color in loaded cloud. Floating point error, incorrectly handled Gamma (at my side for sure), color management in Blender's viewport or any combination of all, or something else.. Anyway, if you leave at least one delta at hue/saturation/value (whatever works best for given cloud) it should remove the color you picked.
Color
- Color to remove from point cloudΔ Hue
- Delta hueΔ Saturation
- Delta saturationΔ Value
- Delta valueSelect Color
- Run operator and display selected points in viewport for reviewX
- DeselectDelete Selected
- Delete selected pointsLoad another ply and merge with currently displayed. Hit Merge With Other PLY
, select ply file and load. New point will be appended to old, shuffled if shuffle is enabled in preferences.
Merge With Other PLY
- run operatorJoin current active point cloud with another on different object. Object transformations are applied to clouds to look the same as before joining.
Object
- select object with another point cloud to joinJoin
- run operatorAdjust exposure, gamma, brightness, contrast, hue, saturation, value or invert colors. Click Enable
to enable color adjustment shader, adjust values as needed, click Apply
to apply colors to points. Click Reset
to set all to default value. Shader can be disabled without changes anytime unchecking Enable
. When color adjustment shader is enabled, all other shaders are disabled.
Enabled
- Enable color adjustment shader, other shaders will be overrided until disabledExposure
- formula: color = color * (2 ** value)Gamma
- formula: color = color ** (1 / value)Brightness
- formula: color = (color - 0.5) * contrast + 0.5 + brightnessContrast
- formula: color = (color - 0.5) * contrast + 0.5 + brightnessHue
- formula: color.h = (color.h + (value % 1.0)) % 1.0Saturation
- formula: color.s += valueValue
- formula: color.v += valueInvert
- formula: color = 1.0 - colorReset
- Reset color adjustment valuesApply
- Apply color adjustments to points, reset and exitCurrently only sigle 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.
Size
or percentage of rendered points with Count
Output
.Resolution X
, Resolution Y
and Resolution %
.Illumination
is enabled it will be rendered as wellRender
or Animation
Count
- percentage of rendered pointsSize
- point render size in pixelsSupersampling
- Render larger image and then resize back to anti-alias, 1 - disabled, 2 - render 200%, 3 - render 300%, etc.Smooth Circles
- Currently works only for basic shader with/without illumination and generally is much slower than Supersampling, use only when Supersampling failsOutput
- path where to save rendered images, #
characters defines the position and length of frame numbers, image is always saved, filetype is always png, accepts relative paths, upon hitting Render
path is validated, changed to absolute and written backResolution X
- image width in pixelsResolution Y
- image height in pixelsResolution %
- percentage scale for resolutionResolution Linked
- when enabled, settings are taken from scene, if not they are independent on scene, but aspect ratio is not calculatedUse Supersampling
for most of the time with lowest value (to be exact, 2
works great) that look still good. If you run into problems due to very large supersampled image sizes Blender or hardware cannot handle, you can try to disable Supersampling
and use Smooth Circles
to draw smooth points directly in target resolution, but you are limited to basic shader and points before drawing have to be depth sorted manually which can be very slow with large point counts.
Convert point cloud to mesh. May result in very large meshes, e.g. 1m point cloud to cubes = 8m poly mesh. Depending on what point cloud data is available and desired mesh type, some options may not be enabled.
Conversion to instancer specifics: points are converted to triangle mesh object, vertex colors are baked to texture, extra instanced sphere object is added as child object of main mesh, material using baked colors is added to sphere and each instance inherits color of corresponding face it is instanced from.
Conversion to particles specifics: points are converted to triangle mesh object, vertex colors are baked to texture, particle system is added to mesh with one particle on each face, extra instanced sphere added as child object of main mesh and particle system is set to render that sphere, material using baked colors is added to sphere and each instance inherits color of corresponding face it emit from. Result is regular particle system which can be further edited, e.g. instance mesh changed, physics added etc.
Type
- Instance mesh type, Vertex, Equilateral Triangle, Tetrahedron, Cube or Ico SphereAll
, Subset
- Use all points or random subset of by given percentageSize
- Mesh instance size, internal instanced mesh has size 1.0 so if you set size to 0.01, resulting instances will have actual size of 0.01 event when cloud is scaledAlign To Normal
- Align instance to point normal, e.g. tetrahedron point will align to normal, triangle plane will align to normal etc.Colors
- Assign point color to instance vertex colors, each instance will be colored by point color (except vertices)Sphere Subdivisions
- Conversion to instancer / particles only, number of subdivisions of particle system instanced ico sphereGenerate point cloud from mesh (or object convertible to mesh). To store point cloud, use Export
to save as ply file.
Source
- Points generation source
Vertices
- Use mesh verticesSurface
- Use triangulated mesh surfaceParticles
- Use active particle systemParticles
(Source: Particles)
- Particles source selection
All
(Source: Particles)
- Use all particlesAlive
(Source: Particles)
- Use only alive particlesAlgorithm
(Source: Surface)
- Point generating algorithm
Weighted Random In Triangle
- Average triangle areas to approximate number of random points in each to get even distribution of points. If some very small polygons are left without points, increase number of samples. Mesh is triangulated before processing, on non-planar polygons, points will not be exactly on original polygon surface.Poisson Disk Sampling
- Warning: slow, very slow indeed.. Uses Weighted Random In Triangle algorithm to pregenerate samples with all its inconveniences.Approximate Number Of Points
(Source: Surface)
- Number of points to generate, some algorithms may not generate exact number of points.Seed
(Source: Surface)
- Random number generator seedColors
(Source: Vertices, Surface, Particles)
- Color source for generated point cloud
Constant Color
- Use constant color valueVertex Colors
- Use active vertex colorsUV Texture
- Generate colors from active image texture node in active material using active UV layoutVertex Group Monochromatic
- Use active vertex group, result will be shades of greyVertex Group Colorized
- Use active vertex group, result will be colored from red (1.0) to blue (0.0) like in weight paint viewportColor
(Source: Vertices, Surface, Particles)
- Constant colorExact Number of Samples
(Source: Surface, Algorithm: Triangle)
- Generate exact number of points, if selected algorithm result is less points, more points will be calculated on random polygons at the end, if result is more points, points will be shuffled and sliced to match exact valueMinimal Distance
(Source: Surface, Algorithm: Poisson)
- Poisson Disk minimal distance between points, the smaller value, the slower calculationSampling Exponent
(Source: Surface, Algorithm: Poisson)
- Poisson Disk presampling exponent, lower values are faster but less even, higher values are slower exponentiallyWhen Source
is Particles
, for generating colors (apart from Constant
color), non-overlapping UV layout is required (can be really bad, useless for real production).
Export current point cloud as binary ply file with several options. If exporting modified (filtered) points, check Use Viewport Points
, otherwise you will not get modified points. If exporting viewport points colors may slightly differ. Transformation and axis conversion can be applied on both loaded and viewport points.
Use Viewport Points
- When checked, export points currently displayed in viewport or when unchecked, export data loaded from original ply fileVisible Points Only
- Export currently visible points only (controlled by 'Display' on main panel)Apply Transformation
- Apply parent object transformation to pointsConvert Axes
- Convert from blender (y forward, z up) to forward -z, up y axesLoad sequence of ply files to play in viewport. Load first frame as regular file and when Preload Sequence
is clicked it tries to load all ply files matching selected ply filename, e.g. you select sequence-001.ply
and all sequence-###.ply
will be loaded from directory. Only last number in filename is considered. Numbers should start at 1. All other features works when animation is not playing, but all changes are lost when you change frame to another.
Preload Sequence
- Load all matching ply filesCycle Forever
- Cycle frames if timeline is longer than number of loaded framesClear Sequence
- Clear all loaded and return object to regular state i.e. you can load another ply, changes are kept etc.To display point cloud data from other addons/custom scripts.
import bpy
import numpy as np
from space_view3d_point_cloud_visualizer import PCVControl
o = bpy.context.active_object
c = PCVControl(o)
n = 100
vs = np.random.normal(0, 2, (n, 3))
ns = np.array([[0.0, 0.0, 1.0]] * n)
cs = np.random.random((n, 3))
# draw points
c.draw(vs, ns, cs)
# if some data like normals/colors are not available
c.draw(vs, None, None)
c.draw(vs, [], [])
c.draw(vs)
# it is also possible to pass nothing in which case nothing is drawn
c.draw()
# to stop any drawing
c.erase()
# to return object control to user
c.reset()
Default
- Default color to be used upon loading PLY to cache when vertex colors are missingNormal
- Display color for vertex normals linesSelection
- Display color for selectionShuffle Points
- Shuffle points upon loading, display percentage is more useable if points are shuffled, disabled if you plan to export ply and you need to keep point orderConvert 16bit Colors
- Convert 16bit colors to 8bit, applied when Red channel has 'uint16' dtypeGamma Correct 16bit Colors
- When 16bit colors are encountered apply gamma as 'c ** (1 / 2.2)'Tab Name
- To have PCV in its own separate tab, choose oneCustom Tab Name
- Check if you want to have PCV in custom named tab or in existing tabName
- Custom PCV tab name, if you choose one from already existing tabs it will append to that tabPresets support for Render > Color Management panel, nothing more, nothing less.. Comes with a few presets i use which are created upon activation.
UV unwrap tube-like meshes (all quads, no caps, fixed number of vertices in each ring)
notes:
usage:
changelog:
Import/Export single mesh as Wavefront OBJ. Fast. Now with Cython. Binaries not included.
Only active mesh is exported. Only single mesh is expected on import. Supported obj features: UVs, normals, vertex colors using MRGB format (ZBrush) or 'Extended' format (import only) where vertex is defined as (x,y,z,r,g,b).
changelog:
installation on mac (win/linux should be similar) and blender 2.83.6 assuming you have blender in /Applications/Blender.app:
get pip and install cython using pip
cd /Applications/Blender.app/Contents/Resources/2.83/python/bin/ ./python3.7m -m ensurepip ./python3.7m -m pip install -U pip ./pip3 install cython
clone blender source
cd ~/Library/Application Support/Blender/2.83/scripts/addons/io_mesh_fast_obj git clone git://git.blender.org/blender.git cd blender git checkout v2.83.6
build cython extension
/Applications/Blender.app/Contents/Resources/2.83/python/bin/python3.7m setup.py build_ext --inplace
Import cameras from Agisoft PhotoScan xml. Works with xml version 1.4.0 which is exported from PhotoScan 1.4.x versions and xml versions 1.5.0 from Agisoft Metashape 1.5.x versions. If you want to have images actually aligned with model, undistort images first. This is done in PhotoScan by Export > Undistort Photos..
. Because you can't in Blender set resolution for cameras independently, xml with different cameras or image resolutions might not work well.
usage:
Properties > Scene > Import Agisoft PhotoScan Cameras
panelPhotoScan Cameras Utilities
panelchangelog:
Ever-evolving set of small tools, workflows and shortcuts focused mainly on processing photogrammetry scans.
changelog:
Simple time tracker inside blender. After you install and enable it, it will log loaded and saved files and time spent of file until it is saved. All ui is inside addon preferences.
Here you can enable / disable logging, clear data collected so far, set custom data path (.csv) and see short summary of collected data and open individual project directories in file browser. The project name is determined by directory name where the blend is. For example if you have project in directory named "MyNewOutstandingProject" and all blends are inside subdirectory "models", set level number to 1 and you will see project name in results. 0 is directory directly above blend, 1 is one directory above blend, and so on. If you are like me and all your projects have the same subdirectory structure, sent directory level and you are good to go.
changelog: