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

UVUnwrapper does not work with interleaved attributes, non float32 attributes #10

Open
gkjohnson opened this issue Sep 26, 2024 · 0 comments · May be fixed by #11
Open

UVUnwrapper does not work with interleaved attributes, non float32 attributes #10

gkjohnson opened this issue Sep 26, 2024 · 0 comments · May be fixed by #11

Comments

@gkjohnson
Copy link
Contributor

The UVUnwrapper class passes the position etc attribute arrays into the xatlasjs addMesh function directly - however, if the geometry uses interleaved attributes then this array contains data for every attribute and will subsequently produce incorrect UVs. Likewise, even if a BufferAttribute is not interleaved it may still use arrays with smaller bit depth (eg 16 bit normals) which will be passed into xatlas, which looks like it requires Float32 buffers unless I'm misunderstanding.

It would be possible to unpack the buffers before generating so they can be used but throwing an error so the user knows the generated geometry is invalid would work, as well.

@gkjohnson gkjohnson linked a pull request Sep 29, 2024 that will close this issue
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 a pull request may close this issue.

1 participant