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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.