New pointcloud object type #75717

Open
opened 2020-04-14 11:01:00 +02:00 by Philipp Oeser · 17 comments
Member

Status: Developers needed for point cloud editing features. Some features part of geometry nodes project


Team
Commissioner: ?
Project leader: ?
Project members: -

Description
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 motion tracker output point clouds ("3D Markers to Mesh" -> "3D Markers to point cloud") (also out of scope here)

Design:

  • New point cloud data-block (similar to mesh) with points.
  • Nodes to interact with points (distribute, deform, meshing, etc.)
  • Simple edit mode (mostly for simple operators and managing attributes?)

Work plan

Milestone 1
Basic integration of new data-block type

  • Point cloud data type
    • Attribute support
  • Point cloud conversion / object operators
    • Data-set import
    • Simple operations
      • Conversion to and from mesh D7391
      • Join point clouds operator
    • Point cloud meshing (OpenVDB tools)
    • Points distribution on meshes Point distribute node
  • Point cloud rendering
    • EEVEE
    • Cycles
    • Attribute node support
  • Point cloud Python API
    • Access to location/radius/index exists through "Point" type
    • general creation/access to attributes
  • Instancing
  • Transform snap system integration
  • Remove CD_LOCATION and use CD_PROP_FLOAT3 instead

Milestone 2
More advanced features for editing point clouds

  • Point cloud Inspection
    • Attribute overlay
    • Spreadsheet editor
    • Attribute list
  • Point cloud edit mode
    • Display selected points in viewport
    • Common selection tools
    • Spreadsheet selection filter
    • Simple operators/nodes
      • #101778 (Node group operators)
      • Delete points
      • Separate selected
      • Duplicate
      • Transform system integration
      • Filtering / cleanup (Datasets)
      • Stitching / aligning?
      • Filling holes?
  • Technical attribute paint mode

Relevant links:

  • -
**Status:** *Developers needed for point cloud editing features. Some features part of geometry nodes project* --- **Team** **Commissioner:** `?` **Project leader:** `?` **Project members:** `-` **Description** **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 motion tracker output point clouds ("3D Markers to Mesh" -> "3D Markers to point cloud") (also out of scope here) **Design:** * New point cloud data-block (similar to mesh) with points. * Nodes to interact with points (distribute, deform, meshing, etc.) * Simple edit mode (mostly for simple operators and managing attributes?) **Work plan** **Milestone 1** *Basic integration of new data-block type* - [x] Point cloud data type - [x] Attribute support - [ ] Point cloud conversion / object operators - [ ] Data-set import - [ ] Simple operations - [x] Conversion to and from mesh [D7391](https://archive.blender.org/developer/D7391) - [ ] Join point clouds operator - [x] Point cloud meshing (OpenVDB tools) - [x] Points distribution on meshes *Point distribute node* - [ ] Point cloud rendering - [ ] EEVEE - [x] Cycles - [x] Attribute node support - [x] Point cloud Python API - [x] Access to location/radius/index exists through "Point" type - [x] general creation/access to attributes - [x] Instancing - [ ] Transform snap system integration - [x] Remove `CD_LOCATION` and use `CD_PROP_FLOAT3` instead **Milestone 2** *More advanced features for editing point clouds* - [x] Point cloud Inspection - [x] Attribute overlay - [x] Spreadsheet editor - [x] Attribute list - [ ] Point cloud edit mode - [ ] Display selected points in viewport - [ ] Common selection tools - [x] Spreadsheet selection filter - [ ] Simple operators/nodes - [x] #101778 (Node group operators) - [ ] Delete points - [ ] Separate selected - [ ] Duplicate - [ ] Transform system integration - [ ] Filtering / cleanup (Datasets) - [ ] Stitching / aligning? - [ ] Filling holes? - [ ] Technical attribute paint mode --- **Relevant links**: * `-`

This issue was referenced by 39de0b79fd

This issue was referenced by 39de0b79fd635ed67e8b1816c32199177d7f9f07
Author
Member

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

Still a bit unsure how this fits with the design of #76659 (Geometry Attributes Design), but added a color layer to pointclouds, see [P1438](https://archive.blender.org/developer/P1438.txt).

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).

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/

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.

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?

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

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.

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?

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?
Member

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.

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
Author
Member

In #75717#1282260, @JakubUhlik wrote:
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:
image.png

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

> In #75717#1282260, @JakubUhlik wrote: > 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: ![image.png](https://archive.blender.org/developer/F12787455/image.png) But having a better API / more functions would certainly help.
Author
Member

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

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

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?

Is there roadmap about the implementation of the features?
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:46:52 +01:00
Member
  • I added initial point cloud edit mode here: f89b32382a
  • And support for selection filtering in the spreadsheet here: 267d449a50

Since there's no real hurry or resources to work on it otherwise, I'd like to use point cloud edit mode as a testing ground for node group operators (#101778). Basically, the tools would be implemented only with node groups. That's an ambitious goal, but I think long term it makes sense, and being strict about that could help push the design further.

I think the only other "built-in" feature we need for now is a way to visualize the selection in edit mode.

- I added initial point cloud edit mode here: f89b32382af9e49c46a09515a3c2d1ad95fd2f68 - And support for selection filtering in the spreadsheet here: 267d449a506577526b59412a05a71e545940a938 Since there's no real hurry or resources to work on it otherwise, I'd like to use point cloud edit mode as a testing ground for node group operators (#101778). Basically, the tools would be implemented **only** with node groups. That's an ambitious goal, but I think long term it makes sense, and being strict about that could help push the design further. I think the only other "built-in" feature we need for now is a way to visualize the selection in edit mode.

I'm not convinced about implementing tools with node groups. We're unlikely to do that for tools for most other object types in the near future (or maybe ever). And so we'd end up with a set of operators that is inconsistent and more difficult to update and improve for developers familiar with existing operators.

I think we're in the middle of too many part way changes to other implementations or coding conventions that never actually finish. I'd rather not have another one.

I'm not convinced about implementing tools with node groups. We're unlikely to do that for tools for most other object types in the near future (or maybe ever). And so we'd end up with a set of operators that is inconsistent and more difficult to update and improve for developers familiar with existing operators. I think we're in the middle of too many part way changes to other implementations or coding conventions that never actually finish. I'd rather not have another one.
Member

To me node based tools is the natural progression of node group operators, just like we have tools for many builtin operators. Assets already have icons, so it's natural to consider those as tool icons. And we want to enable interactive modal operators with node groups anyway, to get the main benefit of using operators instead of modifiers.

I think you're right that using node groups to implement existing tools like box select, selection picking, or transform is not so beneficial, especially when factoring in consistency with existing code. I think it's reasonable not to ship such node groups with Blender.

However, I do think that supporting features used by builtin operators in node groups is a good general goal. Builtin operators give examples of higher level use cases, especially operators like "Extract Face Sets". But that's getting a bit off topic for this thread.

To me node based tools is the natural progression of node group operators, just like we have tools for many builtin operators. Assets already have icons, so it's natural to consider those as tool icons. And we want to enable interactive modal operators with node groups anyway, to get the main benefit of using operators instead of modifiers. I think you're right that using node groups to implement existing tools like box select, selection picking, or transform is not so beneficial, especially when factoring in consistency with existing code. I think it's reasonable not to ship such node groups with Blender. However, I do think that supporting features used by builtin operators in node groups is a good general goal. Builtin operators give examples of higher level use cases, especially operators like "Extract Face Sets". But that's getting a bit off topic for this thread.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
8 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#75717
No description provided.