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

Creating texture atlases #230

Open
tiivik opened this issue Apr 19, 2021 · 2 comments
Open

Creating texture atlases #230

tiivik opened this issue Apr 19, 2021 · 2 comments
Labels
feature New enhancement or request help wanted Extra attention is needed package:functions

Comments

@tiivik
Copy link

tiivik commented Apr 19, 2021

I'm looking for a module that can help create texture atlases for gltf assets by merging textures per channel (diffuse, normal ..) and therefore reducing the number of draw calls required to render a model.

I've come across the module @gltf-transform/atlas that seems to have been moved to this repository, however, I was unable to find references to atlas generation functionality from the documentation.

Is atlas generation still part of glTF-Transform or are there any alternatives that I could look at?

Thanks!

@donmccurdy
Copy link
Owner

donmccurdy commented Apr 19, 2021

Hi @tiivik! The @gltf-transform/atlas package was part of a much earlier version of this library, but never developed enough that it was particularly useful. It was eventually removed in e7d2815, see #8 for a little more information. I'd be glad to see the feature back in the library, but I don't have plans to work on it.

Libraries like TextureMerger seem promising for the mechanical bits of packing textures, and could be applied in userland code, but turning that into a tool that makes good choices about arbitrary glTF files requires non-trivial design and testing. For example, most users probably don't want their textures to exceed some size limit (2K or 4K), and ideally textures sharing the same UV channel (i.e. texCoord) on the same texture material would receive the same UV transform after packing (this is important for three.js, at least).

If this did come back in would become part of the @gltf-transform/lib package; I've moved away from having individual packages for specific functions, for easier maintenance.

@donmccurdy donmccurdy added this to the Backlog milestone Apr 19, 2021
@donmccurdy donmccurdy added feature New enhancement or request help wanted Extra attention is needed package:functions labels Apr 19, 2021
@tiivik
Copy link
Author

tiivik commented Apr 19, 2021

@donmccurdy Thanks a lot for the details! I briefly checked TextureMerger which might be adaptable to my use case, thanks for sharing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New enhancement or request help wanted Extra attention is needed package:functions
Projects
None yet
Development

No branches or pull requests

2 participants