NEED HELP! (with swapping mesh filter)

On animated characters: Why sometimes changing mesh filter works, and other times it doesn’t?

First, lest do a summary of what I’ve got:

1) A fbx file of the low poly version of a character, with a biped skeleton (from 3dsmax)
2) A fbx file of the HIGH POLY VERSION of the same character as above, with the same biped skeleton
3) An animation that works for both files

Both characters (Lowpoly and Highpoly) work fine on their own, but they don’t work with each other’s mesh filter.

Sometimes I can have two characters with different mesh, but same skeleton and animation, and I swap the mesh filter with one another, and it works, the animation plays nicely; yet sometimes it doesn’t, the mesh gets messed up with this one character, a very important character.

I’m trying to do a LOD system in which I just switch the mesh filter to lowpoly or highpoly. But there’s this one character that gets messed up if I change the mesh filter (between lowpoly and highpoly version), and I have no idea why.

Someone help me! I’ve been trying to solve this for several days!

I really need the lowpoly highpoly meshes for the character (which share the same skeleton in 3dsmax, yet different mesh low&high), to be able to use each other’s mesh filter, so I can swap them on the fly.

Basically what I do is: drag and drop the low poly character on the scene. Go into the Skinned Mesh Renderer Component, and I change the mesh for the high poly, and bam, it gets all scrambled right there. Same happens the other way around (from high to low) There’s no way I can fix this, non that I know of!

What I’m aiming at is that when the character is too far away, I set the mesh filter to be the lowpoly mesh, and when it’s close, I set the mesh filter to be the highpoly character.

I’ve done this with a couple of characters, in an attempt to reproduce the error, but it works like a charm for those other characters (as I thought it should) YET, with the main character its getting messed up, and no matter what I do, it always gets messed up when I give the other mesh filter.

What are the rules for being able to swap a rigged character’s mesh filter so it doesn’t get messed up?

I’m not sure what it could be, maybe vertex id? maybe it’s because they’re using different materials? I just don’t know!

Also, I get this error message:

Not sure what it means. But the skeleton is the same for everything! - I mean, all I do is replace the mesh in 3dsmax, keeping the same skeleton. The skin modifier uses only the envelopes so I don’t have to re-paint the vertex weights.

The high and lowpoly both work on their own just fine. It’s as soon as I replace the mesh when it gets scrambled.

***I really need to tackle this thing down because I plan on doing stuff for the asset store in the near future, but first I gotta be able to give good user support for my models (especially because I’m responsible for the 100% of the refund if I’m not able to give proper user support). And I can’t have 3d models that work yet others that get scrambled when the customer wants to do some mesh swapping.

It sounds like you may have changed the mesh or binding on one of the two models at some point without realizing it, (in the authoring package, not unity).

When you use one or the other independently, they use their own skeletons (and thus work), but when you swap them in Unity the bones of the one you’re using are looking for a different vertex index value than what’s actually there, and throwing you errors.

That’s the only cause I can think of given what you’ve posted, but I can tell you what I did for my project, though this may not work for yours. I bind all LOD meshes to the same skeleton in my 3d package (max), and export them as one. It looks hideous, but when it’s in Unity I will either
A) Use a script to turn off the Mesh Render component on the LOD meshes I don’t want at that time, (if I need different detail meshes to be triggered on command, like for a cutscene), or
B) Assign each mesh gameobject in Unity to a different LOD-layer, so each one draws at its proper distance with its respective camera (this I use for regular gameplay).

Ultimately this means loading all detail levels at the same time, which might not work for everyone, but I keep memory consumption down with other simple tricks, and it works for me. More than likely scenario (A) is what you’re looking for since you mention needing your customers to have control over the result. I hope this helps some!

Hmm.

I tried exporting a fbx file that contains both low and highpoly, using same skeleton. I dropped it twice on the scene, deleted the highpoly mesh on one, and deleted the lowpoly mesh on the other. Same thing happens when I swap the mesh on either one! :-((

I’m not sure what the binding means :-S, if I screw the binding somehow, is there a way to fix it? :-0

It’s like the error is somehow embedded into the mesh so deep, no matter what I do, the error will persevere! Yet I can’t even reproduce the error into other meshes/characters!

I tried rigging the mesh again from scratch with a new skeleton.

(Both work fine and animate well if they are on their own as always)

I let the highpoly char run on loop. When I change the mesh for the lowpoly, the character stops reading the animation. It goes back to the T pose, no animation whatsoever!.

This is so weird. Even weird that herobrine!

How do I fix the binding? :frowning:

Will I ever get to the bottom of this? I guess not :frowning: