Настроение: | amused |
Entry tags: | gamedev |
A Funny Way to Generate UV
https://github.com/nmwsharp/variational-surface-cutting
Basically they introduce virtual "cuts", which then allow unwrapping the mesh onto a plane.
They claim for the mapping to be "with little distortion". I.e. no excessive stretching, so the interpolation algorithms will pickup such textures just fine. But as all other algorithms, it is really complex to implement during a lunch break, or even integrate an existing library. So I will leave proper mesh unwrapping for the future releases of my voxel editor, while the initial release will have have exact mapping. I still hope devising my own UW algorithm, since cube surface is really uniform, and therefore a less general algorithm could be usable, if instead of marching cubes I will use a different surface smoother.
Here is an image illustrating the problem I'm trying to solves: