TomaszFurca Posted November 8, 2017 Share Posted November 8, 2017 Hi, three days ago imported scene from bledner from my designer. It is new map - town. In PG i put only some meshes for show my problem. https://playground.babylonjs.com/#199KHL#2 Let's check for draw calls, you can see 9 draw calls for mesh Ivy.002 - I think this is related to submeshes. is it any way to optimize that to reduce draw calls? Actually we have 200-250 draw calls on 120 meshes (without instances). I think this number is to big. Tom Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 8, 2017 Share Posted November 8, 2017 Baking in Blender of all of the materials of a mesh into a single set textures, then assigning those as the only material is probably the only way. The reason for sub-meshes is to handle multiple materials on a single mesh. A material is essentially a shader pair. While a Fragment shader can handle more than one texture at a time, this is used in BJS for the different types of textures, eg. diffuse & bump. This kind of means you need to have 2 .blends & and is a pain if you want to make changes. You have one option for sure. That is wait till you are ready to deploy before baking. More draw calls during dev is probably acceptable. An unsupported option is turn on the UI to allow the forcing baking during export by un-commenting this line. I experimented with this, but never turned it on for the general public. This has known issues with materials using alpha. You are on your own if you try this. Good luck. TomaszFurca 1 Quote Link to comment Share on other sites More sharing options...
TomaszFurca Posted November 9, 2017 Author Share Posted November 9, 2017 Thanks for replay. Today i check exporter option to bake textures. It works, but as you wrote earlier, alpha not work correctly - https://playground.babylonjs.com/#199KHL#4 preview of my scene. Behind totem, on right side of dog you can see bugged nature elements. So I decided to do that manualy. Tom 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.