CloudCompare: switch every cloud from Intensity to RGB at once
CloudCompare shows imported laser scans coloured by Intensity, even when they have RGB. A small Python script switches every cloud to RGB at once.
Clicking loads the video from YouTube: Google will receive your IP address and may store data on your device. Privacy · Watch it on YouTube
You have imported the scans of a laser survey into CloudCompare.
Every cloud has RGB colours, yet they all show up coloured by the Intensity scalar field.
With four clouds you fix it by hand; with two hundred you lose the morning.
Here I show you how to switch every cloud to RGB in one go, with a small Python script run inside CloudCompare.
The script only changes the display: the data is not modified and the intensity is still available.
This article comes from a video I published on my YouTube channel, in the CloudCompare On Demand series.
The video is in Italian, with English subtitles.
One cloud at a time
In CloudCompare I have four point clouds, four E57 files.
Once imported, they are coloured by the Intensity scalar field: you can see it in the Properties panel, under Colors.

The four scans in the DB Tree: the active colouring is Scalar field, that is the intensity.
To switch to RGB you have to change that setting.
The catch is that when you select several clouds at once, the Properties panel goes blank.
So you have to do it one cloud at a time.
With 50, 100 or 200 scans from a large survey campaign, that is a lot of wasted time.

1. Three clouds selected together in the DB Tree, 2. the Properties panel stays empty.
The intensity2rgb.py script
I had an AI tool write a small Python script: intensity2rgb.py.
It does one thing.
On every selected cloud, or on every cloud in the DB Tree if nothing is selected, it turns off the scalar field and turns on the RGB colours.
Clouds without RGB are left as they are, and the script lists them in the Console.

The start of the script: the comment at the top says everything it does. The comments are in Italian; the README on GitHub has an English version.
You can find it in the CloudCompareOnDemand repository on GitHub, with instructions in Italian and English.
Download it and save it in a folder: you will call it from the CloudCompare Python plugin.
One cloud, a selection or all of them
The script works on whatever is selected.
Select one cloud, and only that one changes.
Select a few, for instance to leave some out, and only those change.
To work on all of them, deselect everything in the DB Tree: the script then takes every cloud you have loaded into CloudCompare.

No cloud selected in the DB Tree: the script will work on all of them.
Running it with File Runner
You run the script from the Plugins menu, Python Plugin, File Runner.

The menu path: 1. Plugins, 2. Python Plugin, 3. File Runner.
In the window that opens, choose the file with Select File and press Run.
This works for any Python script you want to run inside CloudCompare, whether you wrote it or someone else did.

The File Runner window: 1. choose the file, 2. run it.
All the clouds change appearance instantly.
Nothing has changed in the data: the colour display has switched from Intensity, the scalar field, to RGB, for every cloud in the DB Tree.

After Run: the clouds are in RGB and Colors in Properties has switched to RGB.
The Python plugin must be installed
The Python plugin is available in the latest stable release of CloudCompare: you do not need the alpha.
I use 2.13.2 for Windows.
When you install CloudCompare, tick the Python plugin option, otherwise it is not installed.
When CloudCompare starts, have a look at the Console.
Scrolling down, there should be no red lines about plugins that fail to load.
In my case, before installing it, there were several red lines about the Python plugin.
Now the PythonRuntime lines are black: the plugin loads.

The Console at start-up: the PythonRuntime lines are black, the plugin is loaded.
If you do find red lines, uninstall CloudCompare, download it again and reinstall it with the Python plugin option ticked.
Show Editor and documentation
If you already have your .py file saved somewhere, the File Runner is all you need.
The same menu also has Show Editor: a Python editor inside CloudCompare, a sort of special notepad.
There you can write a script from scratch, or paste part of a script from elsewhere and adapt it.

The CloudCompare Python Editor, opened from Show Editor.
Show Documentation takes you to the website of the plugin’s developers.
It is all open source, a free resource for everyone, with information on the plugin and how to use it: Python plugin documentation.

The documentation of the CloudCompare Python plugin.
AI-written scripts in the software you use
What you have seen is a very simple example, but it leads to a broader point.
AI tools are now within everyone’s reach, and they write fairly solid code.
One way to use them is to have them write Python scripts that do one specific thing, inside a piece of software, on a certain type of data.
Much of the software you use every day is already open to this.
CloudCompare, QGIS and Blender, all open source, accept Python code.
So does commercial software: Metashape, which I use for photogrammetry, has a section in its Professional edition where you can bring in Python code to do specific tasks.
If what you need is limited in scope, you do not need advanced programming skills.
Hardly any at all.
What the software does not do, you can often add with some outside help.