Attaching SoftBody/Solver to moving Rigidbody - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Softbody (https://obi.virtualmethodstudio.com/forum/forum-12.html) +--- Thread: Attaching SoftBody/Solver to moving Rigidbody (/thread-3180.html) |
Attaching SoftBody/Solver to moving Rigidbody - vincurekf - 16-11-2021 Hello everyone, I am trying to use Obi Soft Body to make parts of my vehicle deformable. I have setup all parts in the same way as they are setup in the DeformableBarrels test scene provided with the plugin. When I hit play, the softbody is not reacting to the ball emitter provided with the plugin. I have BurstCollisionWorld in the scene (created automatically), Obi Solver attached to the vehicle, and inside the vehicle hierarchy I have Obi Softbody attached to the front bumper. I have generated the blueprint, it has good connections. Everything should be OK, but when I hit play, collisions don't work. Please see my setup in attached screenshots. Is there anything I am doing wrong? The barrels scene is working for me (although at 10fps). Thank You for any advice EDIT: Sorry, the images were too large, link to imgur here: https://imgur.com/a/X0URmod RE: Attaching SoftBody/Solver to moving Rigidbody - josemendez - 16-11-2021 (16-11-2021, 09:00 AM)vincurekf Wrote: I have BurstCollisionWorld in the scene (created automatically), Obi Solver attached to the vehicle, and inside the vehicle hierarchy I have Obi Softbody attached to the front bumper. Looks like there's very few vertices in your softbody and they're very spaced apart. Obi will generate one particle per vertex, but in your case this covers less than 10% of the bumper's surface. Unless you hit a particle exactly head-on (very unlikely) no collisions will take place. You should have more vertices in there, and ensure particles cover most of the surface. Other possible reasons are: - Collision constraits globally disabled in the solver (under the "Constraints" foldout) - Improper setup of collisions filters (see collisions). Remember that Obi is a particle-based engine. Only particles generate collisions. Imho, using a particle engine for car damage is not a good choice. Most car damage/destruction engines are strut based (BeamNG) or tetrahedron based, with mesh-based collision detection. (16-11-2021, 09:00 AM)vincurekf Wrote: The barrels scene is working for me (although at 10fps).Should be more like 200-300 fps. I see you're using Burst as your backend, make sure the jobs debugger and all other performance hogs are disabled: http://obi.virtualmethodstudio.com/manual/6.2/backends.html RE: Attaching SoftBody/Solver to moving Rigidbody - vincurekf - 16-11-2021 (16-11-2021, 09:58 AM)josemendez Wrote: Looks like there's very few vertices in your softbody and they're very spaced apart. Obi will generate one particle per vertex, but in your case this covers less than 10% of the bumper's surface. Unless you hit a particle exactly head-on (very unlikely) no collisions will take place. You should have more vertices in there, and ensure particles cover most of the surface. I have setup the Jobs options as is described in the documentation, when I build the scene, I am getting solid 60fps (capped by my GPU). But in editor it's very laggy: https://youtu.be/nnLN7WRieBQ For the bumper issue, I'll try what you mentioned and get back to you. Thank you for your help RE: Attaching SoftBody/Solver to moving Rigidbody - josemendez - 16-11-2021 (16-11-2021, 10:28 AM)vincurekf Wrote: I have setup the Jobs options as is described in the documentation, when I build the scene, I am getting solid 60fps (capped by my GPU). The main in-editor performance sink is the jobs debugger. This of course does not run in the build, so you get normal performance there. Your menu does not seem to have an option to disable it, so I guess you don't have the Jobs package installed? (or Unity has moved the option elsewhere? ) RE: Attaching SoftBody/Solver to moving Rigidbody - vincurekf - 16-11-2021 (16-11-2021, 10:32 AM)josemendez Wrote: The main in-editor performance sink is the jobs debugger. This of course does not run in the build, so you get normal performance there. Yes, that was my mistake, I did not have the dependencies installed, I saw Burst and thought that the rest is installed as dependency. But it would be good to provide more information in the documentation, which packages to install (and maybe how). I have installed these packages in Unity Registry. Manually via the +button -> Add packages from git URL, in top-left corner in package Manager: com.unity.collections com.unity.jobs Can be selected from the package list: Mathematics Burst - was installed by default in Unity version 2021 Now it's working perfectly even in editor. Thank you for your help! RE: Attaching SoftBody/Solver to moving Rigidbody - josemendez - 16-11-2021 (16-11-2021, 11:18 AM)vincurekf Wrote: But it would be good to provide more information in the documentation, which packages to install (and maybe how). The list of packages to install and their minimum required versions is already in the documentation: http://obi.virtualmethodstudio.com/manual/6.2/backends.html Quote:Using the Burst backend requires having the following Unity packages installed (if you don't have these installed, Obi will try to fall back to the Oni backend): How to install packages varies across Unity and PackageManager versions, that's covered in Unity's docs. Glad it works well for you now! let me know if I can be of any help. |