Posts: 3
Threads: 1
Joined: Nov 2021
Reputation:
0
16-11-2021, 09:00 AM
(This post was last modified: 16-11-2021, 09:02 AM by vincurekf.)
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
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
16-11-2021, 09:58 AM
(This post was last modified: 16-11-2021, 10:36 AM by josemendez.)
(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.
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.
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/manua...kends.html
Posts: 3
Threads: 1
Joined: Nov 2021
Reputation:
0
(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.
Other possible reasons are:
- Collision constraits globally disabled in the solver (under the "Constraints" foldout)
- Improper setup of collisions filters (see collisions).
Remember than 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.
Should me 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/manua...kends.html
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
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
16-11-2021, 10:32 AM
(This post was last modified: 16-11-2021, 10:36 AM by josemendez.)
(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).
But in editor it's very laggy:
https://youtu.be/nnLN7WRieBQ
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? )
Posts: 3
Threads: 1
Joined: Nov 2021
Reputation:
0
16-11-2021, 11:18 AM
(This post was last modified: 16-11-2021, 11:18 AM by vincurekf.
Edit Reason: typo
)
(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.
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? )
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!
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
16-11-2021, 11:28 AM
(This post was last modified: 16-11-2021, 11:33 AM by josemendez.)
(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/manua...kends.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):
Burst 1.3.3 or newer
Collections 0.8.0-preview 5 or newer
Mathematics 1.0.1 or newer
Jobs 0.2.9-preview.15 or newer
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.
|