Set random colors to separate point groups

Feel free to ask any question here
Post Reply
mdesign
Posts: 1
Joined: Fri Mar 11, 2022 5:52 pm

Set random colors to separate point groups

Post by mdesign »

I have separate point chunks like in the picture below.
Please tell me how to colourize every chunk to a different color (like in the link below) to separate those chunks in the next step into many separate clouds. I would like to have every point island in a separate color to split them into separate clouds.

https://www.cloudcompare.org/doc/wiki/i ... random_RGB

I`m a 3d modeler but in CloudCompare I`m the beginner.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Set random colors to separate point groups

Post by daniel »

So if each chuck is a a separate cloud, you will have to merge tem all first (highlight them all at once and use 'Edit > Merge'). When asked, accept to generate a scalar field with the original cloud index. You'll already see the chunks with separate colors (as the 'source index' scalar field should be displayed). But you can also call the method you found on the wiki (to generate RGB colors for each chunk).

If your chunks are already merged in a single cloud, you'll have to use the 'Tools > Segmentation > Label Connected Components' tool. You can split the chunks automatically, and ask CC to generate a random color each time.
Daniel, CloudCompare admin
Post Reply