Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Mesh Baker by Digital Opus [RELEASED]

Discussion in 'Assets and Asset Store' started by Phong, Nov 20, 2012.

  1. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    Hi Etaminal

    There are two main problems you may run into. Object resolution in the lightmap and not enough padding in the UV2 channel.

    1) After you bake the meshes switch the scene view to Global Illumination -> Baked Mode. Adjust the object scale in the lightmap so it has some decent resolution.

    2) Bake the lightmap. If you get light and dark splotches then you may need more UV2 padding:
    • Select the combined mesh renderer object
    • Open the window lighting -> object. Switch the preview to baked intensity.
    • Look for texels that span the gap between UV islands. If you have these then you need more padding on the UV2 channel.
    • In the MB3_MeshBaker inspector you can increase the lightmap padding under the lightmapping settings
     
  2. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    Hi PatientZero, were there any errors or warnings in the console? Not all the features in the mesh baker texture packer are supported by the mesh baker texture packer fast. If there are no warnings or errors that explain the difference then I would love to take a look at the scene. Please PM me if you are willing to share the scene.
     
  3. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    251
    How does Mesh baker compare to Pro draw call optimizer?
     
  4. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    It is a long time since I looked at Pro draw call optimizer, but from what I remember they have very different workflows. I would suggest looking at the tutorial videos for each one to get a sense how they work. Also, I believe both products have free versions which should give you an idea.
     
  5. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    251
    Good point, I will do that!
     
  6. henkesky

    henkesky

    Joined:
    May 23, 2015
    Posts:
    36
    Hello @Phong am having a little challenge with mesh baker. I tried to use batch prefab baker to combine materials in my enemy pack, to create one big atlas, but after doing(doing what was done in the tutorial) that i noticed that the models became flat and unusable. Please what could be the problem and how do i fix it. Again is there a way i can reduce the size of the atlas generated by mesh baker after deleting the batch prefab baker gameobject. I noticed some black space in my atlas
     
    Last edited: Nov 24, 2016
  7. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    Hi Henkesky,

    I am not certain what you mean by "became flat". Do you have a screen shot or something? Were there any warnings in the console? Regarding the atlas size, have you tried enabling the "resize power of two" option? That can help dramatically if your source textures are a power of two. You could disable the "force power of two" but Unity recommends your textures be square or twice as big in one dimension.
     
  8. usupator

    usupator

    Joined:
    Oct 16, 2016
    Posts:
    31
    Hello Phong,

    I have what is probably the stupidest this year, please forgive me but i'm still trying to understand the logic behind unity's workings and that's a lot of work.

    I am preparing a silly end of year card which will be made of a character I exported from poser as a fbx to unity. I exported the same character several times in several poses (told you it's a silly card) so I have the same character in different position on the (it will be a non animated card).

    I'm adjusting the pose of each one of my guys, they move without problem, but I noticed that each is made in the hierachy in the same way: a folder "body" containing the rig, and a folder "joe mesh" containing two meshes one the indside of the head the other the rest of the body - it seems the total count of poly forced unity to split the mesh in two during import.

    My stupid question: these guys all have the same body since they look the same, and they are the same, but they are in different positions. If I bakes the two meshes (after cleaning what I dont need, like the tongue etc to lower the number of poly to make it acceptable to unity) in theory could I copy the same baked mesh to each pose? or would I have to baked each mesh of each pose? In short: is the pose only in the rig or in the polys too?

    Gosh I hope I make sense- forgive me for taking your valuable time, any info will be most welcome.
    happy thanksgiving to all americans here!
     
  9. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    The pose is in the rig.

    Skinned meshes work like this.

    Take a mesh in a bind pose. The mesh is always in the bind pose. This never changes. The mesh stores an array of matricies (one for each bone) that stores the transform of each bone when the bone is in its bindpose. These bind pose matrices never change while the game is running. The vertices in the mesh never move.

    Take a rig (just an array of transforms) B. Every frame, these transforms are reduced to a matrix and that matrix is combined with its corresponding bind pose matrix.

    The SkinnedMeshRenderer creates a new mesh by feeding the vertices, normals and tangents of the mesh through the combined matrices and blending the results based on the bone weights. Through the magic of linear algerbra the vertices will end up transformed to the correct place in world space. This new mesh is what gets rendered.

    Mesh Baker won't capture a snapshot of the pose of a skinned mesh. But the SkinnedMeshRender has a function "BakeMesh" that will produce a frozen snapshot of the skinned mesh pose that you can stick in a MeshRenderer/MeshFilter component.

    You can re-use your source mesh on several rigs that have different poses.
     
    usupator likes this.
  10. unitynewb

    unitynewb

    Joined:
    Feb 22, 2009
    Posts:
    235
    I wanted to see if this would help me with a project I am working on.

    I have a model with multiple submeshes and each one can have different materials. some of them have different textures also, but not all the time. I currently combine the materials and submeshes if they are identical with my own script. what I would need this for is if there are 2 submesh that have the same material that I can combine, but the uvw texture is different. In that situation I would want to use this to bake the materials together so I can merge those 2 submesh. do you think thats possible? I dont want to break the submeshes apart if possible
     
  11. usupator

    usupator

    Joined:
    Oct 16, 2016
    Posts:
    31
    many many thanks Phong!
    I'm sorry I cant find the bakemesh function in the skinned mesh renderer (of mesh baker). I'm doing something wrong - sorry to bother you with my stupidity and newbieness!

    thanks for your patience!!
     
  12. usupator

    usupator

    Joined:
    Oct 16, 2016
    Posts:
    31
    I found not "BakeMesh" in the manual :c I also looked in the unity manual in vain :c
     
    Last edited: Nov 26, 2016
  13. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    usupator likes this.
  14. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    Yes, Mesh Baker can do this, although it is recommended to bake the textures in the editor rather than at runtime. Once the textures have been baked, baking the meshes is quick.
     
  15. unitynewb

    unitynewb

    Joined:
    Feb 22, 2009
    Posts:
    235
    Thanks I have one more question:

    Lets say I have 3 cubes with different UVW maps and textures and one of them is part of a UVW map which is 2048x2048, but the cube only takes up a small portion of that map, lets say 128x128. I understand that if I combine those cubes with your tool it will bake all the textures together for all 3 cubes, but will it include the entire 2048x2048 texture or just the 128x128 part that the cube needs.

    In this example the 128x128 part of the 2048x2048 that has anything on it, the rest would be a transparent PNG.
     
  16. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    Mesh Baker has a feature "Consider UVs" that you can enable when baking the atlas. If this is enabled, then only the 'used' rectangle of the source texture will copied to the atlas. If the uvs extend outside the range 0..1 (usually tiling). Then the tiling is baked into the atlas.
     
  17. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    289
    Phong thank you for the great support!

    btw, i really want mesh baker to have a super easy mode to bake things.. for example..
    i personally use "simple combine" script... i like it because i can put the script on parent gameobject.. and during development, whatever new gameobjects nested/created inside this gameobject.. they will be all baked together in scene with one click! simple and straight forward process..

    currently mesh baker allow you to bake anything. but i have to to select/search meshes whenever there is anything added/removed in scene. of course it is a must-to-do for reusable stuff like prefabs and such..for great control...
    but for enviroments per scene.. things could be improved a bit.

    my suggestion is..
    1. to make an option to select a gameobject.. and make mesh baker bake iterate in all gameobjects nested in the selected gameobject! with one click, mesh baker manages everything.(you can add editor menu option to bake all in scene)
    2. if there is option (split meshes per material) it won't create any textures.. if textures need to be baked together.. then all textures are stored under a new folder, and other info are stored in scene! no need to create assets. the
    3. mesh baker should manage / split / do all dirty work to make all meshes baked right.
    4. heirarchi in unity is good enough for mesh baker to find all meshes that needs to be baked...it's possible to use layer system in unity to select/exclude stuff.

    Benefits:
    = i don't have to manage anything. mesh baker will do, i just need to click bake everything!
    = i can add/remove any mesh objects in scene. and update it fast!
    = saving material data in scene make project more organized and this data is only needed in editor scene only per scene. and mesh baker can create folders and organize it without me to manage and select where to save it.
    = this can be called enviroment baker?
     
  18. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    Hi Mangax, Thanks for the suggestion. I will definitely give this some thought.
     
  19. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,646
    Hello,
    I have a question about update 3.17. The change log says the new version contains "a number of minor fixes". What are the minor fixes? Do any of the fixes pertain to lightmapping UVs?
    Thank YOu.
     
  20. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    The minor fixes are mostly catching situations that generate NullPointerException. There are no fixes for lightmapping UVs. What lightmapping UV issues are you experiencing?
     
  21. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,646
    OK. I don't have any lightmapping UV issues.
     
  22. The_Arrival

    The_Arrival

    Joined:
    Dec 3, 2014
    Posts:
    70
    I´m currently wondering about this restriction mentioned in the very first page of this thread:

    Mesh Baker cannot combine Skinned Meshes that have "Optimize Game Object" checked in the import settings (Rig tab). This is because the bones on these objects are not exposed to be combined.

    Lately i watched this Unite 2016 talk about optimization, were he mentioned how much perfomance impact this little checkbox can give:


    So i´m currently wondering if there is a way to enable unitys internal optimization by reducing the exposed bones and GPU-Skinning and still combining all the little meshs from my animated models with your tool.

    ATM when my models come from my artist, they have all the little parts of the mesh seperated (since we planned to use MeshBaker to reunite them) and the Bonestructure. My previous way was to bake the meshes, delete the little parts and replace them with the combined one and left the bones untouched and everything worked like a charm.

    Now i´m wondering if performance wise this will help at all, since i´m trading a better performance getting less drawcalls with less optimization potential using unitys "Optimzed mesh" enabling less transforms and optimized Skinned mesh rendering as explained in the video.

    I also wonder if there is a way to benefit from both optimization options, but i guess you need exactly those additional transforms to map the combined mesh parts to the bones
     
    Last edited: Dec 3, 2016
  23. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    Hello,

    Currently MeshBaker is able to read transforms that have been optimized. However optimizing the baked skinned mesh is problematic because the API Unity provides expects all bones to be under a single game object. The optimization will remove all the game objects under this game object. This doesn't work for the situation where multiple skinned meshes using different rigs are being baked together, or several MeshRenders are being baked together. If all the bones in the baked mesh are from the same rig it is possible to do this. I could write a script to do the optimization after the mesh has been baked.

    I believe the GPU skinning is a player settings option. There is no reason this options shouldn't work with baked meshes. However the last time I tested it (Early 4.x) it was buggy.
     
  24. sheasullivan

    sheasullivan

    Joined:
    Jun 27, 2015
    Posts:
    6
    Hey, is Unity 5.5 support working? I tried the current free asset (3.16.1) and it's failing to build on the 5.5.0f3 release.
     
  25. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    I will need to push a new build. Should be able to get it up tomorrow. It will go live next week sometime in the asset store. You should be able to download it from my website http://digitalopus.ca/ on Friday.
     
  26. congtrungvnit

    congtrungvnit

    Joined:
    Jul 18, 2016
    Posts:
    14
    Hi Phong. Can you please tell me more about this? How should I use mesh combination method to improve performance? I have bought several mesh combination tools on the store, but none of them work for me. They don't have supports for lightmap as they advertised in my case. They also don't support texture atlas like yours. When I use them to combine my terrain, which is made by many modular meshes (floor, wall, pillars, etc...), they often give me a big mesh with millions vertices, so it is not possible to play on mobile device.

    I'm making my first game, which is an endless running game similar to Temple Run. Can you give me suggestions on how I should optimize my game and how your asset can help in my case? Thank you so much!
     
  27. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    Optimization is a giant topic. I have been meaning to write some blog posts about it but haven't yet. Your first task is to do some profiling (on the target device, not your development computer). Try to determine what is slowing your game down the most, rendering, physics, scripts, something else. A good strategy is to focus on the most expensive parts first. Spend some time exploring the different views in the profiler while testing on the device and read the manual pages for it. A little time spent here may save you many hours later. It is often a good idea to walk through your scene with the frame debugger to see how things are being rendered. The manual has a lot of good information:
    There are also some great links here:


    If you want to speed up rendering, then you need to first check how efficiently your scene is being rendered. Look at the setpass, batches and tris in the game view. Some obvious things to check are: static and dynamic batching enabled, make everything in your scene static that you can, check what is going on with shadows they can be very expensive. Dynamic lights can be expensive. If possible use baked lightmaps they can speed things up a lot.

    Once you have a baseline reasonably efficiently scene then try to figure out if you are CPU bound or GPU bound. There are a number of ways to check this.

    If you are CPU bound then Mesh Baker can help.
    • Make copies of prefabs that share materials. This can do wonders to reduce setpass calls. Especially for transparent materials.
    • Combine meshes that are near each other in the scene. This can reduce the work the CPU needs to do for culling, calculating transforms etc... Be very careful though, don't get too greedy and combine things that are too far apart or you will boost geometry that needs to be processed by the GPU.
    If you are GPU bound then you need to focus on reducing geometry, speeding up shaders or using different faster shaders, reducing overdraw, rendering opaque geometry front to back (to take advantage of early z cull).

    Other tips.
    • KEEP A JOURNAL of your changes, go slow and test, test, test. Try to measure and log the effect of each change on Batches, Tris, Setpass, Framerate, GPU render time, CPU render time, Opaque render time, Transparent Render Time.
    • USE SOURCE CONTROL so you can revert changes.
    • USE PREFABS FOR EVERYTHING and use revert to prefab settings as much as possible. This means your scene is stored in many different files. It is much easier to determine what has changed between different versions of your scene and revert parts of your scene to different versions.
     
    congtrungvnit and hopeful like this.
  28. congtrungvnit

    congtrungvnit

    Joined:
    Jul 18, 2016
    Posts:
    14

    Hi Phong. Thank you so much for the reference links. After reading them and adjust something in my scene (a really big testing scene), I can now achieve a more stable frame rate between 45 - 60 FPS. Thank you so much. I will continue profiling and consider to buy your asset if it is really needed.

    I still have a few questions about your asset:
    1. I have read that your asset will auto check the selected meshes and see if they had over 65k tris. If that is the case, then the asset will break the combined mesh into multiple meshes. So do you recommend that I can feel free to build the world, then choose all the meshes and do baking with your tool and don't need to worry about what group of meshes should be combined?
    2. If I use your tool to combine several meshes, then each mesh will has its own material and texture atlas. Can I after that combine those materials and texture atlases and should I do?
    Btw, a private question that you can feel free to skip. Is Phong your real name? That name is a popular name of Vietnamese. So are you a Vietnamese? :D.
     
  29. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    1) I would not recommend baking everything into a big mesh unless everything is visible all the time. It is best to just bake things together that are close together so Unity can cull verts and tris based on the camera fustrum.

    2) With mesh baker atlas creation is very flexible. You can create an atlas that combines many materials from different objects. Once this has been done, you can combine any mesh that uses one of those materials with any other mesh that combines those materials.

    I am not actually Vietnamese. Phong was a nickname some friends gave me when we were studying computer graphics in University. My friends took the name from the Blinn-Phong shading model. :)
     
  30. congtrungvnit

    congtrungvnit

    Joined:
    Jul 18, 2016
    Posts:
    14

    I still don't really understand what you means. Let go into a specific case. So for example, if I have a wall A that is made up of 4 sub walls and 1 pillar. Then I have a wall B that is made up of 8 sub walls and 3 pillars. Then what your tool can offer when I combine these two walls as 2 different meshes? Can your tool have a solution to let these 2 new combined meshes share a same optimal material, or they have to share a large material that is a combination of 2 materials that is created after the first combined of those walls?

    Ah, btw, I think you know also how the Blinn-Phong shading is invented ^^. I also actually had 2 assumptions when ask you about this. The first is that you are a Vietnamese, and the second is that this is related to that shading technique.
     
    Last edited: Dec 9, 2016
  31. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    In Mesh Baker, combining materials and combining meshes are separate. You can combine materials in Scene1. Then open a different scene, Scene2, and combine any meshes that use any of the materials that were combined in Scene1.

    In the example you gave, you can first combine all the materials used by wall A and wall B. Then you can combine the meshes any way you like. One big mesh, two meshes, three meshes. The only restriction is that the meshes must use materials that were baked in the Texture Bake.

    There is a free version of Mesh Baker. You can download it to see how it works. The 'SkinnedMeshRenderer' example scenes use the approach I just described. The materials are baked in one scene and the meshes are combined in a different scene.
     
    congtrungvnit likes this.
  32. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,245
    Hi, been using mesh Baker now for a while, love it! Only downside is that the unity file format is very large, so a scene size on disk increases with several magnitudes after bake. I hope it's compressed when building game? Haven't investigated that if you know the answer please let me know.

    Cold it be possible for you to support the fbx file format that has a lot smaller footprint? I version all our scenes in git and if a map rises from 3mb (with oclussion data) to roughly 200mb it can quickly become a problem for us after a few scenes.
     
  33. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    Thanks for the suggestion. This is something I have been wanting to add for a long time. Another big benefit would be access to the Model importer settings. It is a big feature though. Especially for Skinned Meshes with Animations and BlendShapes. I will take another look. Perhaps implementing it for MeshRenderer only wouldn't be too bad as a first step.
     
    AndersMalmgren and hopeful like this.
  34. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,245
    It would make a great tool even better! And tools like export2maya would almost be obsolete with that addition :)
     
  35. congtrungvnit

    congtrungvnit

    Joined:
    Jul 18, 2016
    Posts:
    14
    Hi,

    I'm trying your free version and these are outputs I got when try to combine materials. The materials are also not combined well.

    Screen Shot 2016-12-12 at 12.28.48 PM.png
     
    Last edited: Dec 12, 2016
  36. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    Are you using Unity 5.5? Unity changed the Texture API in Unity 5.5. I submitted an update that should fix the problem on Friday. It should be available through the asset store in a few days. Or you can download it from my website. http://digitalopus.ca/site/mesh-baker/.

    If you are not using 5.5 then there is something strange about one of your textures. Are you using Substance?
     
  37. congtrungvnit

    congtrungvnit

    Joined:
    Jul 18, 2016
    Posts:
    14
    Yeah, I'm using Unity 5.5 and don't use Substance. So it doesn't work with Substance? I don't have plan to use Substance in the near future but just ask for more information.

    I have downloaded the evaluation version on your website and it works as expected. How about the fix for paid version, when does it arrive?

    I have a question about the Texture baker. After it combined the texture, I see that the texture atlas and combined material are generated and configured right. But when I check the original game objects in my scene, I see that they are still using the old materials. Although after that, when I use Mesh baker to combine those objects, it can combine them but I still don't know how those objects use the combined material?

    I ask this because I want to bake any environment textures in one texture atlas and one material. Then I want to use the environment game objects to build levels. And I will combine meshes after the levels built. So in this situation, can I create a scene that contain any individual environment objects, bake textures of those environment objects in that scene and then use those environment objects in other level scene while still guarantee that those objects still use the same generated texture atlas and material?
     
  38. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    The fix has been in the full version since mid October. I update the full version more frequently since it is a chore to build the .dlls.

    You probably want to use the Batch Prefab Baker. It will create duplicated prefabs that use the combined materials. You use the duplicated prefabs in your scene. There is a video here showing how it works.

     
  39. congtrungvnit

    congtrungvnit

    Joined:
    Jul 18, 2016
    Posts:
    14
    Hi,

    Can your tool work with the technique posted by Joachim Ante in this link?

    And by the way, I have a question in the last page of that topic (page 6) but still don't have answer yet, if you can please take a look and help me if you know the solution. Thank you!
     
  40. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,245
    Hi again.
    Can we turn off this error? Materials on Floor_platform_Cable_LOD0 (UnityEngine.GameObject) in the list of objects to combine were not a subset of the materials on the first object in the list.

    I want to combine two floor tiles that share some materials but not all, I know it will result in more drawcalls but texture atlasing is not really a option here (I will still save some batching)
     
  41. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    Hi Anders, unfortunately the only way around that error is to put an object with all you marterials first, or bake the textures using the multiple materials feature to map each material to its own submesh.

    You have got me thinking though that the way this feature should work is to bake each material into its own submesh even if the first object in the list doesn't contain them. I will add that improvement in the next update.
     
  42. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    Hi Congtrungvnit,

    I was not aware of this technique. This looks very interesting and I plan on studying it closely as there is a lot if information about how Unity lightmaps work in here.

    Regarding the lightprobes. I am not sure how you are placing the lightprobes. The LightProbeGroup.probePositions are in local space relative to the the LightProbeGroup not in world space. If the game object with the LightProbeGroup is not at 0,0,0 then you might be picking up a translation that you are not expecting if you write LightProbeGroup.probePositions.
     
  43. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,245
    Sounds great!
     
  44. congtrungvnit

    congtrungvnit

    Joined:
    Jul 18, 2016
    Posts:
    14
    Hi. To be more clearer. I'm building an endless running game and my scene is a procedural scene, which created by randomly pickup and instantiate environment tiles like the technique described in this link. With each tile prefab, I have a light probe group placed as a child object, and that light probe group is spread across the moving path of character. Then I place any environment tiles in one scene to bake lightmap and use the technique described in the topic I sent you before to bake light map into those environment prefabs. And in gameplay scene, I randomly pickup and instantiate those prefabs.

    The problem is that seems like the light probe groups of the environment prefabs are not aligned with their location. So the moving object (the character) is not illuminated right.
     
  45. congtrungvnit

    congtrungvnit

    Joined:
    Jul 18, 2016
    Posts:
    14
    Hi. I've also created a simple project on Github for you if you want to see how the problem look like. You can pull the project from this link and do whatever you want with it. I think it would be the best if you can make an asset to solve this problem. Because according to the roadmap from Unity Technologies, it seems like they don't have any plans for this problem.

    As you can see in the ProblemDemonstration scene. The character object still has pink color when in the green light area.
     
    Last edited: Dec 15, 2016
  46. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,245
    I hope you dont mind ideas from Users, because I have started to use your tool for real now and I have some good ideas, I think :D

    Instead of just offering to disable the renderers cant you have an option that moves the gameobjects to a sub group of the baked gameobject and tag them as editor only? This way they willl be excluded when the game is built and take zero overhead on the final build. That way its very easy to revert a bake if you want to reconfigure scene.

    Also I have a tool that clones any light and colliders on those gameobjects, if you want I can share that with you (its not much code)
     
  47. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,245
    I get this error after a bake, and it does not stop repating itself until i delete the baked mesh

    Dynamic batching: index buffer source is NULL (first IB byte 0 count 0 first vertex 0 offset 1322)
     
  48. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    Thanks for the feedback. I very much appreciate it and consider it valuable. I will add this to the todo list.
     
  49. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    1,579
    I think the combined mesh has zero vertices. Did the bake fail? I will try to reproduce this and see if I can suppress this behavior.
     
  50. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,245
    The bake did not fail with any error, but I got this error right after. Had to delete the baked mesh for it start working again. Hope you can find out whats causing, thanks again for a great tool!