Latest Threads |
How to dynamically change...
Forum: Obi Rope
Last Post: josemendez
51 minutes ago
» Replies: 5
» Views: 125
|
Pipeline that bends
Forum: Obi Softbody
Last Post: josemendez
04-07-2025, 09:52 AM
» Replies: 13
» Views: 817
|
How to implement/sync Obi...
Forum: Obi Rope
Last Post: quent_1982
01-07-2025, 01:48 PM
» Replies: 2
» Views: 190
|
Collisions don't work con...
Forum: Obi Rope
Last Post: chenji
27-06-2025, 03:05 AM
» Replies: 3
» Views: 258
|
Force Zone apply differen...
Forum: Obi Rope
Last Post: chenji
26-06-2025, 11:41 AM
» Replies: 11
» Views: 758
|
Can I blend in and out of...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 04:42 PM
» Replies: 3
» Views: 244
|
Using a rigidbody/collide...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 09:29 AM
» Replies: 1
» Views: 147
|
Solver is too performance...
Forum: Obi Rope
Last Post: quent_1982
20-06-2025, 08:09 AM
» Replies: 40
» Views: 4,254
|
Obi 7 Model Scaling
Forum: Obi Cloth
Last Post: alkis
19-06-2025, 02:37 PM
» Replies: 2
» Views: 258
|
Obi Softbody instability?
Forum: Obi Softbody
Last Post: Aroosh
18-06-2025, 06:35 PM
» Replies: 0
» Views: 138
|
|
|
Shading of Obi Cloth Proxy |
Posted by: backerly - 09-04-2019, 02:04 PM - Forum: Obi Cloth
- Replies (2)
|
 |
Hello.
I did a simple test using Obi Cloth Proxy.
I chose a plane for source object and a sphere for target object.
Result
Deformation worked great as I had expected. But the shading of the deformed sphere was somewhat awkward (not smooth enough). It seems that something is wrong with normals.
Is there any way to fix this?
Thanks!
|
|
|
What defines overall attributes of softbodies |
Posted by: aphixe - 09-04-2019, 09:25 AM - Forum: Obi Softbody
- Replies (1)
|
 |
I am not an expert at all in physics. but what defines the attributes, of a softbodie. I know normally outside softbodies, we use rigidbodies to define, mass/weight, etc. what makes the softbodies over all attributes. like how soft something is, can you inflate things like a tire, can you make things more bouncy. only thing that changed most of the charactistics for me was the friction of an object, but that just made it slide or not slide on surface. maybe I need to reread the documents. but some things don't make sense yet.
|
|
|
RegenerateRestPositions strange code |
Posted by: Teolog - 08-04-2019, 12:02 PM - Forum: Obi Rope
- Replies (3)
|
 |
Here original code from ObiRope
public override void RegenerateRestPositions(){
var distanceBatch = DistanceConstraints.GetFirstBatch();
if (distanceBatch.ConstraintCount > 0)
{
// Iterate trough all distance constraints in order:
int particle = -1;
int lastParticle = -1;
float accumulatedDistance = 0;
for (int i = 0; i < distanceBatch.ConstraintCount; ++i)
{
if (i == 0)
{
lastParticle = particle = distanceBatch.springIndices[i * 2];
restPositions[particle] = new Vector4(0, 0, 0, 1);
}
accumulatedDistance += Mathf.Min(interParticleDistance, principalRadii[particle][0],principalRadii[lastParticle][0]);
particle = distanceBatch.springIndices[i * 2 + 1];
restPositions[particle] = Vector3.right * accumulatedDistance;
restPositions[particle][3] = 1; // activate rest position
}
}
PushDataToSolver(ParticleData.REST_POSITIONS);
}
First: this code generate (distanceBatch.ConstraintCount-1) float[3] arrays while Mathf.Min function, this makes unity garbage collector crazy.
Second: lastParticle newer updated in cycle, this result in accumulatedDistance sum of distances from rope start to current point, not from previous to current point.
So finally accumulatedDistance contains not total rope length but (distanceBatch.ConstraintCount-1)*ropeLength/2.
Are you sure that is right, because this is strange.
This is my implementation
public override void RegenerateRestPositions(){
ObiDistanceConstraintBatch distanceBatch = DistanceConstraints.GetFirstBatch();
if (distanceBatch.ConstraintCount > 0)
{
Vector3 right=Vector3.right;
// Iterate trough all distance constraints in order:
int lastParticle = distanceBatch.springIndices[0];
float accumulatedDistance = 0;
restPositions[0] = new Vector4(0, 0, 0, 1);
for (int i = 0; i < distanceBatch.ConstraintCount; ++i)
{
int particle = distanceBatch.springIndices[i * 2 + 1];
accumulatedDistance += Mathf.Min(interParticleDistance, Math.Min(principalRadii[particle][0],principalRadii[lastParticle][0]));
var ditanceoffset = right * accumulatedDistance;
restPositions[particle] =new Vector4(ditanceoffset.x,ditanceoffset.y,ditanceoffset.z,1);
lastParticle = particle;
}
PushDataToSolver(ParticleData.REST_POSITIONS);
}
}
|
|
|
|