Forum

Author Topic: Calculating vertex colors very slow  (Read 10904 times)

Kjellis85

  • Full Member
  • ***
  • Posts: 220
  • Archaeological field supervisor
    • View Profile
    • Contact information at University of Tromsø
Calculating vertex colors very slow
« on: December 13, 2021, 05:02:52 PM »
Im running an object scan which extracted 45M faces from 19,4 m dense cloud. Face extraction took 262 seconds  while colorize took about three times as long. While calculating vertex colors Metashape only utilized about 5% of CPU (24core ryzen, no core highly utilized) and nothing of GPU. Memory consumption minimal. Should this be the case?

Processor   AMD Ryzen Threadripper 3960X 24-Core Processor    3.79 GHz
Installed RAM   128 GB (128 GB usable)

Metashape 1.7.4 13028 64-bit

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15629
    • View Profile
Re: Calculating vertex colors very slow
« Reply #1 on: December 13, 2021, 09:31:32 PM »
Hello Kjellis85,

Do you observe the same in 1.7.5 release?

Also please specify, if there's rolling shutter option enabled for any sensors in the project or whether the optimization with the additional corrections has been performed?
Best regards,
Alexey Pasumansky,
Agisoft LLC

Kjellis85

  • Full Member
  • ***
  • Posts: 220
  • Archaeological field supervisor
    • View Profile
    • Contact information at University of Tromsø
Re: Calculating vertex colors very slow
« Reply #2 on: December 15, 2021, 12:18:08 PM »
I skipped 1.7.5 and jumped right to 1.8 beta and did not observe the same problem, CPU utilization was ~100% during vertex colorization.

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 216
    • View Profile
    • Sketchfab Models
Re: Calculating vertex colors very slow
« Reply #3 on: May 10, 2025, 05:21:46 PM »
I'm having a similar problem.
My CPU is doing practically nothing, and Calculating Vertex Colors took absolutely ages.
Using 2.2.1 20539.
Same issue on every project i've been processing recently.

It doesn't help that this sub-task doesn't get it's own progress bar or any feedback in the console other than it starting.  It's almost as if it's hung, but there is some processing happening, and yes, it does finish.
Could we get the task progress bar show its progress, possibly?
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

olihar

  • Sr. Member
  • ****
  • Posts: 360
    • View Profile
Re: Calculating vertex colors very slow
« Reply #4 on: May 13, 2025, 12:31:11 PM »
Calculating vertex color for a mesh has always taken insane amount of time... but the question is why do you need to colorize the model, you will texture it anyways, just skip the colorizing.

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 216
    • View Profile
    • Sketchfab Models
Re: Calculating vertex colors very slow
« Reply #5 on: May 13, 2025, 02:53:24 PM »
... but the question is why do you need to colorize the model, you will texture it anyways, just skip the colorizing.

Actually, for my application, scanning underwater reefs, whole dive sites, the textured model mostly looks terrible, and isn't as useful.

The visibility underwater is pants compared to in air. So if you're not up close to the subject (I'm 4-5m above the bottom), it softens the photos a lot, and creates a texture that is also 'soft' and doesn't show the shape of the reef, rock, corals as well. So looking at the model using Model Shaded is actual way better! We can see every rock, coral, etc. And the colours of the vertices are perfectly good.

But yes, if I'm scanning coral heads, coral frames, etc, so 0.5, 1m away, the textures add a huge amount of detail and fool you into thinking that ever tiny polyp is modelled in 3d!

Try looking at scans of relatively flat terrain, roofs, etc... In model shaded you can often see more of the shape of the model, and shapes that get lost in the texture, whilst still looking 'realistic'.
So it's useful sometimes, for some applications.


So, yeah, we have to used coloured vertices, but I often don't have a create a texture! Saving hours of processing! Lol.
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15629
    • View Profile
Re: Calculating vertex colors very slow
« Reply #6 on: May 13, 2025, 04:14:44 PM »
Hello CheeseAndJamSandwich,

To speed up the processing I can suggest to uncheck "Calculate Vertex Colors" in Build Model dialog and call it after the mesh is generated from Tools Menu -> Model -> Colorize Vertices command. But before that you can also run Reduce Overlap command in order to disable excessive image overlap and use only part of the images for the mesh colorization processing.

Additionally please specify the typical approximate number of polygons in the mesh model, number of images and image resolution and share the screenshots of the Initial and Adjusted values tab from the Camera Calibration dialog.
Also specify, if you are using Fit Additional Corrections option in case of Optimize Cameras is utilized.
Best regards,
Alexey Pasumansky,
Agisoft LLC

wgreenePIMS

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Calculating vertex colors very slow
« Reply #7 on: May 14, 2025, 01:31:54 AM »
I'm having the same issue for underwater image sets. Models are typically very large (~60-180M vertices) but build fairly quickly on an RTX4090 / 14th gen i9 / 64GB RAM workstation. I do have fit additional corrections turned on during optimization - how would this affect vertex coloring?

Coral3D

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Calculating vertex colors very slow
« Reply #8 on: October 31, 2025, 06:31:31 PM »
I'm also having the same issue. My typical projects have 1500-2000 images and 100-150M vertices, and the colorizing vertices step often takes several hours though the estimated time remaining will say 5 minutes and count down from there incredibly slowly.

I'm working on a larger dataset I came in this morning after leaving processing running overnight and it said 22mins remaining for this step. After waiting for 2 hours it still said around 22 mins remaining, so following the advice here I cancelled this step and tried to colorize via the Tools menu. Now it's saying it's going to take 2 days to complete!

It is a fairly large image set, 4196 photos (6000x4000) and ~124M vertices, but I'm using a RTX4090, 13th Gen i9, 64Gb RAM workstation which handles all other processing steps fairly quickly. CPU utilization is fluctuating between 5-12% and RAM usage at around 20GB.

I'm using the latest Metashape version but this has been an issue for a while now, just not to this extent.

I'm using the fit additional corrections during optimization and also curious as to how this would affect vertex colorization.


wgreenePIMS

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Calculating vertex colors very slow
« Reply #9 on: October 31, 2025, 06:39:01 PM »
For now, I've just been running models without ever building vertex colors. For the workflow I use, they are not critical. Coral3D, it sounds like you're working on similar projects to what we typically do. Check out the workflow for this I've created over at https://github.com/Perry-Institute/ReefShape - it may be useful to you!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15629
    • View Profile
Re: Calculating vertex colors very slow
« Reply #10 on: November 11, 2025, 06:02:20 PM »
Hello everyone,

If you are still observing long time related to the vertex calculation process, please try 2.3.0 version pre-release:
https://www.agisoft.com/forum/index.php?topic=17361.0
and comment here if the operation is faster now as we expect it to be.

Would be helpful to have comparison in vertex calculation time between 2.2.2 and 2.3.0 versions.
Best regards,
Alexey Pasumansky,
Agisoft LLC