2

My game has a very simplistic retro pixel style, where all the models use flat mapping (box unwrap) for the models. The unwrap is always the same process in my modeling program: selecting a box unwrap modifier with the same settings.

This gets tedious as I need to explain other people how to unwrap and we all make mistakes sometimes or forget to unwrap some part of a mesh, requiring a full re-export.

It would be better if I could code this somehow, so other people don't have to mess around with the UV's and can just focus on the model. The model gets materials assigned automatically in-game, just the UV's should ideally be generated on the fly when I load the models in three.js.

Any ideas?

4

1 回答 1

1

也许检查这个链接: https ://github.com/mrdoob/three.js/issues/2065#issuecomment-6352320

这是关于平面映射的,仅适用于 Three.Face3,三角形,但添加第四个 UV 坐标非常容易。如果您根据对象使用正确的比例进行此操作,则可以遍历对象的所有面法线并检查它们最面向的一侧。然后,你为每一面做这个平面映射算法,瞧,盒子映射:) 希望这会有所帮助!

于 2013-07-18T14:02:12.833 回答