Obi Official Forum
Is one vertex assigned one particle? - 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: Is one vertex assigned one particle? (/thread-3464.html)



Is one vertex assigned one particle? - arowanaito - 22-05-2022

By using ObiParticleSkinner, at most does one vertex have one particle?


RE: Is one vertex assigned one particle? - josemendez - 23-05-2022

(22-05-2022, 01:06 PM)arowanaito Wrote: By using ObiParticleSkinner, at most does one vertex have one particle?

Hi!

No, ObiParticleSkinner uses linear blend skinning (the same algorithm used by SkinnedMeshRenderers). The amount of particles assigned to each vertex depends on the "max bones per vertex" setting in the ObiParticleSkinner inspector, typically it's 4.

See: http://obi.virtualmethodstudio.com/manual/6.3/softbodyskinner.html


RE: Is one vertex assigned one particle? - arowanaito - 29-05-2022

(23-05-2022, 08:05 AM)josemendez Wrote: やあ!

いいえ、ObiParticleSkinnerは線形ブレンドスキニング(SkinnedMeshRenderersで使用されるのと同じアルゴリズム)を使用します。各頂点に割り当てられるパーティクルの量は、ObiParticleSkinnerインスペクターの「頂点あたりの最大ボーン数」設定によって異なります。通常は4です。http

://obi.virtualmethodstudio.com/manual/6.3/softbodyskinner.htmlを参照してください。
Thank You.

If one vertex have five particles within Skinning Max Distance, which is this vertex influenced by, nearer particles or farther particles?

If Skinning Falloff is 1, how long is the distance in Unity unit of skinning weight 0?


RE: Is one vertex assigned one particle? - josemendez - 30-05-2022

(29-05-2022, 05:51 AM)arowanaito Wrote: Thank You.

If one vertex have five particles within Skinning Max Distance, which is this vertex influenced by, nearer particles or farther particles?

Nearer particles have higher influence.

(29-05-2022, 05:51 AM)arowanaito Wrote: If Skinning Falloff is 1, how long is the distance in Unity unit of skinning weight 0?

The "skinning max distance".

Basically: the distance between the vertex and each particle within "skinning max distance" is calculated, then divided by "skinning max distance", and subtracted from 1. Then, the falloff is used as an exponent on the resulting (0,1) value.

kind regards,


RE: Is one vertex assigned one particle? - arowanaito - 03-06-2022

Thank you.


RE: Is one vertex assigned one particle? - arowanaito - 22-06-2022

Hello.

Even if I change the variables, it looks like one vertex is moving according to one particle as shown in A in the figure. I thought that the vertices would move with different weights as shown in B in the figure. Is that possible?
[attachment=1424]


RE: Is one vertex assigned one particle? - josemendez - 22-06-2022

(22-06-2022, 07:52 AM)arowanaito Wrote: Hello.

Even if I change the variables, it looks like one vertex is moving according to one particle as shown in A in the figure. I thought that the vertices would move with different weights as shown in B in the figure. Is that possible?

At runtime, skinning is performed by Unity's skinned mesh renderer component. Obi is not involved in skinning at all, it just provides the initial weights.

As you can see in any of the included sample scenes, vertices move with different weights. Otherwise deformation would look extremely rigid. See for instance the RubberDragon sample scene: there's +30000 vertices in the mesh, but just a few hundred particles.

Make sure the maximum skin radius is large enough so that each particle can influence multiple vertices, and that the amount of weights in the skinner is 4.

let me know if you need further help,


RE: Is one vertex assigned one particle? - arowanaito - 26-06-2022

(22-06-2022, 08:05 AM)josemendez Wrote: At runtime, skinning is performed by Unity's skinned mesh renderer component. Obi is not involved in skinning at all, it just provides the initial weights.

As you can see in any of the included sample scenes, vertices move with different weights. Otherwise deformation would look extremely rigid. See for instance the RubberDragon sample scene: there's +30000 vertices in the mesh, but just a few hundred particles.

Make sure the maximum skin radius is large enough so that each particle can influence multiple vertices, and that the amount of weights in the skinner is 4.

let me know if you need further help,
I think I've solved one of my problems.

One case where I was able to get multiple particles to act on a single vertex was when I added a MeshFilter and MeshRenderer to a GameObject, and then added an ObiSoftbodySkinner. This will automatically generate a SkinnedMeshRenderer.
On the other hand, when a single particle was applied to a single vertex, the SkinnedMeshRenderer was already attached to the GameObject, and the ObiSoftbodySkinner was attached to it.

In my failed example, when I set the SkinningMaxDistance to a very large value, all vertices seemed to move according to the same single particle.

Translated with www.DeepL.com/Translator (free version)


RE: Is one vertex assigned one particle? - arowanaito - 19-07-2022

The skin weights in project settings was set to 2, but I didn't notice that until now. So what I wrote may be wrong. Sorry.


RE: Is one vertex assigned one particle? - josemendez - 19-07-2022

(19-07-2022, 07:20 AM)arowanaito Wrote: The skin weights in project settings was set to 2, but I didn't notice that until now. So what I wrote may be wrong. Sorry.

No worries! With only 2 weights per vertex, skinning will look rather crude so if you're looking for smoother results use at least 4.

kind regards,