Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Mesh Baker by Digital Opus [RELEASED]

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

  1. nickdreamdev

    nickdreamdev

    Joined:
    Oct 25, 2016
    Posts:
    34
    Hi I am trying to bake a large game object and it keeps throwing me this error and I am unsure why
     

    Attached Files:

  2. wargod

    wargod

    Joined:
    Mar 13, 2013
    Posts:
    16
    We purchased meshbaker today to assist with realtime character customization.
    I have been through the following tutorial



    In the tutorial all the clothing options are exported from blender during the creation process ( they form part of the mesh hierarchy). If i wanted to add another item of clothing for the same bone system after the initial export how can i get it to reference the original bone system ( as soon as i change the root bone of the new item i end up with a exploded distorted mesh).

    Any help would really be appreciated.
     
    Last edited: Feb 22, 2017
  3. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    This error is being thrown by the inspector code. Does it happen all the time or just once when you bake? If it happens just once then I wouldn't worry about it. It is probably Unity's editor code throwing an error because the code for drawing the inspector is taking a long time to return.

    If it happens all the time send me the full stack trace and I will look into it. Unfortunately your picture cuts off before I can see which line is throwing the error.
     
  4. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    Hmmm, I suspect the bone order ordering is being changed when you do the second export. The Mesh asset has a list of bind poses and SkinnedMeshRenderer component has a list of bones (transforms). These must correspond perfectly or you get a severely deformed skinned mesh. Your body part prefabs are using Meshes that were generated by the BoneWeightCopier script. These do not automatically get updated when your reimport a modified model.

    I would just re-run the bone weight copier script. It will replace the meshes with new ones that have the bones in the updated order. I would suggest keeping the scene where you do the bone weight copying in your project so you can re-copy the bone weights if you make changes to the source models.
     
  5. nickdreamdev

    nickdreamdev

    Joined:
    Oct 25, 2016
    Posts:
    34
    I got it to work. To be honest I have no idea why it was throwing the error.
    But i Believe it was on my end.
     
  6. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    507
    Hi can I combine terrains too? I have a 25 tiles terrain, so combining them together can help performance?
     
  7. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    Do you mean 5x5 grid of Unity Terrain objects?

    You won't be able to combine these because they are not typical meshes. You would need to convert them to MeshRenderer objects first and then combine them. There is an asset Terrain2Mesh that does this.

    If your terrains cover a large area and only a small part is visible at a time then performance would almost certainly not be improved by combining these. The reason is that a huge amount of geometry would be sent to the graphics card every frame, most of which is outside the view fustrum. The benefits of combining fall off sharply when objects are combined that are not visible at the same time.
     
    Shamantiks and Crossway like this.
  8. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    507
    Thank you. I just mentioned If I create a Cube GameObject it will uses 1 batch but for my imported model it use 2 batches! I need to know why? thanks.
     
  9. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    Lots of things affect number of batches.
    1) Objects must be flagged static to be static batched with other objects and must share materials and must be on the same lightmap.
    2) Objects must be low poly to be dynamic batched. A total of 800 mesh properties are batched per frame. Objects must share a material and have scale 1,1,1.
    3) Every light in your scene requires an extra shader pass
    4) Every material on your object requires an extra shader pass
    5) Shadows require an extra drawcall
    6) Some shaders have multiple passes.
    7) Transparent objects must be drawn back to front. This can cause a lot of expensive batches as the graphics pipeline needs to be switched every time an object with a different material is encountered.

    There are probably a lot of things I missed here that can cause extra batches.

    A good strategy is to start with an empty scene and turn off all lights, shadows, GI, UI and set camera clear flags to don't clear. Then add objects one at a time and turn things on (lights etc..) one at a time to see what is affecting batches.
     
  10. congtrungvnit

    congtrungvnit

    Joined:
    Jul 18, 2016
    Posts:
    14
    Hi. How can I add out of bounds uvs objects to mesh baker? I have ticked the "Consider Mesh UVS" option but it still doesn't work. Thank you!
     
  11. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    Are there multiple materials (submeshes). If there are submeshes and out of bounds UV tiling then you usually need to enable the multiple materials feature. This video explains it:

     
  12. congtrungvnit

    congtrungvnit

    Joined:
    Jul 18, 2016
    Posts:
    14
    No. It is a humanoid character objects with body parts are skinned meshes. Those parts share a same material.
     
  13. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    Can you send the log from the texture bake?
     
  14. congtrungvnit

    congtrungvnit

    Joined:
    Jul 18, 2016
    Posts:
    14
    I don't even bake it, so there is no logs. What I have done is using the tool provided by mesh baker to find and add objects (the tool that is accessed by click the "Open tools for adding objects" button). And that tool cannot add the body parts of the mentioned humanoid character to the baker, it inform that those body parts are out of bound uvs objects.
     
  15. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    Ahh, there is a checkbox on the "Tools for adding objects" window for "include objects with out of bounds UVs". By default objects with out of bounds UVs are excluded. But if you tick the box, they will be included.
     
    congtrungvnit likes this.
  16. xxhaissamxx

    xxhaissamxx

    Joined:
    Jan 12, 2015
    Posts:
    134
    can u please add best setting for batch prefabs
    i tested every setting but noting batched like original
     

    Attached Files:

    • 3.png
      3.png
      File size:
      1.3 MB
      Views:
      926
  17. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    245
    Currently I'm combining a lot of meshes at runtime using my own code and it works perfectly. However I would like to do this in the Editor now. I found that Mesh Baker can do this and it already works but I do not want to create a new material because it seems that it makes the resolution a bit worse and is not even necessary and an extra step anyway.

    What I would like to do is to tell it to just combine the meshes while still keeping the old material. Mesh Baker however always tells me to setup a material.

    What could I do when all I want is to combine the mesh? Is this simple task not possible?
     
  18. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    It looks like it is working but that the textures are being downscaled to fit in the atlas. What is the size of the original textures and how big is the resulting atlas? It may be that you are trying to fit too much into the atlas.
     
  19. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    Hi Patrick, you can use the Mesh Baker component without the Texture Baker. In this case the Mesh Baker component will map each material on the source objects to separate submeshes in the combined mesh.
     
  20. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    245
    I already tried that but I get following errors:
    I really do not understand this issue because everything works perfectly using the Mesh.CombineMeshes in code (but that is not what I wanna do anymore).
     
  21. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    I just tested and it worked for me using the latest full version. Is that what you are using? Here is what I did:
    1) Created three cubes with different materials.
    2) Created a "Mesh and Material Baker"
    3) Ignored the MB3_TextureBaker and selected the MB3_MaterialBaker
    a) Checked "custom list of objects to combine"
    b) Added three cubes
    4) Baked​

     
  22. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    245
    I right click in the Hiearchy and I select Create Other -> Mesh and Material Baker
    I cannot find a MB3_MaterialBaker at all here (just a so called MB3_TextureBaker) but if I manually add the meshes to the MeshBaker that also has been created I receive the error message as been posted above.

    If I choose the MaterialBaker and have it create a MeshBaker and I choose that created MeshBaker to bake it also misses the Material.

    I'm using Version 3.19.1

    I really got no clue how you managed to make it work and why it is not working on my side and telling me that I need a material...
     
  23. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    That is the latest version and the one I have been testing with.

    I just retested a couple of different ways and they all worked for me. Something is odd here. Here is the simplest way:

    1) create an empty game object
    2) drag the MB3_MeshBaker script from MeshBaker/scripts to the empty game object.
    3) Now you should have a game object with a single Mesh Baker component. Add your game objects. Click bake.

    I tested with three cubes and three different materials from MeshBaker/Examples/SceneBasicAssets. You might want to try that test first to see if it works, then try with your objects.
     
  24. xxhaissamxx

    xxhaissamxx

    Joined:
    Jan 12, 2015
    Posts:
    134
    4 materials 2048 x 2048 and 19 materials 1024 x 1024 all standard opaque total material size 45.9 MB
    baked result 4096 x 4096 file size 21.3 MB
     
    Last edited: Mar 6, 2017
  25. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    That explains it. a 4096x4096 atlas can hold 16 1024x1024 textures or four 2048 x 2028 textures. You will need to use three atlases to avoid downscaling.
     
  26. xxhaissamxx

    xxhaissamxx

    Joined:
    Jan 12, 2015
    Posts:
    134
    so 8192 x 8192 atlas can hold 32 1024x1024 textures ??? if yes did that mean i can bake 1024 with 2048 ??? or i should separate it ??
     
  27. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    Actually 8192 x 8192 can hold 64 1024 textures. A single 8192 atlas is equivalent to four 4096 textures, or sixteen 2048 textures or 64 1024 textures. so it can hold everything. Is your target platform Desktop? If not your platform may not support textures that big. Make sure you use the "Resize power of two textures" option or the padding will wreck the nice fit.

    Be carful if you upscale your atlas to 8192. After you bake it may appear that the atlas is still 4096. You may need to select the atlas in the project and switch the "max size" to 8192 to see the full resolution.
     
    Last edited: Mar 7, 2017
    xxhaissamxx and hopeful like this.
  28. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    245
    I re-imported everything and now it seems to work but I receive tons of "Dynamic batching: index buffer source is NULL" errors instead that kill performance :(
     
  29. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    Hmmm, I don't get those errors in the situation I describe. What version of Unity are you using? The only time I have seen those errors previously is if I have a mesh with zero vertices. Do you have a mesh like that in your scene? Are you deleting the source meshes after baking? Where is the baking happening (Update, Coroutine)? I have had problems using yield return WaitForEndOfFrame, because Unity doesn't like new geometry being generated just before rendering. I had to use yield return null instead.
     
  30. rodger_hu

    rodger_hu

    Joined:
    Apr 10, 2012
    Posts:
    5
    Assets/MeshBaker/scripts/core/MB3_MeshCombinerSimple.cs(2040,5): error CS0103: The name `MeshUtility' does not exist in the current context

    on Unity 5.6.0b11

    maybe need (MB3_MeshCombinerSimple.cs line 2040) MeshUtility.Optimize(_mesh) convert to _mesh.MarkDynamic() ?
     
    NeoUnity likes this.
  31. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    Replace:

    MeshUtility.Optimize(_mesh)

    with

    UnityEditor.MeshUtility.Optimize(_mesh)

    Sorry about that. I submitted a fix last night. Should be live in a few days.
     
    rodger_hu likes this.
  32. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Hi I have owned this for a long time, but have not used a lot yet and we plan to, but not sure if this was asked, and we have not tried, I assume this works for substances as well?? Thanks.
     
  33. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    Currently no. You need to export the substances as textures then they can be baked together. I hope to add support for this. I looked at it a few weeks ago and it was turning into a bigger job than I had initially hoped so it will probably be a few months before I get support for substances.
     
  34. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    .

    hmm, well since Substance Painter 2 allows us to export to QUIXEL SUITE 2, going to have to see if this would work . To able to use it possible.

    bummer. well we will have to use it for a future game then. Thanks for info
     
  35. avenger04

    avenger04

    Joined:
    Oct 15, 2014
    Posts:
    2
    Hi Phong!
    We have a problem with ShowHide() with a skinned mesh baker and GPU Skinning activated. Everytime we hide the last gameobject in the baked mesh, unity crashes.
    I modified one of your example and created a test package for you. Tested in 5.5.2f1 with MeshBaker 3.19.2

    Thanks for your time.
     

    Attached Files:

  36. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    Hi Avenger04, I will take a look but I am not optimistic that I will be able to fix anything. The GPU Skinning is buggy when used with procedural meshes. Most of the time it does not crash but if anything is changed in the mesh vertices, triangles then a mangled skinned mesh results. There is nothing I can do about this. It is a bug in Unity.
     
  37. avenger04

    avenger04

    Joined:
    Oct 15, 2014
    Posts:
    2
    Yeah, I see. Maybe you can submit the crash to unity with some additional information about what happens in that moment, so unity can fix it someday :)
     
  38. Burzok

    Burzok

    Joined:
    Oct 30, 2016
    Posts:
    3
    Hi Phong.

    I'm testing the free version to see if everything works, but we have a problem with blend shapes.

    We have 2 blend shapes on couple of skinned meshes.

    MB1.png

    When I try to bake meshes using MB3_MeshBaker the meshes are combining correctly, but the are no blend shapes on new mesh.

    MB2.png

    Its the same even when I take only one mesh and make a copy of it using Mesh Baker, there are no blend shapes.

    MB3.png

    Please tell me if we are missing something, beceuse in the list of the features there is:
    • Combine BlendShapes
    We want to buy this tool but I can't make the decision before we know if it works as intended.
     
    Last edited: Mar 20, 2017
  39. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    The free version does not support baking blend shapes. I can assure you it does work in the full version, I was working on it a few weeks ago. There are a few limitations:

    1) The blend shapes will be mapped to a new array of blend shapes in the combined mesh which may have more blend shapes that the source meshes. This changes the indexes to the blend shapes so imported animations that use the blend shapes won't work.

    2) To find an index in the combined mesh for a blend shape on one of the source meshes, Mesh Baker provides a Dictionary through the API that maps source mesh blend shape indexes to combined mesh blend shape indexes.
     
  40. Burzok

    Burzok

    Joined:
    Oct 30, 2016
    Posts:
    3
    Thank you Phong for quick response,

    As a followup question:
    The way I should then use the blend chapes in dictionary
    is to simulate the animation through code lerping blend shape value or
    is there a way to map new indexes to new animation and controll it through animator?
     
  41. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    Once the combined mesh exists and has blend shapes you can create animations using the Unity Animation window. These animations can be controlled using an Animator component. However animations that were created for the source models in an external modeling program will not work. You can also lerp the blendshapes through code.
     
  42. Burzok

    Burzok

    Joined:
    Oct 30, 2016
    Posts:
    3
    Thank you so much for detailed answer, It satisfies all my questions :)
    I will be making my company buy your tool, it looks great, can't wait to use full version ;)
     
  43. PW_Dave

    PW_Dave

    Joined:
    Feb 9, 2017
    Posts:
    30
    Is anybody seeing issues with the resulting texture atlases after the latest Nvidia driver update to 378.92? I'm getting a texture result that has the vertical 1/4 slices reversed (top 1/4 at bottom, bottom 1/4 at top, etc.). The UV remapping data is still correct. In case it's a size limitation, I'm baking 6 1024x1024, 3 512x512, and 2 256x256 into a 4096x2048 atlas. This is on Win10 using the fast texture packer. The regular texture packer still works.
    I'm in preproduction and working on getting the runtime code working for mobile, so I'm not real familiar with Mesh Baker yet, and I haven't spent much time digging into this issue. I'm just trying to find out if this is a known issue, or if I need to investigate further.
     
    Last edited: Mar 23, 2017
  44. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    Hello, did it work before upgrading to the latest Nvidia driver? Are you using Texture_Packer_Fast? You could try switching to the "Mesh Baker Texture Packer". It does not use GPU at all so it should be completely unaffected by the GPU driver.

    I am wondering if the problem you are seeing is due to the models using UVs outside the range 0..1. Try enabling "consider UVs". That may fix the problem. If you models also use multiple materials you may need to also use the multiple materials feature.
     
  45. PW_Dave

    PW_Dave

    Joined:
    Feb 9, 2017
    Posts:
    30
    Yeah, the Mesh Baker Texture Packer does work correctly, which is why I'm suspecting the Nvidia drivers. I just had to convert them to a proper format before I was able to test it. The fast option also worked before the update, and it works on Android. We're not tiling any textures, so the UV range should all be inside 0-1. I'll give it a try though. I'll be playing around with various texture sizes and such over the next several days, so if I find any more info I'll pass it along. We may predefine the atlas layout and simply copy textures into atlases at runtime, so this may all be a moot point for us anyway.
     
  46. The_Arrival

    The_Arrival

    Joined:
    Dec 3, 2014
    Posts:
    82
    Hey Phong,

    i´m using MeshBaker for building an automated toolchain to lever our Scene from development-state to production state. One part of it is for sure baking all the little assets in a scene to bigger chunks. I want to automate that process as far as possible and therefor writing editor-classes to do batches of baking in one click.

    So the plan is to use one mashbaker objectand configure it via scripting, but i found your scripting API a bit confusing :)

    First thing is that it´s very weired that the fieldnames from the inspector have very diffrent names, when accessing them im code. For Example "Custom List of Object to be Combined" seems to be meshBaker.objsToMesh.

    In "Bake into scene obj" mode there is the field "Combined Mesh Object", which seems to be meshBaker.meshCombiner.resultSceneObject.

    The most important Method "Bake" i´m not even sure what it is. I found meshBaker.Apply(); and meshBaker.meshCombiner.Apply().

    Wouldn´t it make sense to provide a scripting API which gives you access to call/set everything you could click in the editor?

    Currently i´m doing this for adding several GO´s to the baker and setting it up:
    Code (csharp):
    1.  
    2. Transform coverTrans = GameObject.Find("Cover").transform;
    3.         int count = coverTrans.childCount;
    4.         List<GameObject> toAdd = new List<GameObject>();
    5.         for (int i = 0; i < count; i++) {
    6.             toAdd.Add(coverTrans.GetChild(i).gameObject);
    7.         }
    8.         coverBaker.objsToMesh = toAdd;
    9.         coverBaker.meshCombiner.resultSceneObject = staticTrans.gameObject;
    10.         coverBaker.Apply();
    11.  
    when i execute this, i get "Target Renderer was not set". When i hit the Bake-Button on the component, after running that code (and applying those settings) it bakes the mesh as expected.

    It feels i´m doing something very wrong here :)
     
  47. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    I would suggest looking at some of the scripts in the example scenes. Most of the time you will want to use:

    List<GameObject> objs;
    //collect some objects to bake into a list or an array
    myMeshBaker.AddDeleteGameObjects(obs.ToArray(),null);
    myMeshBaker.Apply();

    Note that if you want to re use the same mesh baker to bake different combined meshes you will need to assign a different result scene object and mesh or the baker will overwrite the previous result.

    You may want to use a MB3_MeshCombiner directly. It is a lower level class that is the combining engine. A MeshBaker component is essentially a wrapper of this class. The purpose of the MeshBaker component is to provide easy drag and drop interface to the MeshCombiner and serialize the setup for easy re-baking.
     
  48. The_Arrival

    The_Arrival

    Joined:
    Dec 3, 2014
    Posts:
    82
    Hey...
    thanks for your answer and the tip with the example scene. Unfortunatly there are still a few bits unclear:

    1: I´m doing exactly what you suggested in your example, but it´s not filling the component with objects. my code is:
    Code (csharp):
    1.  
    2. List<GameObject> toAdd = new List<GameObject>();
    3. for (int i = 0; i < count; i++) {
    4.     toAdd.Add(coverTrans.GetChild(i).gameObject);
    5. }
    6. //coverBaker.objsToMesh = toAdd;
    7. coverBaker.AddDeleteGameObjects(toAdd.ToArray(), null, false);
    8. coverBaker.meshCombiner.resultSceneObject = staticTrans.gameObject;
    9.  
    when i execute it and check the component in the inspector, the objects array is still empty.

    when i do this instead, it works and fills the array:
    Code (csharp):
    1.  
    2. List<GameObject> toAdd = new List<GameObject>();
    3. for (int i = 0; i < count; i++) {
    4.    toAdd.Add(coverTrans.GetChild(i).gameObject);
    5. }
    6. coverBaker.objsToMesh = toAdd;
    7. //coverBaker.AddDeleteGameObjects(toAdd.ToArray(), null, false);
    8. coverBaker.meshCombiner.resultSceneObject = staticTrans.gameObject;
    9.  
    Whats the difference with the two methods? When to use which?

    2: Why is meshBaker.Apply(); throwing an error that i have not set a target renderer, while it works when i hit the "Bake" Button in the inspector? The setup is the same.

    3: Why is the naming of the wrapper API so much diffrent from the naming in the inspector? And why are some of the inspector fields not accessible in the wrapper, only when you dig deeper into the core-classes? Like the result object for example or like setting the textureBakeResults Scriptbale Object

    4: i was also tring out the texture baker. I tried to combine objects with unitys unlit shader as well as objects with unitys default shader. both lead to errors when trying to combine the materials. normal materials work just fine though! Is there a way to bake Objects with the Unlit Material?

    5: Update: I´m currently testing with a standart Material. As recommended in one of your youtube tutorials i did prepare/bake the materials used in a diffrent scene. it´s three materials, same shader but diffrent maps. So i´m back to my baker with a MaterialBakeResult, which i also set in code.
    Code (csharp):
    1.  
    2. meshBaker.objsToMesh = listOfGameObjects;
    3.         meshBaker.meshCombiner.textureBakeResults = resultScriptableObject;
    4.         meshBaker.meshCombiner.renderType = DigitalOpus.MB.Core.MB_RenderType.meshRenderer;
    5.         meshBaker.meshCombiner.resultSceneObject = bakeTransform.gameObject;
    6.         meshBaker.Apply();
    7.  
    I´m still getting the Error of a Target renderer no being set. When i hit "Bake" it works fine. I was looking if i can somehow call that Bake method from the editor script, but whatever is happening exactly in MB3_MeshBakerEditorInternal seems to not be designed for outside use.

    I was also looking for public access to the "Bake Every Meshbaker in Scene" button from the editor-window but i couldn´t reference theMB3_MeshBakerEditorFunctions class

    How can i trigger the same process like when hitting those buttons... since that works just fine :)

    6: When i use the manual mode to bake meshes, i end up with a mesh in scene without colliders. Say i want the new combined mesh to also have collision detection, whats the way to go with mesh baker? Just attach a mesh-collider component using the same baked mesh? Could i also leave the original GO´s active with disabled renderers?

    Don´t get me wrong. I´m not trying to mock around, i´m just trying to make sure i understand your tool and the reasons behind your decisions well enough to use it correctly.

    To understand my efforts here: I´m trying to automate this process to work with CI, so on trigger a buildserver not only takes care of building the player, it should also optimize the scenes from dev-state to production-state, wich is mainly mesh-baking to pre-baked materials and lightbaking
     
    Last edited: Mar 25, 2017
  49. Phong

    Phong

    Joined:
    Apr 12, 2010
    Posts:
    2,083
    Stick with the first approach. The purpose of the objsToMesh list is serialization (so that the list of objects will be remembered if the scene is saved). It can be overridden (if using a texture baker), or ignored if you pass your own list into AddDeleteGameObjects.

    In the example you sent it looked like you hadn't called AddDeleteGameObjects first. I think this is the problem.
    If I could do it all again, this is something I would change. I don't want to change the interface at this point because I have created a lot of tutorial videos and documentation using the current interface. I also don't want to change the API because doing so would break a lot of peoples code. One day I will release a version 4 and fix this.
    These should work. What errors are you getting? Did you set the shader in the result material?
    You should be able to use these from any code that is in an Editor folder. The methods are declared public static in a public class. The problem might be that you are trying to access them from code in a plugins folder (plugins are compiled before regular scripts), or from javascript (to use javascript the mesh baker scripts need to put in a plugins folder).
    Yes and yes. You can either add a mesh collider to the combined mesh or leave the original GO's active with disabled renderers. The second method is probably better if you have scripts on the original game objects that handle collision events.
     
  50. b3nni

    b3nni

    Joined:
    Jun 7, 2016
    Posts:
    8
    Hey, is there any improvement if i have 10 movable meshes (each with more than 10000 tris) and combine the textures (not the meshes) to one big texture?