Point Cloud Visualizer

pcv
header-500px

PCV 1.+ is available on BlenderMarket

https://jakubuhlik.com/docs/pcv/docs.html

from changelog:

  • 1.10.0

    • convert to geometry nodes with colors (blender 3.0+)
    • convert to mesh divided to even chunks
    • render points in 3d viewport together with other scene objects
  • 1.9.0

    • clipping planes for all shaders (viewport and render)
    • auto clipping planes update, linked object can be animated (viewport and render)
    • more Split filter options
    • shader panel updated
  • 1.8.0

    • faster rendering
    • render current or all visible point clouds
    • optional shuffle when joining points
    • optional basic uv layout generation for Convert (mesh based result)
    • Convert to vertex mesh with pcv-normal and pcv-color attributes (to be used with Geometry Nodes)
  • 1.7.0

    • new in edit mode: Select Color and Set Color
    • new filters Split and Join
    • Project filter point position change is now optional
    • Remove Color both by color and numbers and Color Adjustment Apply speed improvements
    • fixed View Points not being correct when container is transformed
  • 1.6.0

    • point set registration with several global and local methods (using Open3D)
    • normal estimation with normal orientation by direction or camera location (using Open3D)
    • new Fast viewport shader
    • new File > Import and 3D Viewport > Add helper menu operators
    • new center view on points operator
    • new edit operators: points to origin, apply transformation
    • edit mode enter, update and exit significantly faster
    • faster render manual depth sorting
    • compatibility with Blender 2.91 viewport drawing and rendering
    • compatibility with Open3D 0.10.0
    • fixed edit mode ui glitches
    • fixed ascii import guess separator
  • 1.5.0

    • Import points from text file formats
  • 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

27 Likes

Congratulations carbon2,
One more time, a very useful addon!
Friendly yours.
Namaste. :eyebrowlift:
Spirou4D

It’s amazing !!! :cool:
Thanks

I’ve been looking for this for months now. Thanks carbon2, well done :slight_smile:

Awesome. Thanks

update: added display percentage

Nice point cloud tool. hope somedays blender can import huge color pointcloud like recap.

Great, this new feature :slight_smile:

For information, ambient occlusion works on the cloud (my first test with photoscan trial version) :wink:
OpenGL render don’t work. Why ? Do you have a solution ?


opengl render (i guess) is out of reach from python, so i don’t think it is possible. 3d manipulators are not rendered too.

For turn around this problem, it’s possible to take bgl captures!!! It’s works perfectly ! :smiley:

update: 0.3.0 new ply loader, can be used with any binary ply file with vertex coordinates and colors
from now it should load any binary ply with ‘x, y, z, red, green, blue’ vertex values. all other values are ignored. color values must be in 0-255 range.

Awesome work!

But how to load a file automatically from python scripts? Setting the file path works:

bpy.data.objects[“empty”].point_cloud_visualizer.filepath = r’’‘path o\file.ply’’’

Loading the pc file by changing the default value for automatic loading to true is not working

Hi carbon2,
Nice work !
For opengl render under python you may take a look at MesureIt or archipack [1], (sharing same codebase).
The trick is to use gl to draw over an image rather than on screen.
Keep in mind that blender gl api is likely to deeply change under 2.8 (complete rewrite, not yet done).

[1] archipack gl render

i don’t think i understand, for rendering like on image right? not rendering to viewport, or there is some performance black magic, drawing all to in memory image and then the drawing image over viewport to speed things up…

So I’m very excited about this add-on, as I NEED vert colors from point clouds for what I’m trying to do.
I’m using Mandelbulb 3D to generate point clouds of 3D fractals to import into Blender for volumetric rendering in cycles and renderman. Mandelbulb 3D bases the vert colors on the fractally calculated colors, which is important. “Faking” that sort of thing just isn’t really possible.
So I’ve installed this … I think … All I need is the second link you listed, yes? I tried downloading the .zip from the first GitHub link, but Blender wouldn’t accept that for an install.
When I try to load my .ply files, I’m told “Unable to load .ply”
Here is one of my point clouds I’m attempting to import. This is a pretty small one. Just a default formula for test export. Some of the point clouds .ply files are over 150 megs, and I’m sure I could easily go bigger.
https://drive.google.com/open?id=1Boa4KLp1Hwf4FEcY89GU-IM5kr1jV__x

I very much look forward to be able to use this add-on.

… I even tried running the .ply thru MeshLab and exporting it as Collada, but Blender still didn’t bring in the vert colors.

the first link is my repo of all addons, it can’t be installed as a whole. the second link is addon itself.
but seems like you sorted it out and successfully installed addon, now the ply files. the ply you linked is ascii ply file and only binary ply files works in my addon. it has ply reader built in and it accepts only binary encoded ply files, so if you can save them as binary or in meshlab load your ascii ply, save as ply again, this time with binary encoding checked and you are good to go. i tested it with your file and works well.
by the way, with binary encoding you get much smaller file sizes…

Okay thanks. That worked to get it into your visualizer, and the colors do indeed come through nicely.
Is there a way for me to apply that to a volumetric material?
While trying to figure if/how I could do that, it crashed and gave me this error, which I duly report:

Traceback (most recent call last):
File “C:\Users\freeman\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\view3d_point_cloud_visualizer.py”, line 299, in modal
context.area.tag_redraw()
AttributeError: ‘NoneType’ object has no attribute ‘tag_redraw’

location: <unknown location>:-1

ALSO! Thanks for the tip about the binary file. I didn’t realize Mandelbulb 3D was outputting text. And no, there is no binary option, sadly.

can you provide some steps to reproduce the error? such errors does not say much. it might be for example, that you switched are type from viewport to something else while drawing pointcloud. documentation about drawing to viewport is kinda non existent…

Hi carbon2,
bgl is able to draw over viewport and over any image.
No black magick here, in MesureIt, the code draw gl only part over a black empty image and then composite with regular render.
This way you may add gl over any regular render, regardless of render engine used.

Sorry, no. It has only happened once, and I don’t remember exactly what series of steps I had done that resulted in that.
Any tips on using those vertex colors as the source for volumetric colors?
What I’m trying to do is use point clouds of fractals to create volumetrics in Blender, and really kinda need the colors from the fractals as well.