Posts: 4
Threads: 2
Joined: Jul 2019
Reputation:
0
20-07-2019, 09:08 PM
(This post was last modified: 20-07-2019, 10:32 PM by kmay30.)
Hi all.
I've just purchased Obi Softbody and am having an odd issue getting it to work. The demo scene works as expected, but in an existing Unity project, adding a softbody to an object causes that object to fall, as if it had a rigidbody with gravity enabled. This even happens if I move the dragon into my scene.
Does anyone know why this might be happening? It seems like there must be something weird with my scene, but I can't fathom what that might be.
I'm also having another issue. The particles that are generated for softbodies seem to represent a smaller-scaled version of the object, as opposed to being properly scaled. There is basically a cluster of particles in the center of the object, in the shape of the object. Anyone know what's up?
Cheers
*Edit* It looks like this was just the gravity setting of the solver. This has caused me to have another, even weirder question. Why can I not move gameobjects with a softbody in the traditional way? It seems that it snaps back into place, and the only thing capable of moving the object is simulated activity caused by the solver gravity setting. This is all very strange.
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
21-07-2019, 04:51 PM
(This post was last modified: 21-07-2019, 04:53 PM by josemendez.)
(20-07-2019, 09:08 PM)kmay30 Wrote: Hi all.
I've just purchased Obi Softbody and am having an odd issue getting it to work. The demo scene works as expected, but in an existing Unity project, adding a softbody to an object causes that object to fall, as if it had a rigidbody with gravity enabled. This even happens if I move the dragon into my scene.
Does anyone know why this might be happening? It seems like there must be something weird with my scene, but I can't fathom what that might be.
I'm also having another issue. The particles that are generated for softbodies seem to represent a smaller-scaled version of the object, as opposed to being properly scaled. There is basically a cluster of particles in the center of the object, in the shape of the object. Anyone know what's up?
Cheers
*Edit* It looks like this was just the gravity setting of the solver. This has caused me to have another, even weirder question. Why can I not move gameobjects with a softbody in the traditional way? It seems that it snaps back into place, and the only thing capable of moving the object is simulated activity caused by the solver gravity setting. This is all very strange.
Hi,
One you add a Softbody component to an object, it turns into a softbody, which is the "soft" equivalent of a rigid body. As a rigidbody would, it falls, because it is affected by gravity. This is the intended and correct behavior.
However, rigid bodies are, as the name implies, rigid. So while they can be transformed by a rigid (affine) transform, softbodies cannot. Mathematically, it is impossible to describe the position, orientation and scale of any deformable object using a single transform, as any part of it can rotate, move or squash/stretch independently. Instead, it is described by the positions, orientations, and sizes of its particles.
So, you can only move a softbody in the "traditional" way (setting a single transform) if you attach part of it to a rigid object. In all other cases, you should either control it by applying forces, or by moving around its particles directly.
kind regards,
Posts: 4
Threads: 2
Joined: Jul 2019
Reputation:
0
Thanks for the reply! This was the sort of very basic knowledge I needed to get started. I was able to pin a few particles, and parent the dragon to another gameobject, and get the sort of behavior I was looking for.
I have a followup question however. Although the dragon demo works, if I make any changes to that object or set up a new softbody object, nothing happens in terms of softbody movement. Even if I just re-select the dragon meshes for the dragon demo and hit initialize, it then doesn't appear to simulate anything. Is there something else I need to be doing to initialize things, in addition to setting the particle generation and skinned mesh renderer meshes, and clicking initialize?
I have tried various settings and particles masses but I can't get anything that I set up to simulate.
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(22-07-2019, 04:57 AM)kmay30 Wrote: Thanks for the reply! This was the sort of very basic knowledge I needed to get started. I was able to pin a few particles, and parent the dragon to another gameobject, and get the sort of behavior I was looking for.
I have a followup question however. Although the dragon demo works, if I make any changes to that object or set up a new softbody object, nothing happens in terms of softbody movement. Even if I just re-select the dragon meshes for the dragon demo and hit initialize, it then doesn't appear to simulate anything. Is there something else I need to be doing to initialize things, in addition to setting the particle generation and skinned mesh renderer meshes, and clicking initialize?
I have tried various settings and particles masses but I can't get anything that I set up to simulate.
Hi there,
You need to re-bind the skinner if you want the mesh to follow particle movement. See:
http://obi.virtualmethodstudio.com/tutor...setup.html
Posts: 4
Threads: 2
Joined: Jul 2019
Reputation:
0
Thanks. It still wasn't working when I re-bound the skinner, but it works now. I visualized the particles and tweaked the parameters to get better object coverage, and most importantly turned the shape matching constraints stiffness way down.
Now it works great.
|