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

uv_remap=:sphere should handle 0° seam properly #57

Open
jonathanhogg opened this issue Sep 27, 2024 · 0 comments
Open

uv_remap=:sphere should handle 0° seam properly #57

jonathanhogg opened this issue Sep 27, 2024 · 0 comments
Labels
🐞 bug Something isn't working 🎨 render Anything to do with rendering (windows, physics, etc.)

Comments

@jonathanhogg
Copy link
Owner

Spherical UV mapping requires adding a 0º seam and setting the U coordinate of the points on this seam to either $0$ or $1$ depending on whether the faces lie on the +Y or -Y sides of this seam. This stops faces straddling the 0° line from having horrible warping on them as the texture coordinates wrap backwards.

The !sphere mesh creation logic does this correctly, but the uv_remap=:sphere logic does not. Probably the simplest way to fix this would be to split the mesh into two halves with manifold's SplitByPlane() on the XZ plane and then map the +Y side to Us in the range $[0,0.5]$ and the -Y side to Us in the range $[0.5,1]$ before combining the meshes.

@jonathanhogg jonathanhogg changed the title uv_remap=:sphere should handle 0 seam properly uv_remap=:sphere should handle 0° seam properly Sep 27, 2024
@jonathanhogg jonathanhogg added 🐞 bug Something isn't working 🎨 render Anything to do with rendering (windows, physics, etc.) labels Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🎨 render Anything to do with rendering (windows, physics, etc.)
Projects
None yet
Development

No branches or pull requests

1 participant