Page MenuHome

New pointcloud object type
Confirmed, HighPublicTO DO

Assigned To
None
Authored By
Philipp Oeser (lichtwerk)
Apr 14 2020, 11:01 AM
Tokens
"Love" token, awarded by softyoda."Love" token, awarded by gritche."Love" token, awarded by Peine_Perdue."Love" token, awarded by KeirCB."Love" token, awarded by stratmann."Pirate Logo" token, awarded by SHEIKH."Love" token, awarded by Dir-Surya.

Description

Status: ? Single line or paragraph human readable text.


Team

Commissioner: ? Core developer or artist, sign off the project, works as client/qa/tests.
Project leader: ? Main developer responsible for the implementation, only in one project.
Project members: - Optional other developers, can be in multiple projects at once.

Description

Big picture: ?

Use cases:

  • Part of Particle Nodes, Datasets (for example from LIDAR scanning)
  • As part of Photogrammetry / Reconstruction itself (but is out of scope here)
  • Also might make sense to let the MotionTracker output pointclouds ("3D Markers to Mesh" -> "3D Markers to Pointcloud") (also out of scope here)

Design:

  • New Pointcloud datablock (similar to Mesh) with Points.
  • Particle Nodes could reference (and output to) Pointclouds?
  • Simple editmode (mostly for simple operators and managing attributes?)
  • Modifiers (initial distribution, meshing)

Engineer plan:

  • ? Abstract code samples - linked here, UML, API guidelines, library changes.
Work plan

Milestone 1
Time estimate: ?

  • PointCloud data type
    • Color attribute
  • PointCloud Conversion / Object operators
    • Dataset import
    • Simple Operations
      • Mesh (vertices) <--> Pointcloud (points) operator D7391
      • Join Pointclouds operator
    • Pointcloud --> mesh (meshing -- VDB voxel?): Modifier / Node
    • Evenly distribute points over a Mesh --> Pointcloud (points): Modifier / Node Point distribute node
  • PointCloud Rendering
    • Eevee (is implemented as Overlay atm.)
    • Cycles
    • general CustomDataLayer/Attribute node?
  • PointCloud python API access to location/radius/index exists through "Point" struct, but
    • general creation/access to CustomDataLayers arrays like position/radius/... (or just restricted to other layers needed by particle nodes?) [for numpy, exporters, nodes] (I think bmesh BMLayerCollection / BMLayerItem / BMLayerAccess does not allow this either?)
  • Instancing Geometry node tree handles this
  • Snapping should we be able to snap to pointclouds?
  • Remove CD_LOCATION and use CD_PROP_FLOAT3 instead. (Need to make sure that the Location/Position property always exists.)

Milestone 2
Time estimate: ?

  • PointCloud Inspection
    • Overlay with value(s) next to each (selected) point Looks like this in the viewport (sample picture)
      • UI in Properties Editor?: UIList for each customdatalayer: display color/value/ [see AOVs - they show their type]... and a camera icon next to the one that should be displayed?
      • UI in Overlays Panel?: same as above [this may be another section next to 'Developer' (mesh indices) and Measurements (Edge Length etc)]
      • T89658: Support previewing geometry in the viewport
  • PointCloud Editmode
    • Selection Tools
    • Manage Attributes (select points, enter values)
    • Attribute Paint?
    • Simple Operations
      • Delete Points
      • Separate Selected
      • Duplicate
      • Transform system integration
      • Filtering / Cleanup (Datasets)
      • Stiching / Aligning?
      • Filling Holes?

Relevant links:

  • -

Event Timeline

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.Apr 14 2020, 11:01 AM
Philipp Oeser (lichtwerk) triaged this task as High priority.
Philipp Oeser (lichtwerk) created this task.

Still a bit unsure how this fits with the design of T76659: Geometry Attributes Design, but added a color layer to pointclouds, see P1438.

For the design, this should be the same as the attributes design and sculpt vertex colors for meshes.

So rather than a single color layer, there should be an arbitrary amount of named layers, of which one color layer is active for display similar to vertex colors. There should be a collection of all attributes in .attributes, and a collection of just the color attributes in .vertex_colors (or another name, not sure which one is ideal).

I don't know would it be useful or not but there is a open source project for point cloud processing as it should be for Lidar data. It called Cloud compare - https://www.danielgm.net/cc/

Is there an update for this project? With object nodes working, it would be great to import point clouds.

I would also like to know what the updates to this project are?

At this point a lot of procedural things have been handled by geometry nodes already. Though more point cloud specific operations could be added.

For things like edit mode and attribute painting, it's really just lack of resources slowing things down.

hi, i have a question about python api. there seems to be fixed number of points (400) when object is created from add menu, and zero when created as new datablock, and there is no apparent way to add new points like in mesh with MeshVertices.add(count), foreach_set then sets only first 400 point locations. do i miss something, or is it something pending?

I guess there would need to be a function to create a new point cloud with a certain size. So far there hasn't been the need for that, but I think it would probably make sense.

having size to set when datablock is created would be very very helpful. normals, colors etc. could be stored in attributes..
would be nice to see what cycles can do with real point cloud data now when points can be rendered as spheres (with color as well i hope)
i can easily get points loaded as numpy arrays, but right now i need to create mesh vertices with attributes, make instances on them in geometry nodes, colorize them (and in reality flatten them into single large mesh) and then render

having size to set when datablock is created would be very very helpful. normals, colors etc. could be stored in attributes..
would be nice to see what cycles can do with real point cloud data now when points can be rendered as spheres (with color as well i hope)
i can easily get points loaded as numpy arrays, but right now i need to create mesh vertices with attributes, make instances on them in geometry nodes, colorize them (and in reality flatten them into single large mesh) and then render

Maybe I am misunderstanding, but you can already create your mesh vertices and convert to pointcloud via Object > Convert > Pointcloud (this will have as many points as vertices in the mesh and will keep an existing color attribute of a vertex domain as well). If you add your own radius attribute, just remember to set a value for it [think it defaults to zero] via python.
This is a mesh Suzanne converted to pointcloud, then added radius and color attributes, randomized data values via python, rendered in Cycles:

But having a better API / more functions would certainly help.

Also Mesh To Points node does it too, no? (no need for instancing - can use native Cycles point rendering)

thanks, mesh to points conversion works well, nice that it even keeps any attribute i add on vertices. it is only a bit counter-intuitive

Is there roadmap about the implementation of the features?