Is the normals threshold parameter available on the wrapX nonrigidalignment node? I have a wrapping process in wrap3 where i specify this parameter as 0.1 to get a really good wrap of my mesh. I would like to do the same on wrapX since i can automate landmark selection and conversion in python code. Thanks.
Unfortunately we have not exposed this parameter in WrapX. On the other hand, WrapX’s algorithm behaves differently even if you provide it with the same parameters. I would highly recommend you to use Wrap3 because it uses much more robust and faster method. It doesn’t support Python scripting yet but there is a work-around. You can save *.wrap project file, which is a simple text file in JSON format. You can easily edit node parameters from external Python script and then pass it to Wrap3 using a command line interface. Please find more about it here:
http://www.russian3dscanner.com/docs/Wrap3/ProjectFileEdit/ProjectFileEdit.html
http://www.russian3dscanner.com/docs/Wrap3/CommandLineInterface/CommandLineInterface.html
Thank you so much for your response. I have included your suggestion into my workflow. I have hundreds of 3d meshes with landmarks in 3d (x,y,z) coordinates. I have a basemesh with landmarks in both 3d (x,y,z) and barycentric coordinates. My python/wrapX script looks like this -
- Parse the directory and create a list of mesh filenames to be processed
- Load each mesh in wrapX
- open the text file containing 3d landmark coordinates
- Use pointtopointontriangle function to convert 3d landmarks to barycentric coordinates
- save the mesh to temp directory as scan.obj
- save the barycentric coordinates as a text file to temp directory as scanpoints.txt
- use python subprocess/call to call wrap3 program (the .wrap file already has nodes that call basemesh.obj, basemeshpoints.txt, scan.obj, scanpoints.txt - it also does rigidalignment and wrapping according to my pre-defined parameters and saves the wrapped mesh to temp directory - once wrap3 finishes control goes back to wrapX/python)
8 ) use wrapX/python to load the wrapped mesh and save it to my target directory with my target filename
Now this does the job - but is there any way to improve it?
The wrapper is nonrigid alignment - normal threshold parameter