How to extract Convex Shapes from Non-Pure Shapes

Typically: "How do I... ", "How can I... " questions
Post Reply
arp
Posts: 28
Joined: 18 Dec 2014, 10:41

How to extract Convex Shapes from Non-Pure Shapes

Post by arp »

Hi,

I am trying to extract convex shapes from non-pure shapes. I have played around with the parameters in Add--->Convex Decomposition of Selection
but I have not been able to extract the shape properly.

To be specific what are the general guidelines to be followed when converting a non-pure shape to a convex one?

Below is the shape I want to extract
Image

This is the best I could do.
Image

Here is the shape model attached: http://expirebox.com/download/199850f2c ... ce219.html

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: How to extract Convex Shapes from Non-Pure Shapes

Post by coppelia »

Hello,

I guess you want to keep the hole in the tube? And make a convex decomposition of the whole thing?
This is quite difficult. You will have to play with the different parameters in the convex decomposition dialog.
To help the convex decomposition algorithm a little bit, you could divide the tube in 2 or 4 open pieces, and try the convex decomposition function on each one of the smaller pieces. For that, have a look at the triangle edit mode.

Another method, which will give you best results, would be to construct the pipe from small cuboids that you will place around it. Best and easiest would be to to this programmatically, and then you need the center curve of the tube (which you could maybe import as a path). Once you have the path of the center of the tube, you can follow that path trajectory and place small cuboids circularly around the current path element.

The method would be somewhat similar to what is described in this post.

Cheers

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: How to extract Convex Shapes from Non-Pure Shapes

Post by coppelia »

Can you send us your imported tube? We will try to make a scene that generates the counterpart with pure shapes.

Cheers

arp
Posts: 28
Joined: 18 Dec 2014, 10:41

Re: How to extract Convex Shapes from Non-Pure Shapes

Post by arp »

Sent the meshes to the email id provided.

Cheers.

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: How to extract Convex Shapes from Non-Pure Shapes

Post by coppelia »

Have a look at this scene.

Cheers

owi
Posts: 1
Joined: 10 Feb 2017, 13:50

Re: How to extract Convex Shapes from Non-Pure Shapes

Post by owi »

I have a problem with a tray I designed , I said that ......it is a random non-convex shape....

" the shape you made respondable is not a pure shape , nor a convex shape . It is a random non-convex shape that will perform much worse than pure shapes or convex shapes. Additionally, calculations with non-pure non-convex respondable shapes are much more time-consuming. for collision response calculations, it is recommended to use pure shapes whenever possible., or if that is not possible, convex shapes"

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: How to extract Convex Shapes from Non-Pure Shapes

Post by coppelia »

Hello,

you will always run into problems with dynamic shapes that are not based on primitive or convex shapes, as the warning message says. The solution to this is to subdivide your tray into individual elements that are convex, then group all the convex shapes to a compound shape where all constituting elements are convex. This will produce much better results with contact handling with the different physics engines.
Make sure to carefully read this page. This tutorial can also help.

Cheers

Post Reply