How to color a mesh or a points cloud from a geotif ?

Feel free to ask any question here
Post Reply
thomas.touze
Posts: 3
Joined: Mon Sep 07, 2020 11:18 am

How to color a mesh or a points cloud from a geotif ?

Post by thomas.touze »

Hy everybody,

I've got a 1km x 1 km scene with a 1m resolution. I have successfully imported a DTM, from a LiDAR survey, and a geotif.
I would like to color the DTM with the geotif, but I can't find how to proceed.

I have tried >> Edit > Colors > Interpolate from another entity
But cc tells me it can't proceed because "clouds are too far from each other".
Indeed, my geotif has a 0 altitude whereas my DTM is around 500 m.

Has anyone an idea to solve this ?

Best regards,
Thomas.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How to color a mesh or a points cloud from a geotif ?

Post by daniel »

Do you mean that your geotiff is flat?
Daniel, CloudCompare admin
thomas.touze
Posts: 3
Joined: Mon Sep 07, 2020 11:18 am

Re: How to color a mesh or a points cloud from a geotif ?

Post by thomas.touze »

Good afternoon Daniel,

Yes it is flat.
You can have a look here:
Image

Best regards
Thomas.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How to color a mesh or a points cloud from a geotif ?

Post by daniel »

Hum, sadly, even if this looks silly, CC can only manage interpolation between 3D entities (as it relies on the nearest neighbor for each point to do it)...
Daniel, CloudCompare admin
thomas.touze
Posts: 3
Joined: Mon Sep 07, 2020 11:18 am

Re: How to color a mesh or a points cloud from a geotif ?

Post by thomas.touze »

OK, I supposed so.
Thank you for your time.
Best regards
Thomas.
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: How to color a mesh or a points cloud from a geotif ?

Post by WargodHernandez »

I wonder (without researching it much), if you could make this work by exporting your coordinates to scalar fields to save the 3d coordinates.

Code: Select all

Edit->Scalar fields->Export coordinate(s) to SF(s)
Then create a constant scalar field with a value of 0.0 and a name of "ZZero"

Code: Select all

Edit->Scalar fields->Add constant SF
Then select "Coord. Z" as the active scalar field in the properties window and rename to something else like "ZOrig"

Code: Select all

Edit->Scalar fields->Rename
Then select "ZZero" as the active scalar field in the properties window and rename to "Coord. Z"
Then we set set our SF as coordinate (This command takes the SF named "Coord. Z" and applies the values in the SF as the new coordinates which should all be zero)

Code: Select all

Edit->Scalar fields->Set SF as coordinate(s)
Then select both the cloud and the tif and interpolate the color from tif to the cloud

Code: Select all

Edit->Colors->Interpolate from another entity
Then delete "Coord. Z" and rename "ZOrig" to "Coord. Z" and finally set SF as coordinate to restore the 3d cloud
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How to color a mesh or a points cloud from a geotif ?

Post by daniel »

Ah! It might work indeed (since the clouds are dense and all)
Daniel, CloudCompare admin
pbrgle1
Posts: 1
Joined: Tue Nov 23, 2021 5:30 pm

Re: How to color a mesh or a points cloud from a geotif ?

Post by pbrgle1 »

Thank you WargodHernandez! Works like a charm! :)
I used your technique to colourize the vegetation, which is then used in Twinmotion for diagrammatic (but accurate) architectural visualizations.
Image
Image
Last edited by pbrgle1 on Tue Nov 23, 2021 5:45 pm, edited 2 times in total.
Post Reply