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
0
Question by Soul_IT · May 03, 2014 at 10:05 PM · meshcolliderconcave

concave dynamic meshes collision

I have a dynamic player created mesh that can be concave and need to collide with another dynamic player created mesh that can be concave too. I have a mesh collider for both the whole shapesmeshes but they aren't colliding since unity do not detect collision for concave mesh colliders, only convex ones. I can't have convex mesh colliders since my meshes do need to go one inside the other in some cases. I already tried with multiple child colliders since my dynamic meshes are made of voxels but these primitive colliders become too many for unity to handle (there can be thousand of them). I thought of grouping some voxels togheter to create less mesh colliders and try to keep them convex but this solution is also too slow.

Anyone knows of a better and performance wise solution?

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 Soul_IT · May 03, 2014 at 11:23 PM 0
Share

Thanks for your suggestion! Yes my meshes are made of cubic "voxels", I know it's not a proper definition but I used it to try to be be as clear as possible :-) You are right and my meshes are created from a 3D array of 4096 element (16x16x16) so I know where any solid block is so I already hide buried faces of my blocks. I thought about your suggestion but I will still have big problems if my mesh is full of random placed empty block (I am using this situation for benchmark as a worst case scenario) because a convex decomposition algorythm will probably create thousands of children too or maybe I do not understand these methods and I am wrong!

avatar image Soul_IT · May 04, 2014 at 01:43 AM 0
Share

maybe I can try to implement my sort of collision using raytraces? Even if I prune all the surface of voxels that can't collide I will still need thousand of raytraces to calculate collision in a satisfactory way. I really can't find a solution

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Jeff-Kesselman · May 03, 2014 at 10:28 PM

You're on the right track, but you need to group the colliders into a few convex objects.

There have been multiple papers and articles written on techniques to split concave objects into the minimal set of convex ones. Id suggest you google and start reading.

Edit: It occurs to me that you a r calling these "voxels" (a bit of a misnomer but just something that many people are confused with these days.) If that means that they are totally filling or not-filling squares in a grid, you could use an octree approach to subdividing them into 3Dsquare areas.

With a bit of cleverness, if that was still too many, you could then recombine ones that share common faces along an axis.

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 Soul_IT · May 03, 2014 at 11:32 PM 0
Share

Thanks for your suggestion! Yes my meshes are made of cubic "voxels", I know it's not a proper definition but I used it to try to be be as clear as possible :-) You are right and my meshes are created from a 3D array of 4096 element (16x16x16) so I know where any solid block is so I already hide buried faces of my blocks. I thought about your suggestion but I will still have big problems if my mesh is full of random placed empty block (I am using this situation for benchmark as a worst case scenario) because a convex decomposition algorythm will probably create thousands of children too or maybe I do not understand these methods and I am wrong!

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

22 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 avatar image

Related Questions

I need a concave mesh collider to work with a rigidbody 0 Answers

Rigidbody bowls/baskets - is there a better way? 0 Answers

MeshCollider Collision Table 2 Answers

adding a mesh collider to this heightmap script properly 1 Answer

Is it better to use Mesh Colliders on Mass Projects or Box Colliders? 2 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