HoloLite Posted April 4, 2018 Share Posted April 4, 2018 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. Quote Link to comment Share on other sites More sharing options...
HoloLite Posted April 4, 2018 Author Share Posted April 4, 2018 Doh, this is what happens when you don't search properly before posting. Now reading https://doc.babylonjs.com/how_to/createbox_per_face_textures_and_colors NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted April 4, 2018 Share Posted April 4, 2018 Quote Link to comment Share on other sites More sharing options...
HoloLite Posted April 4, 2018 Author Share Posted April 4, 2018 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 Quote Link to comment Share on other sites More sharing options...
HoloLite Posted April 5, 2018 Author Share Posted April 5, 2018 Just found this: https://www.npmjs.com/package/babylon-atlas @fenomas this one looks like the answer to my prayer, right ? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 5, 2018 Share Posted April 5, 2018 I keep thinking this should be in the framework jhadenfeldt 1 Quote Link to comment Share on other sites More sharing options...
HoloLite Posted April 5, 2018 Author Share Posted April 5, 2018 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.