Mesh UVs
#683
Replies: 1 comment
-
So, UV mapping has a million tradeoffs and I don't want to pick one way and pretend it beats all the other optimizations one could do. I do have the general concept of properties, which are designed to handle UVs, among other things. It is actually common in graphics that the input meshes have separate materials and hence independent UV maps - atlasing is often helpful, but often not. I definitely don't want us to be opinionated about it. That said, having the option to generate a UV map sounds very useful indeed. Probably a API akin to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be nice if MeshGLs came out with UVs.
I added UV Baking to my CAD Library a little while ago, and it ended up being a great decision for the general utility of the outputs.
Here's what Manifold's UVs look like when baked with the xatlas library:
xatlas is a small MIT-Licensed dependency (only a single .h and .cpp file) which computed the above unwrap in 56ms.
However, a more ambitious option would be to preserve Mesh UVs across CSG Operations. This would mean that the UV Space of each of the contributing meshes would have to repack themselves into a larger shared atlas (where the
Manifold
object would have a rect representation of the contributing UVs spaces going into to enable this atlas packing at export time).It would also mean that all of the contributing primitives would need to come with default UVs, but that's relatively simple.
Beta Was this translation helpful? Give feedback.
All reactions