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

Fix vertices with different texture coordinates in imported models getting collapsed #6923

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

davepagurek
Copy link
Contributor

Resolves #6921

Changes

Previously, when importing models, p5.Geometry vertices were being reused whenever a vertex position + material gets reused in the OBJ code. However, vertex position + color alone are not all that's included in p5.Geometry vertices: it also includes texture position and normals. By not accounting for this, some vertex texture coordinates were being collapsed, leading to interpolation of textures and normals where there should be a seam.

Screenshots of the change

image

https://editor.p5js.org/davepagurek/sketches/Y1ui2XK_n

PR Checklist

  • npm run lint passes
  • [Inline documentation] is included / updated
  • [Unit tests] are included / updated

@Qianqianye Qianqianye merged commit 2c0c7d0 into processing:main Mar 25, 2024
2 checks passed
@Qianqianye
Copy link
Contributor

Thanks @davepagurek!

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

Successfully merging this pull request may close these issues.

Textures coordinates are incorrectly applied on .obj models
2 participants