Forum

Author Topic: transfer_texture ignored  (Read 13173 times)

michaelRRI

  • Newbie
  • *
  • Posts: 13
    • View Profile
transfer_texture ignored
« on: December 11, 2025, 06:04:41 AM »
Hi,

May be simple question but I am trying to write a script to bake diffuse from one model to another and it seems to always use the images instead of the model.

This is my basic call:
Code: [Select]
chunk.buildTexture(
        texture_size=4096,                                                                   
        source_asset=3,
        transfer_texture=True,
    )

And this is what is returned in console (transfer_texture is absent):
Code: [Select]
2025-12-11 13:59:33 BuildTexture: blending_mode = MosaicBlending, texture_size = 4096, downscale = 2, sharpening = 1, fill_holes = on, ghosting_filter = on, out_of_focus_filter = off, texture_type = Diffuse map, source_asset = 3, enable_gpu = on, relaxed_precision = on
I am using V2.2.2 and have the natural texture mode tweak enabled.

michaelRRI

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: transfer_texture ignored
« Reply #1 on: December 11, 2025, 06:34:22 AM »
nm. worked it out. For anyone seeing this, need
Code: [Select]
source_data=Metashape.DataSource.ModelData, to override the default use of ImageData.

NOTE: would think this would be implied when transfer_texture=True. ;)

M

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15650
    • View Profile
Re: transfer_texture ignored
« Reply #2 on: December 12, 2025, 01:40:13 PM »
Hello michaelRRI,

When you are using source_data=Metashape.DataSource.ModelData you need also to use source_asset=chunk.models.key to indicate what mesh model should be used as a source for the texture transfer.
Best regards,
Alexey Pasumansky,
Agisoft LLC