I have a mesh exported from 3ds max (obj) which contains mapping coordinates.
I am referencing this geo in GH to be deconstructed, ‘distorted’ and then rebuilt with the same vertex order (this step is OK).
However I am looking for a component/workflow that enables me to extract the UV data to then reapply to the newly constructed mesh. Does such method exist or is it a scripting solution?
Apologies, I am unsure of how to re-apply the UV data back to the reconstructed mesh. I am exporting from Rhino as an OBJ and have attempted to just manually paste the chunk of UV data into the .obj file in a text editor, however it appears that the syntax of the face data changes slightly after being deconstructed and then created again in grasshopper.
(left is the faces data exported from 3ds max, right is out of GH)
Therefore the when i re-import the geo into 3ds max the face and UV’s don’t appear to match up, Is there a way to construct the new mesh from the with the correct UV’s inside of grasshopper?
Regarding face vertex ordering I can’t say if one can expect them to be the same in a round-trip. I guess that strongly depends on the mesh representations possible in source and target.
That UV coordinate order is same as for vertex order inside Rhino still holds. Just make sure you also export texture coordinates.
or
Edit: you probably wanted to create OBJ with face in format: f v1/uv1 v2/uv2 v3/uv3
I think there is a misconception about what the Mesh Surface component does. It doesn’t create a mesh with UV (texture) coordinates. Rather it creates a mesh based on the given surface UV parametrization.
Grasshopper component will always be faster than ghpython script, as it is compiled.
To lower the run time of the ghpython script, you can:
Not set the type hint for the input ‘m’ parameter.
Another one is not to let the ghpython component ‘do’ the iteration, but do it on your own. deconstructMesh.gh (182.1 KB)