x


Skinned Mesh disappears when too close

I have this character (from Mixamo), and esp on Mac and Web builds, he disappears when too close to the camera (PC much better). And by too close, I mean like 2 meters. And by Skinned Mesh I mean that all other rendered objects are just fine even very close. I attached a sphere to the character, which I can see just fine at any distance, even when the character mesh is invisible. I already set the near clipping on the camera to be pretty small. I don't see any special clipping settings for skinned meshes. Any ideas?

more ▼

asked Aug 17 '11 at 10:32 PM

DaveA gravatar image

DaveA
26.5k 151 171 256

In Unity 3.4, you can see the actual bounds of the mesh as a white AABB. Does this box look correct for your model? I've certainly seen things like this, and it is always because the bounding box is not what it should be, usually because a child has been moved beyond the precalculated BB of the skinned mesh (which is precalculated, I believe from the animations), such as by having the ragdoll bodies not moving a bone with the SkinnedMeshRenderer attached.

Aug 17 '11 at 11:58 PM Waz

I was just gonna say, I can see it if I look at its feet (where the transform root of it is). So that sounds likely.

Aug 18 '11 at 12:19 AM DaveA
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

From Warwick Allison's hint, I looked into this bounding stuff, and found if I turn on 'Update When Offscreen', run, it fixes it. I can even turn that off again and it's better. My character's eyeballs (which I did not add, came with the model) then disappeared, but I was able to pull the same trick by turning on 'Update When Offscreen' for both of them too.

more ▼

answered Aug 18 '11 at 12:30 AM

DaveA gravatar image

DaveA
26.5k 151 171 256

Just note that, depending on how the object is used, that's an expensive option to enabled (doesn't matter of course if this is the player character, but updating off-screen NPCs would be unnecessary cost). So I'd be tempted to keep looking for a different solution, or use the new feature of Unity 3.4 to adjust the bounding box by hand (I've not tried it).

Aug 18 '11 at 01:21 AM Waz

Right. What I'm saying is, I turned it on, ran it, then turned it off again. So it fixed the on-disk version apparently. I was able to turn off 'Update When Offscreen' and it works just how I want. It would be nice to have a 'fix bounding boxes' one-time button though.

Aug 18 '11 at 01:40 AM DaveA

Thanks Dave!
I had a very similar problem, and this fixed it.
It's a very strange fix tho... probably never would have figured that out.

May 14 '12 at 09:26 PM cowlinator
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x108
x81
x53

asked: Aug 17 '11 at 10:32 PM

Seen: 1595 times

Last Updated: May 14 '12 at 09:26 PM