Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is it possible to cause depression in surface of a softbody by pressing down on it?
#1
I created a cube (with default blueprint settings) and tried pressing down on the top of it with an Obi collider, but was not able to effect much change in it's surface. I tried adding in volume sampling, and playing with the shape matching constraints, but nothing seemed to make a difference.

Before I invest too much time trying to figure it out on my own, I just wanted to check to see if this is even possible? The effect I am going for is sort of like this.

I watched the tutorial videos and looked at the manual but was not able to find this addressed anywhere.
Reply
#2
(26-11-2021, 10:04 PM)benro Wrote: I created a cube (with default blueprint settings) and tried pressing down on the top of it with an Obi collider, but was not able to effect much change in it's surface. I tried adding in volume sampling, and playing with the shape matching constraints, but nothing seemed to make a difference.

Before I invest too much time trying to figure it out on my own, I just wanted to check to see if this is even possible? The effect I am going for is sort of like this.

I watched the tutorial videos and looked at the manual but was not able to find this addressed anywhere.

Hi!

Yes, it's perfectly possible to do this. The detail you get is a direct consequence of how finely detailed your mesh is, and the resolution of your particle sampling in the blueprint. The default blueprint resolution is low-ish though, you'd need to crank up the resolution.

If you're using a regular, default cube mesh -Unity's default cube for instance- you won't be able to get anything remotely similar to what you're after no matter what you try: each cube face is only made of 2 triangles. It's of course impossible to bend or deform such coarse geometry in any meaningful way, so you need to use a more finely subdivided mesh.
Reply
#3
(26-11-2021, 11:09 PM)josemendez Wrote: Hi!

Yes, it's perfectly possible to do this. The detail you get is a direct consequence of how finely detailed your mesh is, and the resolution of your particle sampling in the blueprint. The default blueprint resolution is low-ish though, you'd need to crank up the resolution.

If you're using a regular, default cube mesh -Unity's default cube for instance- you won't be able to get anything remotely similar to what you're after no matter what you try: each cube face is only made of 2 triangles. It's of course impossible to bend or deform such coarse geometry in any meaningful way, so you need to use a more finely subdivided mesh.

I made a cube mesh in blender that has a total of 32 triangles in it's top surface, and then I created a softbody surface blueprint with a surface sampling resolution of 64 using it.

The cube that results definitely has some softbody characteristic - namely, it bounces when it hits the ground. However when I "poke" it with an Obi collider, the collider just passes through it. I am trying to make it cause a concave depression in the surface of the cube.

FWIW, this is the "stick" I use to "poke" the softbody by dragging it in the Scene window while in play mode: https://postimg.cc/H8DR8S51

I tried playing with some the settings in blueprint editor, adjusting the sliders in the Obi Softbody component, and adding volume sampling. However I'm still not achieving the desired effect. And the scenes runs at about 0.2 FPS. Any ideas what I should be doing differently?
Reply
#4
(08-12-2021, 09:01 PM)benro Wrote: I made a cube mesh in blender that has a total of 32 triangles in it's top surface, and then I created a softbody surface blueprint with a surface sampling resolution of 64 using it.

The cube that results definitely has some softbody characteristic - namely, it bounces when it hits the ground. However when I "poke" it with an Obi collider, the collider just passes through it. I am trying to make it cause a concave depression in the surface of the cube.

FWIW, this is the "stick" I use to "poke" the softbody by dragging it in the Scene window while in play mode: https://postimg.cc/H8DR8S51

I tried playing with some the settings in blueprint editor, adjusting the sliders in the Obi Softbody component, and adding volume sampling. However I'm still not achieving the desired effect. And the scenes runs at about 0.2 FPS. Any ideas what I should be doing differently?

Obi is a particle-based engine, so particles are used for collision detection. If you use a thin, long object like the “stick” you mention it will be very easy for it to just slip in-between particles. Adding a ObiParticleRenderer component to your softbody to see the particles at runtime will make this problem obvious. Just make your stick thicker in relation to particle size, and ensure your mesh has good particle coverage.

Also, keep in mind that moving an object by dragging it in the scene view is actually teleporting it: no physic simulation of any kind is involved, so you’re not giving other objects in the scene any chance to oppose this movement (via forces). This will of course make it even easier to poke trough any surface, including softbodies.

Regarding performance, 0.2 fps is certainly not normal. All included sample scenes should run over 200 fps, and something as simple as the setup you describe should run much faster than that. What solver backend are you using?
Reply
#5
I added a particle renderer component to the cube and made the "stick" bigger to no avail. I also tried making a softbody collider sphere to drop on the cube as well, but it just fell through without any noticeable collision. I did have one odd bug, though - while trying to poke the cube with the "stick", at one point the box went flying and all the vertices went off in different directions. I took a screenshot when it happened but couldn't reproduce it.

The solver is set to Burst. As far as I can tell, recent versions of all four of the necessary packages are installed. Here is a screenshot of my Obi Solver's settings in the inspector tab.

Of note, it loos like the softbody cube I'm using has almost 25,000 particles. This seems like WAY too much. Could this be part of the problem? I did not think the settings I used to create it were too egregious
Reply
#6
(13-12-2021, 05:39 AM)benro Wrote: Of note, it loos like the softbody cube I'm using has almost 25,000 particles. This seems like WAY too much. Could this be part of the problem? I did not think the settings I used to create it were too egregious

Hi!

Yep, 25000 particles is *way* too much. This will not only cause your simulation to run extremely slow, but it will also be pretty much impossible to get any accurate collision detection going on because particles will be really small.

You're using voxelization as your surface sampling method, with a resolution of 64 (!!). So 64x64x64 voxels will be generated, and the ones that intersect the cube's surface will be turned into particles. Some quick math tells you that will generate 64x64x6 = 24576 particles, give or take (each face spans 64x64 voxels, and there's 6 faces). Enabling voxel render mode in the blueprint editor makes this easy to see:

[Image: 4oBR9s8.png]

Your cube mesh only has 5x5 vertices at the top face, any additional particles will be wasted so there's absolutely no reason to go above a resolution of 5 in this case, when using voxel sampling. Even the default value of 16 would be too high. Alternatively, switch to vertex sampling.
Reply
#7
(13-12-2021, 08:44 AM)josemendez Wrote: Hi!

Yep, 25000 particles is *way* too much. This will not only cause your simulation to run extremely slow, but it will also be pretty much impossible to get any accurate collision detection going on because particles will be really small.

You're using voxelization as your surface sampling method, with a resolution of 64 (!!). So 64x64x64 voxels will be generated, and the ones that intersect the cube's surface will be turned into particles. Some quick math tells you that will generate 64x64x6 = 24576 particles, give or take (each face spans 64x64 voxels, and there's 6 faces). Enabling voxel render mode in the blueprint editor makes this easy to see:

[Image: 4oBR9s8.png]

Your cube mesh only has 5x5 vertices at the top face, any additional particles will be wasted so there's absolutely no reason to go above a resolution of 5 in this case, when using voxel sampling. Even the default value of 16 would be too high. Alternatively, switch to vertex sampling.



Reducing the resolution had a *dramatic* effect on the frame rate. It now runs easily > 60 FPS. However, I'm still not able to cause depressions in the surface of the cube (for reference, here's what the mesh looks like).

I tried playing with the shape matching constraints without any noticeable difference. This is what the softbody looks like in the inspector tab:
[Image: Obi-softbody-1-6-2022.png]

This is the blueprint used for the softbody:
[Image: Blueprint-1-6-2022.png]


And this is what my softbody looks like in "Edit" mode:
[Image: blueprint-editor-1-6-2022.png]


Should I be creating particle groups and playing with the different properties in edit mode (e.g., assigning particles different values for deformation resistance and plastic yield)? Or do you think it is an issue with the mesh itself?
Reply
#8
Hi!

As long as the cube is correctly skinned to the blueprint, this should already work. Click "bind skin" on your ObiSoftbodySkinner component just to make sure.

Creating particle groups will be of no use here.Maybe your deformation resistance (found in the Softbody component itself) is too high?
Reply