gfx-rs / genmesh

A library of mesh generation utilities.
Apache License 2.0
122 stars 29 forks source link

Generate texture coordinates #26

Open kvark opened 9 years ago

kvark commented 7 years ago

This feature appears to me to be the most controversial, for the following reasons:

  1. there is no single way to generate UV unwraps, contrary to how positions and normals are generated
  2. handling UV seams is somewhat difficult/inconvenient from the implementation point of view
  3. users are very sensitive to how exactly UVs are laid out

I vaguely suggest the following solution:

Any opinions? @csherratt @ozkriff @brendanzab

joonazan commented 4 years ago

I ran into this problem while using Amethyst. I wouldn't have had a problem if the texture coordinates for a sphere were simply the latitude and longitude scaled to 0..1.

It would be perfectly fine to me to have to write the shape and UV generation myself but it would be useful to have helper functions available for computing tangents etc.