Forum

Author Topic: Texturing an external mesh  (Read 4876 times)

Ingsayyad

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Texturing an external mesh
« on: August 04, 2015, 01:02:27 PM »
I'm trying to texture a mesh in PS  that I have generated using laser scanning and Geomagic.  I'm getting a strange texture.  The mesh has normal and imported as ply in PS. The coordinate of mesh  are the same as PS. 


I can provide more info if required.
I noted that if I make a mesh in PS, do some correction in Geomagic and import it back in PS., it gets right texture.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14962
    • View Profile
Re: Texturing an external mesh
« Reply #1 on: August 04, 2015, 01:10:30 PM »
Hello Ingsayyad,

Are you sure that the orientation and scale of the imported model fits PhotoScan scene correctly?
Best regards,
Alexey Pasumansky,
Agisoft LLC

Ingsayyad

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Texturing an external mesh
« Reply #2 on: August 04, 2015, 01:28:52 PM »
The point cloud is from laser scanning which use the same control points what I 'm using for images. So I think the scale should not be problem.
About normal I have created it in CloudCompare. I have also checked it with inverting normals. But no success.
Can place markers on mesh.


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14962
    • View Profile
Re: Texturing an external mesh
« Reply #3 on: August 04, 2015, 02:02:10 PM »
Hello Ingsayyad,

Can you provide the project file with the imported model? (dense cloud, if present, can be removed to reduce the file size)
Best regards,
Alexey Pasumansky,
Agisoft LLC

johndot

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Texturing an external mesh
« Reply #4 on: August 04, 2015, 02:23:29 PM »
Hi Ingsayyad,
I'm having the same problem. But I cannot place markers on the mesh unless they are new markers (create marker option) I have GCs but I cannot place them on the mesh. Maybe I'm missing something. Is there any good workflow to get this acomplished?
Thanks in advance,

Jon
« Last Edit: August 04, 2015, 03:37:07 PM by johndot »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14962
    • View Profile
Re: Texturing an external mesh
« Reply #5 on: August 04, 2015, 04:04:41 PM »
Hello Ingsayyad,

It seems that the normals are inverted in your model. You can use the following script to invert the normals of the active chunk model:

Code: [Select]
import PhotoScan
chunk = PhotoScan.app.document.chunk
faces = chunk.model.faces
for face in faces:
    face.vertices = (face.vertices[0], face.vertices[2], face.vertices[1])

Could you please try that and check if the texture is fine after inverting the normals?

I've generated the texture from the thumbnails and got the following:
« Last Edit: August 04, 2015, 04:39:43 PM by Alexey Pasumansky »
Best regards,
Alexey Pasumansky,
Agisoft LLC

Ingsayyad

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Texturing an external mesh
« Reply #6 on: August 05, 2015, 09:34:36 AM »
Thanks for your reply. I  already tried to invert the normals in CloudCompare and Geomagic but no sucess.
Now a very basic question about the script.
I  copied your scrip in Notepad and changed the extension  from .txt to py. PS has recognised it also as py.
Now in Run Python Script window
Script--->path of file
Arguments ?????????? What should I type
I left it empty  and clicked OK.
I run the texturing of mesh,  no change of results. It seems that i couldn't run the script.  Any guidance to  run python script in PS.
 

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14962
    • View Profile
Re: Texturing an external mesh
« Reply #7 on: August 05, 2015, 02:20:01 PM »
Hello Ingsayyad,

After script execution please switch to the point cloud view and then to the solid view mode, do you see that the normals are correct now?
If not, are there any error messages in the Console pane?
Best regards,
Alexey Pasumansky,
Agisoft LLC

Ingsayyad

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Texturing an external mesh
« Reply #8 on: August 05, 2015, 02:51:09 PM »
Thank you. It is working.