Mesh Baker by Digital Opus [RELEASED]

Are you re-baking the meshes after baking the textures? This is usually necessary. Even if the Mesh Baker settings have not be changed, sometimes there is something that has changed in the project that causes the atlases to pack slightly differently. The meshes then need to be re-baked for the UVs to be correct.

I wasn’t originally, but after trying many settings today and re-baking the mesh each time I can say with some confidence that is unfortunately not the issue.


Here is the Channel 1/UV2 layout for the baked mesh. When you zoom in you can see that all the objects are properly separated and none are leaking out the edge.


Here is the Channel 0 checker for the baked mesh. I’ve noticed that the objects with proper materials, such as the walls, have reasonable checkering, while the black objects like the pillars lack checkering. When I play with the scale at the top it sometimes looks like the checkers are incredibly small, making them too small to see.

Thank you for the fast reply! I forgot to mention in the last post that I am using low-poly objects from Synty Studios which are assigned materials much differently than regular objects.

What is the difference between mesh baker and gpu instancer plugin?

Ahhh, I see that you are using lightmapping on the combined mesh. What setting are you using for Lightmapping UVs. Usually with baked meshes you will need to use: “Generate New UV2 Layout” or “Bake UV2 to Separate Rects”. Then you will need to re-bake the lightmapping on the combined mesh.

Re: What is the difference between mesh baker and gpu instancer plugin?

See this page in the Unity Manual:

GPU Instancer helps with the: “GPU Instancing option”

Mesh Baker helps with the: “Batching Draw Calls” and “Combine Meshes Manually” options

I bought Mesh Baker. I got a very complex scene. I am talking 15.000 gameobjects, each object having LOD0,1,2,3. I want to reduce draw calls, obviously. Should I add all the gameobjects, so all LOD’s, to the texture baker in the objects to be combined part? I take it that I do not have to group my game objects in this stage.

I then go the mesh baker grouper (on the texture baker gameobject). I use the agglomerative cluster type. I then run out of memory (24 GB VRAM on an RTX 3090, lol). What can I do?
Should I turn on cluster by LOD level? Any other relevant settings? Then generate mesh bakers? Then Bake all child meshbakers? Then disable renderers on all child meshbaker source objects?
Anything else?

Hello,

In your case I would recommend first using the Batch Prefab Baker. Then using a combination of Dynamic and static batching and mesh combining.

There is a lot of benefit to having as many meshes share a material as possible even if they cannot be combined. If most/all of your renderers share a material then a lot of possibilites become possible. A ‘drawcall’ for renderers that share a material is much cheaper than a ‘setpass’ call that is required for renderers with different materials.

Consider static batching for objects with LODs. LODs still work with statically batched objects. However you might still run into memory problems. Static batching relies on creating combined meshes in the editor.

Consider mesh combining for low poly objects and small objects grouped together.

15000 objects is a lot to hold in memory at once. You might need to implement a strategy to load/unload geometry in chunks as the player moves around.

Hi Phong,

I am using GPU resident drawer in Unity 6, which recommends for static batching to be disabled.

I will experiment though if it is better to still have it enabled alongside the GPU resident drawer or not.

I see what you mean with Batch Prefab Baker. Thank you for the tip. https://www.youtube.com/watch?v=Cyn_sUCTx9o
I will try it out.

Do you have any tips for tools or workflows for making chunks to load/unload geometry as the player moves around? I am already applying advanced culling system 2 (found on the asset store) and GPU occlusion culling.

Sounds like you are on the right track here. I have not tried GPU Resident Drawer, be sure to investigate how it works with LODs.

I don’t have any tips for chunk loading and unloading assets unfortunately. It is a hard problem. Would love to learn how a games like Genshin Impact handles that.

Why does it create a duplicate of the mesh baker parent when I click ‘Generate Baker’? For example, if I forget whether I generated it before or not, it duplicates it.

Hmmm, seems like a bug. I will add this to the todo list. Thanks for pointing this out.


any tweak config to allow 2:1 ratio to fit in without losing ratio ?? like this texture

Im trying to bake my terrain with tilling:

And with these settings, this is the result:




Im using bakery URP shader, but i dont think it matters