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.
How to color a mesh or a points cloud from a geotif ?
-
- Posts: 3
- Joined: Mon Sep 07, 2020 11:18 am
Re: How to color a mesh or a points cloud from a geotif ?
Do you mean that your geotiff is flat?
Daniel, CloudCompare admin
-
- Posts: 3
- Joined: Mon Sep 07, 2020 11:18 am
Re: How to color a mesh or a points cloud from a geotif ?
Good afternoon Daniel,
Yes it is flat.
You can have a look here:
Best regards
Thomas.
Yes it is flat.
You can have a look here:
Best regards
Thomas.
Re: How to color a mesh or a points cloud from a geotif ?
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
-
- Posts: 3
- Joined: Mon Sep 07, 2020 11:18 am
Re: How to color a mesh or a points cloud from a geotif ?
OK, I supposed so.
Thank you for your time.
Best regards
Thomas.
Thank you for your time.
Best regards
Thomas.
-
- Posts: 187
- Joined: Tue Mar 05, 2019 3:59 pm
Re: How to color a mesh or a points cloud from a geotif ?
I wonder (without researching it much), if you could make this work by exporting your coordinates to scalar fields to save the 3d coordinates.
Then create a constant scalar field with a value of 0.0 and a name of "ZZero"
Then select "Coord. Z" as the active scalar field in the properties window and rename to something else like "ZOrig"
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)
Then select both the cloud and the tif and interpolate the color from tif to the cloud
Then delete "Coord. Z" and rename "ZOrig" to "Coord. Z" and finally set SF as coordinate to restore the 3d cloud
Code: Select all
Edit->Scalar fields->Export coordinate(s) to SF(s)
Code: Select all
Edit->Scalar fields->Add constant SF
Code: Select all
Edit->Scalar fields->Rename
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)
Code: Select all
Edit->Colors->Interpolate from another entity
Re: How to color a mesh or a points cloud from a geotif ?
Ah! It might work indeed (since the clouds are dense and all)
Daniel, CloudCompare admin
Re: How to color a mesh or a points cloud from a geotif ?
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.
I used your technique to colourize the vegetation, which is then used in Twinmotion for diagrammatic (but accurate) architectural visualizations.
Last edited by pbrgle1 on Tue Nov 23, 2021 5:45 pm, edited 2 times in total.