Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate texture coordinates #26

Open
kvark opened this issue May 22, 2015 · 2 comments
Open

Generate texture coordinates #26

kvark opened this issue May 22, 2015 · 2 comments

Comments

@kvark
Copy link
Member

kvark commented May 22, 2015

No description provided.

This was referenced May 24, 2017
@kvark
Copy link
Member Author

kvark commented May 29, 2017

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:

  • separate generator structs from iterators. Thus users will call cube.iter() or cube.iter_uv to get different iterators.
  • don't implement UV for the SharedVertex logic, since it's too much headache, and the users can always use LruIndexer to compute those, if needed. Perhaps, we could have a helper to do this semi-automatically?
  • stick to Three.js UV layout convention. This also sparks the question of vertex positions should follow the same order.

Any opinions? @csherratt @ozkriff @brendanzab

@joonazan
Copy link

joonazan commented Feb 2, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants