Forum

Author Topic: 1.6.3 "Reference model has no diffuse texture" when doing chunk.BuildTiledModel  (Read 417 times)

andyroo

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
I'm trying to update a script based on William George's awesome Puget Systems Extended Benchmark for 1.6.3 and getting the error "Reference model has no diffuse texture" in the following line, in a chunk that has only tie points, depth maps, and dense cloud (built in 1.5.1):

Code: [Select]
chunk.buildTiledModel(keep_depth=False,  transfer_texture=False, subdivide_task=False)

I can duplicate by loading Park Map Build Tiled Model.psx and running this (tried to be more explicit and specify source_data=Metashape.DenseCloudData and transfer_texture=False in case some default changed):

Code: [Select]
chunk=Metashape.app.document.chunk
chunk.buildTiledModel(keep_depth=False, source_data=Metashape.DenseCloudData, transfer_texture=False, subdivide_task=False)

result:

Code: [Select]
2020-06-15 19:00:58 *********
2020-06-15 19:00:58 estimating quality done. (in 0.145 sec)
2020-06-15 19:00:58 Avg camera fetch time: 0 sec
2020-06-15 19:00:58 Avg camera processing time: 0.0158889 sec
2020-06-15 19:00:58 blending textures...
2020-06-15 19:00:58 *********
2020-06-15 19:00:58 blending textures done in 0.467 seconds.
2020-06-15 19:00:58 Avg camera fetch time: 0.209889 sec
2020-06-15 19:00:58 Avg camera processing time: 0.0296667 sec
2020-06-15 19:00:58 Processed cameras
2020-06-15 19:00:59 postprocessing atlas... done in 0.063 sec
2020-06-15 19:00:59 applying textures... done in 0.003 sec
2020-06-15 19:00:59 saved textures in 0.004 sec
2020-06-15 19:00:59 loaded tiled model data in 0.001 sec
2020-06-15 19:00:59 loaded block index in 0 sec
2020-06-15 19:00:59 loaded block index in 0 sec
2020-06-15 19:00:59 loaded block index in 0 sec
2020-06-15 19:00:59 loaded camera partition in 0.001 sec
2020-06-15 19:00:59 loaded selector in 0.002 sec
2020-06-15 19:00:59 selected 24 blocks in 0 sec
2020-06-15 19:00:59 loaded model blocks in 0.001 sec
2020-06-15 19:00:59 loaded uv blocks in 0 sec
2020-06-15 19:00:59 loaded block index in 0.001 sec
2020-06-15 19:00:59 loaded block index in 0 sec
2020-06-15 19:00:59 loaded block index in 0 sec
2020-06-15 19:00:59 loaded model blocks in 0.006 sec
2020-06-15 19:00:59 loaded uv blocks in 0.002 sec
2020-06-15 19:00:59 loaded texture blocks in 0.002 sec
2020-06-15 19:00:59 Baking textures...
2020-06-15 19:00:59 saved textures in 0.004 sec
2020-06-15 19:00:59 loaded tiled model data in 0 sec
2020-06-15 19:00:59 loaded block index in 0 sec
2020-06-15 19:00:59 loaded block index in 0.001 sec
2020-06-15 19:00:59 loaded block index in 0 sec
2020-06-15 19:00:59 loaded camera partition in 0 sec
2020-06-15 19:00:59 loaded selector in 0.002 sec
2020-06-15 19:00:59 selected 170 blocks in 0 sec
2020-06-15 19:00:59 loaded model blocks in 0.004 sec
2020-06-15 19:00:59 loaded uv blocks in 0.002 sec
2020-06-15 19:00:59 loaded block index in 0.001 sec
2020-06-15 19:00:59 loaded block index in 0 sec
2020-06-15 19:00:59 loaded block index in 0 sec
2020-06-15 19:00:59 loaded model blocks in 0.021 sec
2020-06-15 19:00:59 loaded uv blocks in 0.009 sec
2020-06-15 19:00:59 loaded texture blocks in 0.017 sec
2020-06-15 19:01:00 Baking textures...
2020-06-15 19:01:01 saved textures in 0.006 sec
2020-06-15 19:01:01 loaded tiled model data in 0.001 sec
2020-06-15 19:01:01 loaded block index in 0 sec
2020-06-15 19:01:01 loaded block index in 0 sec
2020-06-15 19:01:01 loaded block index in 0.001 sec
2020-06-15 19:01:01 loaded camera partition in 0 sec
2020-06-15 19:01:01 loaded selector in 0.002 sec
2020-06-15 19:01:01 selected 1 blocks in 0 sec
2020-06-15 19:01:01 loaded model blocks in 0 sec
2020-06-15 19:01:01 loaded uv blocks in 0.001 sec
2020-06-15 19:01:01 loaded block index in 0 sec
2020-06-15 19:01:01 loaded block index in 0.001 sec
2020-06-15 19:01:01 loaded block index in 0 sec
2020-06-15 19:01:01 loaded model blocks in 0.001 sec
2020-06-15 19:01:01 loaded uv blocks in 0 sec
2020-06-15 19:01:01 loaded texture blocks in 0 sec
2020-06-15 19:01:02 Finished processing in 4161.25 sec (exit code 0)
---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-3-dfe855b9c63f> in <module>()
----> 1 chunk.buildTiledModel(keep_depth=False, source_data=Metashape.DenseCloudData, transfer_texture=False, subdivide_task=False)

Exception: Reference model has no diffuse texture

I guess there is some change that means the old dataset (pre-built model) won't work for 1.63 and on?

andyroo

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
Wondering if there might be a fix to this in a future version or if I should edit the benchmark.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 11741
    • View Profile
Hello andyroo,

I have tried to reproduce the problem in Metashape 1.6.3 build 10732: opened the random project with the tie points and dense cloud only and run the same line that you have provided above:
Code: [Select]
chunk.buildTiledModel(keep_depth=False, source_data=Metashape.DenseCloudData, transfer_texture=False, subdivide_task=False)
The process is running properly and the error is not observed.

Also the following works properly:
Code: [Select]
chunk.buildTiledModel(keep_depth=False,  transfer_texture=False, subdivide_task=False)
If you are using the same Metashape version, but the problem persists, please send the complete log related to the tiled model generation operation.
Best regards,
Alexey Pasumansky,
AgiSoft LLC

andyroo

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
I was able to reproduce the error (on my machine the error occurrs after 66 minutes).

I attached the processing log zipped because it was a little too big unzipped. Here's the start and end of the log (I attached the complete log in a zipfile):

Code: [Select]
2020-06-29 09:53:45 Agisoft Metashape Professional Version: 1.6.3 build 10732 (64 bit)
2020-06-29 09:53:45 Platform: Windows
2020-06-29 09:53:45 CPU: AMD Ryzen Threadripper 3960X 24-Core Processor (desktop)
2020-06-29 09:53:45 CPU family: 23 model: 49 signature: 830F10h
2020-06-29 09:53:45 RAM: 255.9 GB
2020-06-29 09:53:46 OpenGL Vendor: NVIDIA Corporation
2020-06-29 09:53:46 OpenGL Renderer: GeForce RTX 2080 SUPER/PCIe/SSE2
2020-06-29 09:53:46 OpenGL Version: 4.6.0 NVIDIA 441.87
2020-06-29 09:53:46 Maximum Texture Size: 32768
2020-06-29 09:53:46 Quad Buffered Stereo: not enabled
2020-06-29 09:53:46 ARB_vertex_buffer_object: supported
2020-06-29 09:53:46 ARB_texture_non_power_of_two: supported
2020-06-29 09:53:50 LoadProject: path = D:/Puget_Systems_Benchmark/Park Map/Park Map Build Tiled Model.psx
2020-06-29 09:53:50 Loading project...
2020-06-29 09:53:50 loaded project in 0.244 sec
2020-06-29 09:53:50 Finished processing in 0.246 sec (exit code 1)

chunk=Metashape.app.document.chunk

chunk.buildTiledModel(keep_depth=False, source_data=Metashape.DenseCloudData, transfer_texture=False, subdivide_task=False)
2020-06-29 09:55:58 BuildTiledModel: source data = Dense cloud, pixel size = 0, tile size = 256, face count = Low, ghosting filter = 0
2020-06-29 09:55:58 initializing...
2020-06-29 09:55:58 pixel size: 0.0222288
2020-06-29 09:55:58 tile size: 256
2020-06-29 09:55:58 Generating tiled model...

...

2020-06-29 11:02:27 Baking textures...
2020-06-29 11:02:28 saved textures in 0.005 sec
2020-06-29 11:02:28 loaded tiled model data in 0 sec
2020-06-29 11:02:28 loaded block index in 0.001 sec
2020-06-29 11:02:28 loaded block index in 0 sec
2020-06-29 11:02:28 loaded block index in 0 sec
2020-06-29 11:02:28 loaded camera partition in 0 sec
2020-06-29 11:02:28 loaded selector in 0.001 sec
2020-06-29 11:02:28 selected 1 blocks in 0 sec
2020-06-29 11:02:28 loaded model blocks in 0.001 sec
2020-06-29 11:02:28 loaded uv blocks in 0 sec
2020-06-29 11:02:28 loaded block index in 0.001 sec
2020-06-29 11:02:28 loaded block index in 0 sec
2020-06-29 11:02:28 loaded block index in 0.001 sec
2020-06-29 11:02:28 loaded model blocks in 0.002 sec
2020-06-29 11:02:28 loaded uv blocks in 0 sec
2020-06-29 11:02:28 loaded texture blocks in 0 sec
2020-06-29 11:02:30 Finished processing in 3991.34 sec (exit code 0)
---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-2-dfe855b9c63f> in <module>()
----> 1 chunk.buildTiledModel(keep_depth=False, source_data=Metashape.DenseCloudData, transfer_texture=False, subdivide_task=False)

Exception: Reference model has no diffuse texture

My "Park Map Build Tiled Model.files" directory is 4.57 GB (4,915,318,784 bytes) (on disk) with 53 files in 8 folders, and doc.xml in project.zip shows <property value="1.5.1" name="Info/OriginalSoftwareVersion"/>


I wasn't clear from your reply if you tried this on the same Puget Systems Metashape Benchmark I am using, or possibly something build later that doesn't have the same problem.


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 11741
    • View Profile
Hello andyroo,

I'll try to use exactly the same project.
Best regards,
Alexey Pasumansky,
AgiSoft LLC

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 11741
    • View Profile
Hello andyroo,

We were able to find the issue that could lead to the crash, the fix will be included in the next version update.
Best regards,
Alexey Pasumansky,
AgiSoft LLC

andyroo

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
Thank you!