I'm looking for a way to automatically create box UVW maps in 3D models, similar to the functionality of UVW Map -> Box
in programs like 3ds Max.
Here's an example with the default UV mapping
And here is an example with the desired box UV mapping that I want to achieve
I've experimented with javascript-based solutions, like the ones found here and here, but the results vary depending on factors like merged meshes, existing UV maps, or different directional orientations.
When applying a box UV map in Blender or 3ds Max manually, it always produces accurate results.
Ideally, I would like a command line tool similar to gltf-pipeline that can be used as follows:
generate-box-map -i model.gltf -type box -size 50
I have come across tools such as PyMeshLab and Meshmatic, as well as attempts to achieve this via Python in Blender, but haven't found a satisfactory solution yet. Is there a simpler way to accomplish this?