Skip to content

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
@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