Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by DaveA · Aug 17, 2011 at 10:32 PM · clippingdisappearskinnedmeshrenderer

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?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Waz · Aug 17, 2011 at 11:58 PM 0
Share

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 Skinned$$anonymous$$eshRenderer attached.

avatar image DaveA · Aug 18, 2011 at 12:19 AM 0
Share

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.

4 Replies

· Add your reply
  • Sort: 
avatar image
7
Best Answer

Answer by DaveA · Aug 18, 2011 at 12:30 AM

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.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Waz · Aug 18, 2011 at 01:21 AM 0
Share

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).

avatar image DaveA · Aug 18, 2011 at 01:40 AM 0
Share

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.

avatar image cowlinator · May 14, 2012 at 09:26 PM 0
Share

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.

avatar image
1

Answer by MaVCArt · Aug 12, 2013 at 07:40 AM

I have this very same problem - Unfortunately, due to performance reasons, I am not able to use the "Update when Offscreen" option, since we're using this for our game's NPC's, which tend to get pretty heavy.

The option we're looking into right now is to manually set the bounding box at runtime, but on that front, we haven't yet figured out how - the bounding box would need to encompass the maximum extents of the mesh, including all possible animations that would be used for it. Is there a way to somehow sample each animation frame in an FBX file, and in that way get the maximum extents values for that file?

I'm continuing my search beyond this thread, so if and when I find a solution, I will make sure to update my post here :)

UPDATE:

I have managed to fix this issue; the following thread provides the answer:

http://forum.unity3d.com/threads/44704-Fix-for-animation-bug

As you can see, this problem is most likely caused by Unity incorrectly setting the root of the file, by creating a root of its own. At least, for me, the issue was solved by inserting an empty, unlinked dummy in my fbx file, which forced Unity to set the Pivot of the FBX file to that dummy, for some reason.

I hope this helps someone :)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image b1gry4n · Aug 24, 2018 at 08:12 AM 0
Share

this solved my problem. Reassigning the root bone setting on my skinned mesh renderer to the highest transform in the heirarchy of my character.

avatar image
0

Answer by migue0583 · Sep 27, 2021 at 11:40 AM

The problem may be the Bounds of the Skinned Mesh Renderer. The bounds are supposed to be a cubic area surrounding the mesh. Try using the Edit Bounds button on the Inspector, with the disappearing object selected.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by x1alphaz1 · Nov 06, 2021 at 01:34 PM

For Anyone who's facing this issue. U need to set the rootbone position of the attached object to the position of the Main SkinnedMeshrenderer rootbone position

Example:

 O1 = Main.GetComponent<SkinnedMeshRenderer>();
 O2 = Attached.GetComponent<SkinnedMeshRenderer>();
 O2.rootBone.transform.position = O1.rootBone.transform.position;




Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Putting Together Multiple Rigged Models 1 Answer

Skinned Mesh Renderer Combining submesh issue 1 Answer

Animated mesh is clipping in viewport and in game camera 1 Answer

Models Disappeared in Scene but shows in Hierarchy -2 Answers

Window disappear and unable to bring it back 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges