Forum

Author Topic: Texture production - "Falling back to legacy parametrization" - meaning?  (Read 4471 times)

cbnewham

  • Full Member
  • ***
  • Posts: 121
    • View Profile
Using the latest version of Metashape. 2019 Razer laptop with 64Gb memory and top-end Nvidia graphics card.

My project has 2800 cameras and has successfully created the model. However, I am unable to get it textured. It always stalls at 70% and can be left for days and does nothing further.

I notice that every time it shows it is "falling back to legacy parametrization". What does that mean? The "legacy" version doesn't seem to output any information to the console after stating how many charts it is packing.

I've tried:

- Decimating the mesh (nominally 17m faces) down to 1 million.
- Reducing the texture size from 20,000 (the maximum I can generate with my graphics card) to 5000.
- Disabling all the cameras and then enabling 5.

Apart from the number of "charts" it packs, these changes make no difference and it always stops at 70% and does nothing after very long periods of time.

Arie

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: Texture production - "Falling back to legacy parametrization" - meaning?
« Reply #1 on: September 21, 2020, 05:21:29 PM »
Hi,
have you tried updating your graphic card drivers? Is the GPU detected by Metashape?
Cheers!
p.s. as a general rule, your texture size should be a power of 2 i.e. 2048x2048, 4096x4096 etc. It helps performance.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14818
    • View Profile
Re: Texture production - "Falling back to legacy parametrization" - meaning?
« Reply #2 on: September 21, 2020, 05:38:56 PM »
Hello cbnewham,

Can you provide the complete log related to the texture parametrization which is switched to the legacy mode?

Please also specify the version of Metashape that you are using and the mesh generation mode / interpolation used (Arbitrary or Height Field, enabled/extrapolated or disabled interpolation?).
Best regards,
Alexey Pasumansky,
Agisoft LLC

cbnewham

  • Full Member
  • ***
  • Posts: 121
    • View Profile
Re: Texture production - "Falling back to legacy parametrization" - meaning?
« Reply #3 on: September 21, 2020, 06:03:00 PM »

The log shows:

-----------------------------------

Parameterizing texture atlas...
Model size: 1999642 faces, 1001896 vertices
Decimated to 999994
Performing initial subdivision...   
Division threshold 100000
chart  0 faces: 93277
chart  1 faces: 90932
chart  2 faces: 85606
chart  3 faces: 79786
chart  4 faces: 78026
chart  5 faces: 77126
chart  6 faces: 70804
chart  7 faces: 68300
done. (in 3.808 sec). Got 108 initial parts.
top 8 mean: 80482.1 stddev: 8359.23
************************************************************************************************************
Scaling charts... 
done. (in 0.139 sec)
Concatenating charts... 
done. (in 0.056 sec)
Packing... 
Parametrization contains 850 charts
Pack iteration 0 ratio 0.525
done. (in 1.641 sec)
Falling back to legacy parametrization
Packing 5109 charts...

--------------------------------------

Metashape Standard Edition
Version 1.6.4 build 10928 (64 bit)

Build Texture:

Texture Type: Diffuse Map
Source: Images
Mapping mode: Generic
Blending mode: Mosaic


Mesh generation:

Source data: Depth maps
Surface type: Arbitrary
Quality: High
Face count: High
Interpolation: Enabled




Hello cbnewham,

Can you provide the complete log related to the texture parametrization which is switched to the legacy mode?

Please also specify the version of Metashape that you are using and the mesh generation mode / interpolation used (Arbitrary or Height Field, enabled/extrapolated or disabled interpolation?).

cbnewham

  • Full Member
  • ***
  • Posts: 121
    • View Profile
Re: Texture production - "Falling back to legacy parametrization" - meaning?
« Reply #4 on: September 21, 2020, 06:09:16 PM »
Hi Arie,

I've been using Metashape for 9 months on this laptop. I've not had this problem before on this machine, nor in the several years I've been using Metashape/Photoscan. The only difference with this model is it has 2800 cameras. Normally I have between 800 and 1500 cameras.

cbn


Hi,
have you tried updating your graphic card drivers? Is the GPU detected by Metashape?
Cheers!
p.s. as a general rule, your texture size should be a power of 2 i.e. 2048x2048, 4096x4096 etc. It helps performance.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14818
    • View Profile
Re: Texture production - "Falling back to legacy parametrization" - meaning?
« Reply #5 on: September 21, 2020, 07:39:04 PM »
Hello cbnewham,

The UV parametrization should not depend on the number of cameras in the project.

I would rather assume that the problem is raised by the extremely noisy mesh surface, is it possible to send only the mesh exported from this project to support@agisoft.com? As a possible workaround you can try to reduce the number of pages (if there are many atlas pages) of the texture, but increase the size of each page.
Best regards,
Alexey Pasumansky,
Agisoft LLC

cbnewham

  • Full Member
  • ***
  • Posts: 121
    • View Profile
Re: Texture production - "Falling back to legacy parametrization" - meaning?
« Reply #6 on: September 21, 2020, 08:22:11 PM »
Thanks Alexey.

This was the most complex photogrammetry attempt I've made. Unlike my other models, which are single subjects and pretty clean, this was an entire corner of a room. The model had quite a few discontinuous bits of mesh. I've removed those and it's now advanced to blending the textures.

Thanks for your help.


cbn


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14818
    • View Profile
Re: Texture production - "Falling back to legacy parametrization" - meaning?
« Reply #7 on: September 21, 2020, 10:44:55 PM »
Hello cbnewham,

Thank you for letting me know that the issue has been resolved.

At first I thought that the mesh has been generated without interpolation and consisted of many isolated components, but after you have provided the processing parameters gave up of this idea. But it seems that the actual reason was actually similar.
Best regards,
Alexey Pasumansky,
Agisoft LLC

cbnewham

  • Full Member
  • ***
  • Posts: 121
    • View Profile
Re: Texture production - "Falling back to legacy parametrization" - meaning?
« Reply #8 on: September 22, 2020, 12:04:38 AM »
Sadly not resolved.

It now completes but it produces a completely black texture.  :-(

I found that if I used the original (cleaned-up) mesh of roughly 15m faces Metashape just crashes half way through blending.
If I decimate to 5m faces it goes back to using the "legacy" paramaterization.
If I decimate to 10m faces it completes but, as I said, it creates a texture that is completely black.

I have made sure my drivers are completely up to date. And it is using the graphics card for blending.  Log below:



2020-09-21 21:21:26 Agisoft Metashape Standard Version: 1.6.4 build 10928 (64 bit)
2020-09-21 21:21:26 Platform: Windows
2020-09-21 21:21:26 CPU: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (laptop)
2020-09-21 21:21:26 CPU family: 6 model: 158 signature: 906EAh
2020-09-21 21:21:26 RAM: 63.9 GB
2020-09-21 21:21:27 OpenGL Vendor: NVIDIA Corporation
2020-09-21 21:21:27 OpenGL Renderer: GeForce RTX 2070 with Max-Q Design/PCIe/SSE2
2020-09-21 21:21:27 OpenGL Version: 4.6.0 NVIDIA 456.38
2020-09-21 21:21:27 Maximum Texture Size: 32768
2020-09-21 21:21:27 Quad Buffered Stereo: not enabled
2020-09-21 21:21:27 ARB_vertex_buffer_object: supported
2020-09-21 21:21:27 ARB_texture_non_power_of_two: supported
2020-09-21 21:21:34 LoadProject: path = D:/photogrammetry2/easton-maudit/easton-maudit-3.psx
2020-09-21 21:21:34 Loading project...
2020-09-21 21:21:35 loaded project in 0.786 sec
2020-09-21 21:21:35 Finished processing in 0.791 sec (exit code 1)
2020-09-21 21:22:00 DecimateModel: face count = 10000000, target = 0
2020-09-21 21:22:00 Decimating mesh...
2020-09-21 21:22:00 decimating mesh (15733774 -> 10000000)...
2020-09-21 21:22:18 done in 18.294 sec
2020-09-21 21:22:18 Peak memory used: 593.78 MB at 2020-09-21 21:22:12
2020-09-21 21:22:18 Finished processing in 18.353 sec (exit code 1)
2020-09-21 21:23:05 checking for missing images...Checking for missing images...
2020-09-21 21:23:05  done in 0.027 sec
2020-09-21 21:23:05 Finished processing in 0.027 sec (exit code 1)
2020-09-21 21:23:05 BuildTexture: mapping mode = Generic, page count = 1, texture size = 16384, texture type = Diffuse map, source data = Images, blending mode = Mosaic, fill holes = 1, ghosting filter = 1, enable_gpu = 1, relaxed_precision = 1
2020-09-21 21:23:05 Parameterizing texture atlas...
2020-09-21 21:23:05 Model size: 9999999 faces, 5002606 vertices
2020-09-21 21:23:16 Decimated to 999999
2020-09-21 21:23:16 Performing initial subdivision...   
2020-09-21 21:23:19 Division threshold 100000
2020-09-21 21:23:20 chart  0 faces: 92828
2020-09-21 21:23:20 chart  1 faces: 84770
2020-09-21 21:23:20 chart  2 faces: 81034
2020-09-21 21:23:20 chart  3 faces: 81024
2020-09-21 21:23:20 chart  4 faces: 76803
2020-09-21 21:23:20 chart  5 faces: 76466
2020-09-21 21:23:20 chart  6 faces: 61606
2020-09-21 21:23:20 chart  7 faces: 53347
2020-09-21 21:23:20 done. (in 4.227 sec). Got 97 initial parts.
2020-09-21 21:23:20 top 8 mean: 75984.8 stddev: 11894.8
2020-09-21 21:24:10 *************************************************************************************************
2020-09-21 21:25:48 Scaling charts... 
2020-09-21 21:25:48 done. (in 0.128 sec)
2020-09-21 21:25:48 Concatenating charts... 
2020-09-21 21:25:48 done. (in 0.055 sec)
2020-09-21 21:25:48 Packing... 
2020-09-21 21:25:48 Parametrization contains 689 charts
2020-09-21 21:25:49 Pack iteration 0 ratio 0.525
2020-09-21 21:26:10 Pack iteration 1 ratio 0.6625
2020-09-21 21:26:44 Pack iteration 2 ratio 0.73125
2020-09-21 21:27:16 Pack iteration 3 ratio 0.696875
2020-09-21 21:27:50 Pack iteration 4 ratio 0.679688
2020-09-21 21:29:06 done. (in 197.783 sec)
2020-09-21 21:29:06 Retrieving mesh
2020-09-21 21:30:07 Parameterizing done in 421.867 sec
2020-09-21 21:30:07 Blending textures...
2020-09-21 21:30:07 Found 2 GPUs in 0.153 sec (CUDA: 0.027 sec, OpenCL: 0.126 sec)
2020-09-21 21:30:07 Using device: GeForce RTX 2070 with Max-Q Design, 36 compute units, free memory: 6367/8192 MB, compute capability 7.5
2020-09-21 21:30:07   driver/runtime CUDA: 11010/8000
2020-09-21 21:30:07   max work group size 1024
2020-09-21 21:30:07   max work item sizes [1024, 1024, 64]
2020-09-21 21:30:08 Initializing context...
2020-09-21 21:30:08 Found device GeForce RTX 2070 with Max-Q Design driver version 1913225216, API version: 1.2.142, location 1::0
2020-09-21 21:30:08 Found device Intel(R) UHD Graphics 630 driver version 1644977, API version: 1.1.97, location 4294967295::4294967295
2020-09-21 21:30:08 Only NVIDIA and AMD devices are currently supported
2020-09-21 21:30:08 Context initialized...
2020-09-21 21:30:08 Context acquired...
2020-09-21 21:30:11 calculating mesh connectivity... done in 2.303 sec
2020-09-21 21:30:15 Initialized texture renderer
2020-09-21 21:30:15 Configuring pipeline...
2020-09-21 21:30:15 Initialized memory broker
2020-09-21 21:30:15 Configuring mosaic pipeline with outliers filtering
2020-09-21 21:30:15 Prefetcher image dims 1837 1837 3 1
2020-09-21 21:30:15 Constructed pipeline
2020-09-21 21:30:15 Relaxed precision enabled
2020-09-21 21:30:15 Collecting memory requests...
2020-09-21 21:30:15 Allocating memory requests...
2020-09-21 21:30:15 Estimated required video memory: 6345 MB
2020-09-21 21:30:15 Estimated device memory: total 8031 MB, used 461 MB, available 6826 MB
2020-09-21 21:30:15 Allocated 6351 MB of VRAM
2020-09-21 21:30:15 Allocated memory requests
2020-09-21 21:30:15 Configured pipeline
2020-09-21 21:30:15 Processing cameras...
2020-09-21 21:30:16 Loading mesh...
2020-09-21 21:30:16 Estimating camera contribution...
2020-09-21 21:30:20 Camera contribution estimated (in 3.95 sec)
2020-09-21 21:30:20 Avg camera fetch time: 3.62056e-06 sec
2020-09-21 21:30:20 Avg camera processing time: 0.000721941 sec
2020-09-21 21:30:20 estimating cameras resolution...
2020-09-21 21:43:18
2020-09-21 21:43:18 estimating cameras resolution done (in 778.75 sec)
2020-09-21 21:43:18 Avg camera fetch time: 1.32827e-05 sec
2020-09-21 21:43:18 Avg camera processing time: 0 sec
2020-09-21 21:43:19 detecting outliers...
2020-09-21 21:43:19 ?***************************************************************************************************************************************************************************************************???**********?*************************?**********************************************************************************************************************************************************************??*??*?*******************************************************************************************************************************************************************************************************************?**?????**??****?********************************************************************************************************************?*******?***************************?****************************************************************************????*?*?*??**?***********************************************************************************************************?*******?***?*********************************************************************************************************************??*******???*?****?*???****???*?**********************************************************************************************************************************************************************************************************?***??****?***???*??*****?*?******?*****************************************************************************************************************************************************?*?**********************************************************************************************************************************************************************************************************************??**??*??*???*???*??*?????*?**?????*??*?*?***********??*?????**?***?********************************************************************************************************??????????***?**********************************************************************************************************************************************??*???***?*??*???****???*****?****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
2020-09-21 21:46:41 detecting outliers done (in 202.263 sec)
2020-09-21 21:46:41 Avg camera fetch time: 0.0312174 sec
2020-09-21 21:46:41 Avg camera processing time: 0.0727621 sec
2020-09-21 21:47:02 Compressed texture pages. (in 20.95 sec)
2020-09-21 21:47:27 Compressed texture pages. (in 24.813 sec)
2020-09-21 21:47:27 estimating quality...
2020-09-21 21:47:27 ?*****************************************************************************************************************************************************************************************************??**?*?********************************************?**********************************************************************************************************************************************************?**???*******************?**********************************************************************************************************************************************************************************************??*?****????*?****?******************************************************************************************************************?**?*****?*******************************************************************************************************?**??*????*??************************************************************************************************************?***?******?***********************************************************************************************************************??*?*****?*????***?**??**?*??*************************************************************************************************************************************************************************************************************??**?*????*?******?*??****?**************************************************************************************************************************************************************?*********************************?***************************************************************************************************************************************************************************************?????**???**?????????????*???*?*??*?*?**********???????*?****?***********************************************************************************************************????????*?***??********************************************************************************************************************************************?**????****?*?*???**?*?*?*?**?*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
2020-09-21 21:52:47 estimating quality done. (in 319.888 sec)
2020-09-21 21:52:47 Avg camera fetch time: 0.038639 sec
2020-09-21 21:52:47 Avg camera processing time: 0.115212 sec
2020-09-21 21:52:47 blending textures...
2020-09-21 21:52:47 ?*****************************************************************************************************************************************************************************************************??**?*??*****************************************************************************************************************************************************************************************************???***?**?**************************************************************************************************************************************************************************************************************?*?*?**??*??*************************************************************************?***************************?*******************?**?**********?***************************************************************************************************???*?*?***???*?***********************************************************************************************************??******?***************************************************************************************************************************??****????????***?*?*?*******?**************************************************************************************************************************************************************************************************************?*?*?**????*??*****??*********************?******************************************************************************************************************************************?**?********************************************************************************************************************************************************************************************************************?***???????*??????????*????????*****???*************?????*?***???******************************************************************************************************?*?*?????????***************************************************************************************************************************************************????**??**?*?*?*??***??**?********************************?***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
2020-09-21 21:58:10 blending textures done. (in 323.227 sec)
2020-09-21 21:58:10 Avg camera fetch time: 0.0396542 sec
2020-09-21 21:58:10 Avg camera processing time: 0.116422 sec
2020-09-21 21:58:11 Processed cameras
2020-09-21 21:58:13 postprocessing atlas... done in 42.231 sec
2020-09-21 21:58:57 Finished processing in 2151.67 sec (exit code 1)


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14818
    • View Profile
Re: Texture production - "Falling back to legacy parametrization" - meaning?
« Reply #9 on: September 22, 2020, 11:58:58 AM »
Hello cbnewham,

Can you post the screenshots from the View Mesh UVs dialog (Color, Scaling, Overlap)?

As for the crashing of the texture blending stage, should be fixed in 1.6.5 update (I have posted the links to the pre-release build in another thread).
Best regards,
Alexey Pasumansky,
Agisoft LLC

cbnewham

  • Full Member
  • ***
  • Posts: 121
    • View Profile
Re: Texture production - "Falling back to legacy parametrization" - meaning?
« Reply #10 on: September 22, 2020, 02:30:29 PM »
Hi Alexey,

The UV maps are thus:


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14818
    • View Profile
Re: Texture production - "Falling back to legacy parametrization" - meaning?
« Reply #11 on: September 22, 2020, 06:35:40 PM »
Hello cbnewham,

Yes, it doesn't look good.

Can you send only mesh from this project in any common format (FBX, PLY, OBJ) to support@agisoft.com, so that we could run the parametrization on our side?
Best regards,
Alexey Pasumansky,
Agisoft LLC

cbnewham

  • Full Member
  • ***
  • Posts: 121
    • View Profile
Re: Texture production - "Falling back to legacy parametrization" - meaning?
« Reply #12 on: September 22, 2020, 07:15:05 PM »
Thanks Alexey

I've sent an email with Google Drive link (128Mb OBJ file)


cbn

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14818
    • View Profile
Re: Texture production - "Falling back to legacy parametrization" - meaning?
« Reply #13 on: September 29, 2020, 01:25:43 PM »
Hello cbnewham,

We were able to reproduce the problem on our side, but upon the detailed investigation we have found out that the coordinates of the mesh vertices in the provided OBJ have billion values (tens even hundreds of billions) which affect the internal representation of the data and texture generation operation.

Can you please specify which steps in your workflow led to such results?
Best regards,
Alexey Pasumansky,
Agisoft LLC

cbnewham

  • Full Member
  • ***
  • Posts: 121
    • View Profile
Re: Texture production - "Falling back to legacy parametrization" - meaning?
« Reply #14 on: September 30, 2020, 04:15:14 PM »
Hi Alexey,

Thanks for getting back to me.

It's a bit of a moot point from my side now. While waiting for your feedback on my mesh I started from scratch and this time, using the same photos, I aligned only a handful of cameras at the centre of what was to be the model. That came out as expected. I then aligned the rest of the cameras. This time it produced a model that textured correctly.

The first time around, producing the untexturable model, I aligned everything in one go. As I recall, it ended up with an odd result of only having a sparse cloud for a handful of cameras showing only a small section of the expected cloud, the rest of the cloud was not visible at all, even though nearly all the cameras were showing as aligned. I selected two or three of the cameras that were used to form the sparse cloud that I could see, reset the alignment on everything else, and aligned the cameras again. This produced what looked like a correct result and the one I generated the mesh from and subsequently sent to you. Obviously the problem must have occurred during this process.

The other thing I noticed was that the bounding box was extremely small and not surrounding the sparse cloud that I could see in the viewport. I had to resize it.

Thanks for your time an patience on this problem.

Cameron