Forum

Author Topic: Colorize Points Inside a Polygon ?  (Read 76299 times)

Joel Cast

  • Newbie
  • *
  • Posts: 19
    • View Profile
Colorize Points Inside a Polygon ?
« on: March 20, 2025, 09:05:54 PM »
Hello,
I would like to be able to color specific areas of the point cloud, but unfortunately Agisoft Metashape does not offer this functionality. I can draw a polygon, but the color is only applied between the vertices, and the result is not very visually appealing.

I'm wondering if there is any workaround to actually color the points themselves. For example, when selecting points, they appear in pink, and when points are classified, they also change color depending on their class.

Ideally, I would like to create a polygon and color all the points inside it. You can see an example in the attached image.

If this is not natively possible, is there a script that could achieve this?

Thank you!

olihar

  • Sr. Member
  • ****
  • Posts: 374
    • View Profile
Re: Colorize Points Inside a Polygon ?
« Reply #1 on: March 20, 2025, 09:09:21 PM »
So you just want to make these selected points as single color of your choosing? this could be done with scripting, but why you want to do this I have questions about.

Joel Cast

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Colorize Points Inside a Polygon ?
« Reply #2 on: March 20, 2025, 09:42:14 PM »
When we present work areas to the client, we usually show the exploitation zones by displaying color-coded areas. On the 2D orthomosaic, the colors appear clearly since they are viewed from above. However, when we rotate the model in 3D view, the polygons and colors become misleading, as nothing is actually attached to the model or the point cloud — it’s just a visual overlay.

Previously, we handled this in another software, but I would like to stop constantly importing and exporting between platforms. Ideally, we would like to color the points directly within Metashape, so that the zones remain visible and consistent even when rotating the model in 3D.

Last Image is from trimble business center the color is stick on the point

I’ve attached some example images to illustrate what we’re trying to achieve — but instead of just overlaying polygons, we’d like to apply color directly to the points within those areas.

Paulo

  • Hero Member
  • *****
  • Posts: 1606
    • View Profile
Re: Colorize Points Inside a Polygon ?
« Reply #3 on: March 20, 2025, 10:30:03 PM »
Hi Joel,

one thing that comes to mind is to select your interest points by shape and then assign a clas (preferably unused)....

and when you present the cloud to client, view by class ...

In example I selected by polygon and assigned water class (blue)...
Best Regards,
Paul Pelletier,
Surveyor

Joel Cast

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Colorize Points Inside a Polygon ?
« Reply #4 on: March 20, 2025, 10:42:53 PM »
Paulo, thanks — but when we do it that way, I have to switch the view to 'Class', and I lose the real color of the site.

Paulo

  • Hero Member
  • *****
  • Posts: 1606
    • View Profile
Re: Colorize Points Inside a Polygon ?
« Reply #5 on: March 21, 2025, 01:15:12 AM »
I see Joel,

one thing you could do is duplicate chunk with cloud and shape. Then in duplicate chunk, crop points by shape and export as point file with arbitrary color. Finally reimport point file and compare with original by show aligned chunks option....

Something like attached screen copy..

A little bit convoluted and would have to be done by script...
Best Regards,
Paul Pelletier,
Surveyor

JMR

  • Hero Member
  • *****
  • Posts: 567
    • View Profile
Re: Colorize Points Inside a Polygon ?
« Reply #6 on: March 21, 2025, 08:59:35 PM »
Hi folks: There is an easy trick. Export orthomosaic, use your favourite image editor and add tint to the areas you want to highlight/colorize. Then re-import in Metashape.
After that you can colorize vertices using your fancy orthomosaic.



Best regards

José Martínez
Accupixel

Joel Cast

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Colorize Points Inside a Polygon ?
« Reply #7 on: March 21, 2025, 10:51:53 PM »
Hi José,
From a surveyor’s perspective, drawing freehand shapes in an image editor feels a bit impractical — each color usually represents a calculated volume, real distances, properly surveyed lines, and measurable quantities.
That said, I’m really curious to know how you managed to create the model with the colors from your orthomosaic. Is there actually an option to build the texture directly from the orthomosaic? I couldn’t find it on my end. I’m able to import a colorized orthomosaic, but it doesn’t seem to affect the model display in any way.

Thanks

Paulo

  • Hero Member
  • *****
  • Posts: 1606
    • View Profile
Re: Colorize Points Inside a Polygon ?
« Reply #8 on: March 22, 2025, 01:06:00 AM »
Joel,

there is an option to Colorize PointCloud or Model Vertices in Tools menu. Source for such coloring is either images or Orthomosaic...

Best Regards,
Paul Pelletier,
Surveyor

JMR

  • Hero Member
  • *****
  • Posts: 567
    • View Profile
Re: Colorize Points Inside a Polygon ?
« Reply #9 on: March 23, 2025, 01:42:37 AM »
Hi José,
From a surveyor’s perspective, drawing freehand shapes in an image editor feels a bit impractical — each color usually represents a calculated volume, real distances, properly surveyed lines, and measurable quantities.
Well, you can rasterize vector layers on Global Mapper, for example, and then export colorise the mesh vertices from orthomosaic. ( I’m a land surveyor too, by the way, and I find freehand pretty practical quite often)

Paulo

  • Hero Member
  • *****
  • Posts: 1606
    • View Profile
Re: Colorize Points Inside a Polygon ?
« Reply #10 on: March 24, 2025, 07:46:21 AM »
Salut Joel,

as JMR pointed out, one can produce an ortho masked with some tint for given selected polygons in a project.

Then from this masked ortho, one can easily texturize the model or colorize the point cloud.

In example, I show masked ortho by green tint for 2 selected areas (polygons) and corresponding colored point cloud and textured  model....

This process could be streamlined by script.
« Last Edit: March 24, 2025, 07:58:33 AM by Paulo »
Best Regards,
Paul Pelletier,
Surveyor