Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 thyde_u4 · Jan 15, 2014 at 03:02 AM · colliderskinnedmeshrendererblendshapes

SkinnedMeshRenderer and Colliders

Greets - (I tried asking this somewhere else, but can't find the original post, so let's try again):

I have a collection of 3d objects originally created in Maya, and pulled in via an FBX. These objects are Skinned meshes with Blendshapes. (Kudos to the devs that integrated the Blendshapes - very well implemented, and completely made obsolete my old vertex morphing system!) The geometry does not include a traditional Mesh Filter or Mesh Renderer component.

I need to be able to detect collisions amongst multiple SMRs after they have been affected by the blendshapes. Adding the requisite Rigidbody and Mesh Collider components does yield a functioning collision system, but only with the unaffected (original) object. If the blendshape causes the object to grow and overlap another object, the collision does not fire.

Multiple attempts at copying/replacing the meshes via sharedmesh pulls haven't yielded positive results. BakeMesh (missing some docs, I think) doesn't appear to work on my geometry correctly; it yields a no-name mesh, but at least it isn't null.

My quickie test code:

 void Update () 
     {
         Mesh baked = new Mesh();
         MeshCollider mcol = this.GetComponent<MeshCollider>();
         SkinnedMeshRenderer skin = this.GetComponent<SkinnedMeshRenderer> ();
 
         skin.BakeMesh(baked);
 
         mcol.sharedMesh = null;
         mcol.sharedMesh = baked;
 
     }


I've read a couple places that merely replacing the mesh doesn't work, that it has to be made null first, fair enough.

Settings grab of the object:

alt text

As noted, if one merely moves the object with blendshape weight at 0 (unaffected) and it collides, the trigger fires. If one is not yet colliding, but does make contact using the motion/change of a blendshape the trigger does not fire.

The need is to detect when two blendshape-affected objects have collided, and since they are rather organic objects, using a collection of simpler objects as ghosts won't work. If there are suggestions for accomplishing this in another manner, I'm all ears.

Additionally, if there's some insight that the Maya export side is deficient, I can take suggestions there, too.

Many thanks, Ted.

capture.jpg (40.4 kB)
Comment
Add comment · Show 1
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 zach-r-d · Jun 13, 2015 at 11:49 AM 0
Share

I notice Is Trigger is checked for the mesh collider; is there any chance a blendshape is making the mesh no longer convex?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by metamorphist · Apr 05, 2016 at 02:35 AM

mesh colliders does not animate.

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

21 People are following this question.

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

Related Questions

Modify Blend Shapes with a Slider 0 Answers

BlendShape node, name change 0 Answers

Importing Blender Object Splits Mesh Into 4 1 Answer

Blendshapes freeze rendering under certain conditions [2018.3.0b8] 1 Answer

SkinnedMeshRenderer: Change Bones at start without changing mesh or blendshape results. 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