- Home /
Combine meshes?
Hi all,
I have an object that is made up of multiple meshes. I want to combine all of these meshes into one mesh so that I can shade with transparency correctly. I have tried using http://unity3d.com/support/documentation/ScriptReference/Mesh.CombineMeshes.html, but that just makes my character disappear. This might be because my mesh pieces are moving? I'm not really sure.
Thanks!
If you zoom out so you can see your resulting mesh's origin, does the mesh show up? I'm thinking it needs to recompute bounding box.
hey man did you do this to an animating character? Like changing 1 body part with another? What all did you have to do? I'm trying to do the same and can't find much info out there. help appreciated.
@altra4u, what have you gotten so far? I was working with an animated character that I wanted to cross fade with another 3d model. The issue was that I was missing some function calls as I noted below.
well what I have so far is being able to instantiate weapon models and parent them to the right node in the hierarchy thereby making the character hold a weapon. What I want to be able to do is replace the current head with say 5 other heads. I can destroy the current head and put a new one in its place but its obvsiously not a skinned part of the mesh and hence does not animate and all. Also I'm not really sure what you mean by crossfade into another model. Did you mean character A playing animation xyz turns into character B also playing animation xyz? Btw, I'm trying to follow this link http://www.unifycommunity.com/wiki/index.php?title=Skinned$$anonymous$$eshCombiner but its falling short of explanations on why I have to do what I need to do.
Answer by PEOWIfjpwoiqjf · Nov 14, 2011 at 09:18 PM
Found an answer to this, needed to call mesh.optimize, and my transform needed to be modified since the example assumes the object is at 0,0,0.
I'm trying to use combine meshes too, but I'm having problems with position. How did you modify the transforms?
i have a problem in procedural mesh followed by combine mesh script, i think the combine mesh in the parent obj is being called b4 the procedural objects have finished being instantiated.
@ZoomDomain, I didn't understand what your problem actually is. If it is related to the question made here, there is another approach to it too http://answers.unity3d.com/questions/305080/modify-position-in-transform-matrix.html.
hiya, it's ok i figured it out. it's just that i spent many fruitless days trying to combine meshes... and i looked at 40 community pages to find why it didnt combine, so i thought i would post a brief reference on this combine mesh about how combinemesh doesnt work if it actions before the instantiate happens, solution is use the combine children extended version and set a delay of 10 frams in the options. Also the CombineChildren extended version performs a vertex triangulation or something that is called by the mesh.optimise function so you dont need to use mesh optimise with it.
Your answer
Follow this Question
Related Questions
Merging meshes 0 Answers
CombineMeshes result invisible. 0 Answers
Gather all the Meshes into 1 1 Answer
Mesh filters missing their meshes when project cloned from bitbucket 2 Answers