Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Different size softbody
#1
    Hi, i need some balls with different

    size. So i duplicate the 'rubberball' blueprint and set the scale to (2,2,2) and tap generate. Then in the ballpool

    scene, i assigned the new blueprint to the ball and set the scale of ball transform to (2,2,2). But it does't 

    work correctly. Am i doing something wrong?


Attached Files Thumbnail(s)
   
Reply
#2
(11-12-2021, 03:56 AM)gesila77 Wrote:     Hi, i need some balls with different

    size. So i duplicate the 'rubberball' blueprint and set the scale to (2,2,2) and tap generate. Then in the ballpool

    scene, i assigned the new blueprint to the ball and set the scale of ball transform to (2,2,2). But it does't 

    work correctly. Am i doing something wrong?

Hi!

You've applied the softbody and softbody skinner components to the same object. This will scale your blueprint to twice its size on top of it being already scaled twice in the blueprint settings, so x4 in total. And will scale the skinner x2.

Use separate objects for the softbody and the skinner, and keep the softbody object scale to x1. That will solve it Sonrisa
See the "RubberDragon" sample scene for an example of this kind of setup.


kind regards,
Reply
#3
(13-12-2021, 08:58 AM)josemendez Wrote: Hi!

You've applied the softbody and softbody skinner components to the same object. This will scale your blueprint to twice its size on top of it being already scaled twice in the blueprint settings, so x4 in total. And will scale the skinner x2.

Use separate objects for the softbody and the skinner, and keep the softbody object scale to x1. That will solve it Sonrisa
See the "RubberDragon" sample scene for an example of this kind of setup.


kind regards,

Since there is no mesh in the rubberball blueprint, it is difficult to scale. First of all, it is necessary to discard the mesh named p_Cube1 and then scale it. However, there is a problem. I created a hierarchy like in the RubberDragon scene and scaled only the object with the skin at the same rate as the blueprint. However, when I set the scale ratio to 4, the shape matching constraints on the blueprint are broken and this method does not work. Is there a solution for this?
Reply
#4
(03-02-2022, 11:44 PM)furkiti Wrote: However, when I set the scale ratio to 4, the shape matching constraints on the blueprint are broken and this method does not work. Is there a solution for this?

When you talk about setting the scale ratio, how are you scaling the softbody? Are you scaling the blueprint data and re-generating it or scaling the softbody transform?
Reply
#5
Hello,

I hope you don't mind me jumping on here.   I'm also trying to create different sized softbodies. 

I tried copying the RubberDragon scene, but I'm really struggling when I play the scene.  Pictures of my setup  -

   
   
   
   
   

The balls are prefab variants.
I separated the skinner from the softbody.
I scale the blueprint and the skin (the same value).
When I press 'Play', the scaled variants implode.


The only blueprint difference (other than scale) is that I increase the particles' mass to match the size.

I would love some help with this.  I'm pretty new to Obi, and I'm hoping there's something obvious that I've missed.

Many thanks,

Andy
Reply
#6
(17-02-2022, 03:39 PM)branston Wrote: Hello,

I hope you don't mind me jumping on here.   I'm also trying to create different sized softbodies. 

I tried copying the RubberDragon scene, but I'm really struggling when I play the scene.  Pictures of my setup  -

The balls are prefab variants.
I separated the skinner from the softbody.
I scale the blueprint and the skin (the same value).
When I press 'Play', the scaled variants implode.


The only blueprint difference (other than scale) is that I increase the particles' mass to match the size.

I would love some help with this.  I'm pretty new to Obi, and I'm hoping there's something obvious that I've missed.

Many thanks,

Andy

Hi Andy!

I assume the objects you're using have different physical sizes, right? by that I mean the mesh is actually bigger, not just the same mesh using transforms with increasingly larger scale values.

In that case, your setup should work. A typical pitfalls that leads to similar situations is forgetting to bind the skinner to the modified particle representation after changing the blueprint. This is akin to changing the skeletal structure of a character, and not rebinding the skin to the new bones.

I don't know if this is your case though, try hitting "bind skin" again in your ObiSoftbodySkinner components and let me know whether it solves the issue or not, if the latter we'll dig deeper.

kind regards,
Reply
#7
(18-02-2022, 09:35 AM)josemendez Wrote: Hi Andy!

I assume the objects you're using have different physical sizes, right? by that I mean the mesh is actually bigger, not just the same mesh using transforms with increasingly larger scale values.

In that case, your setup should work. A typical pitfalls that leads to similar situations is forgetting to bind the skinner to the modified particle representation after changing the blueprint. This is akin to changing the skeletal structure of a character, and not rebinding the skin to the new bones.

I don't know if this is your case though, try hitting "bind skin" again in your ObiSoftbodySkinner components and  let me know whether it solves the issue or not, if the latter we'll dig deeper.

kind regards,

Thanks for your reply!

I am only using the one mesh - CubicSphere in the Common/SampleResources/Models folder.  I'd like to use one mesh but change scale in the different prefabs, if possible.  I have tried using meshes of different sizes, but I get the same, spiky results.   I definitely 'Bind Skin' after every blueprint change.  The particles look fine btw, so it must be a skinning issue of some sort?  

   
Reply
#8
(18-02-2022, 11:23 AM)branston Wrote: Thanks for your reply!

I am only using the one mesh - CubicSphere in the Common/SampleResources/Models folder.  I'd like to use one mesh but change scale in the different prefabs, if possible.  I have tried using meshes of different sizes, but I get the same, spiky results.   I definitely 'Bind Skin' after every blueprint change.  The particles look fine btw, so it must be a skinning issue of some sort?  

The scale values on your meshes's transforms are 1. So I guess you're scaling the parent transform (prefab itself), which contains both the softbody and the skin. Correct?

If this is the case, that's the cause of the issue: you're scaling the softbody at runtime (via its parent) which is not supported. Scaling deformable objects at runtime is not mathematically possible. You can either scale the space around them (done by scaling the solver), or scale their rest shape (which is what you do using the blueprint's scale values). If you're interested in details, this is because unlike a rigid object a deformable object may rotate and/or scale differently at different points: it does not have a clear "origin". Applying a scale to that doesn't work as you'd expect.

This is somewhat related to the reason why if you parent a rotated object to a non-uniformly scaled object in any game engine you get a weirdly sheared/distorted result.

The point of separating the softbody and the skinner into different objects is precisely to allow for scaling without the need to scale the softbody object: use the same scale for the skinner as you did for the softbody blueprint, then leave the softbody scale at 1.

kind regards,
Reply
#9
FYI I'm solving this by having meshes of different scales for now.  

Sometimes I still get skinner problems, but removing the skinner component and re-adding it seems to fix the issue.  I'm using Unity 2020.3.2f1, in case you want to investigate further.

Cheers,

Andy
Reply