HoloLite

Does babylonjs support texture atlas ?

Recommended Posts

For reducing the # of draw calls due to high # of textures in the scene, texture atlas (combining several textures into a single file) seems like a good solution.
(https://en.wikipedia.org/wiki/Texture_atlas)

It does come with an index file which tells you the position of each texture in the master file. I haven't done this myself, but wonder how this thing is supported in babylonjs.

I checked the bjs docs around texture but can't find anything related to texture atlas or packing.

Also if a 3dsMax project uses texture atlas, will the max->Babylon exporter work too ?

Thanks.

Share this post


Link to post
Share on other sites

I read the doc. As far as I understand it, the use of texture atlas is available only when the mesh is created via the MeshBuilder method.
The uv mapping info are passed to the options param of the CreateBox (or other CreateXxx) methods.

Does this mean once a mesh has been created, it's too late to reassign its material to use texture atlas ? 
Are there other methods to use texture atlas in bjs ?

thanks

Share this post


Link to post
Share on other sites

Agreed 110% :) 

This package was last updated 2 years ago, but is still being downloaded and used, I am sure many people had the same issue like mine. 

And it also does not have ts definition. So all the more reason to support it. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.