Forum

Author Topic: realigning mesh coordinates in PS  (Read 6342 times)

dimaego

  • Newbie
  • *
  • Posts: 13
    • View Profile
realigning mesh coordinates in PS
« on: January 13, 2015, 07:58:08 AM »
Hi guys,

If i scaled my mesh or shifted it from the orginial coordinates in zbrush or rhino, is it possible to realign it in PS to build texture? i tried expanding the region or moving it over the new mesh, but texture still wont apply over the new mesh.
thanks in advance.

Dmitriy

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15160
    • View Profile
Re: realigning mesh coordinates in PS
« Reply #1 on: January 13, 2015, 11:14:43 AM »
Hello Dmitriy,

If you know the transformation that scales/shifts model from the original position to the new one, you can apply this data to the camera positions using Python in PhotoScan Pro.
In principle there's also more complicated way (also involving PhotoScan): providing that the indices of the mesh vertices are the same, using script it is possible to calculate the transformation using old and new coordinates of the vertices with the same index.
Best regards,
Alexey Pasumansky,
Agisoft LLC

dimaego

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: realigning mesh coordinates in PS
« Reply #2 on: January 13, 2015, 11:24:57 AM »
Hi Alexey.

Thanks for the reply.
Is there a way to see the coordinates of the original mesh (although i imagine they would be 0 on all 3 axes), or maybe to see the coordinates of the new mesh (if its been shifted). i mean is there a way to see the coordinates on the screen in PS?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15160
    • View Profile
Re: realigning mesh coordinates in PS
« Reply #3 on: January 13, 2015, 11:29:34 AM »
Hello Dmitriy,

If you are using Professional edition of PhotoScan, you can access to the coordinates of the mesh vertices from the Console pane:

Code: [Select]
chunk = PhotoScan.app.document.chunk
vertex = chunk.model.vertices[100] #or any other index
x, y, z = vertex.coord

But please note that these coordinates are in the internal coordinate system, so if you are using referenced chunks, chunk.transform matrix should be also applied.
Best regards,
Alexey Pasumansky,
Agisoft LLC