Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sphere colliders #17

Open
yuanming-hu opened this issue Apr 8, 2020 · 10 comments
Open

Sphere colliders #17

yuanming-hu opened this issue Apr 8, 2020 · 10 comments
Assignees
Labels
enhancement New feature or request priority0

Comments

@yuanming-hu
Copy link
Member

I can add simple colliders to the solver. To begin with, I would simply do spheric colliders only.

A question for @PavelBlend: what is the best way to specify the trajectory of the sphere?

@PavelBlend
Copy link
Collaborator

It is possible to make a motionless sphere for now. Or do you want the sphere to interact with particles? If the sphere is dynamic, then you can simply indicate to it the initial velocity along the X axis (1.0, 0.0, 0.0).

@yuanming-hu
Copy link
Member Author

Sure, I can easily do motionless or specify a fixed velocity.

@PavelBlend
Copy link
Collaborator

But will it be difficult in the future to make the sphere dynamic? Will I have to break a lot of code? If not, then for the first time you can get around motionless obstacles.

@yuanming-hu
Copy link
Member Author

No, that's not difficult at all. I agree we should just demonstrate the possibility and let the community to contribute fancier versions.

@PavelBlend
Copy link
Collaborator

I have a question:
What will colliders be like? Particles, voxels or mesh?

@yuanming-hu
Copy link
Member Author

I have a question:
What will colliders be like? Particles, voxels or mesh?

Currently, just spheres. We can improve later to support arbitrary meshes/voxels.

@anthropoy
Copy link

Hi Yuan Ming,

I have started looking into supporting arbitrary meshes. What I have done is quite simple, I just get the positions and normals of the triangles centroid and add them to the engine using add_surface_collider. It works but it's very slow during initialisation. The number of triangles is just over 1000 when it took more than 5 minutes to initialise. How can we speed up the initialisation process when adding these colliders or we need a different approach? Thanks.

Sam

@Jack12xl
Copy link
Contributor

Hi,
Could you show me the code where you add these triangles? Maybe I could take a look when available.
Maybe we should try using SDF instead of manually add these triangles

@anthropoy
Copy link

Hi Jack,

Thanks for responding. After dwelling in a bit more, I did realise that what I did there was wrong. The existing add_surface_collider function is not suitable for arbitrary meshes, it will just create an infinite plane for each point and normals. I was looking for existing python packages that could calculate SDF for meshes fast. Trimesh seems to be a good candidate but I'm not sure what's the best way to integrate this into taichi_element. Or what do you suggest? Appreciate your help and pointers. Thanks!

@r03ert0
Copy link

r03ert0 commented Jan 19, 2022

you may want to check libigl (comes with python bindings)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority0
Projects
None yet
Development

No branches or pull requests

5 participants