05-10-2023, 06:16 AM
(This post was last modified: 05-10-2023, 06:19 AM by josemendez.)
(04-10-2023, 11:26 AM)Henning Wrote: Hi Obi team,
I am wondering if it is possibleĀ to manually / in scripts add particles to a softbody blueprint. Sometimes there are regions I would like to add details for better collision detection while the whole blueprint does not contain too many particles.
Hi!
Yes, it's possible but it involves writing your own kind of blueprint (or modifying the existing blueprint code to somehow do adaptive sampling, which is a pretty complex endeavor). All blueprint generation logic can be found in Obi/Scripts/Softbody/Blueprints/ObiSoftbodySurfaceBlueprint.cs
Note you can set the radius of individual particles using the blueprint editor, which allows you to make specific particles larger for better collision detection.
FYI, in the next update (which will be available by the end of this year) we've added surface collision support for softbodies, which allows for very robust collision detection even with low-resolution blueprints.
(04-10-2023, 11:26 AM)Henning Wrote: Also, is it possible to group particles in scripts? Manually selecting and creating groups is too time-consuming and they disappearĀ once I regenerate the particles.
Yes, you can create particle groups at runtime. They're just scriptable objects. The page regarding how to deal with attachments also contains sample code to create a particle group. See:
http://obi.virtualmethodstudio.com/manua...ments.html