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

How to load points as entities? #217

Open
kyleleey opened this issue Dec 21, 2024 · 3 comments
Open

How to load points as entities? #217

kyleleey opened this issue Dec 21, 2024 · 3 comments

Comments

@kyleleey
Copy link

Hi,

Is there a way to load a large number of points(spheres) into genesis as one entity? In my case these points can be set to still, mainly for collision detection with other entites. And since in my case the points number are very large (~1e5), I assume it's not possible to directly use sphere morph for each point.

Is the current "particle entity" suitable for this case (assign many points as particles to one entity)? And how to initialize it?

Thanks for your answer in advance!!

@wangyian-me
Copy link

I don't think the current released code can do this. One hacky way is probably to initialize a "particle entity" for example MPM, and then manually fix them in each timesteps.

@kyleleey
Copy link
Author

kyleleey commented Dec 22, 2024

Thanks for the reply!

In this case, is there an example code of how I can use a bunch of particle locations to initialize the morphs for this entity? Or even a hacky way of where do you suggest to directly reset all the sampled particles in a MPM entity

@kyleleey
Copy link
Author

No worry I find a simple (and hacky) way is:

  1. define a new morph class to load particle positions,
  2. assign the material as PBD.Particle, since now only pbd_solver supports fix particle functionality,
  3. add a few lines in ParticleEntity() to directly use the initialized particles as the particles for simulation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants