Latest Threads |
Stretching verts uniforml...
Forum: Obi Softbody
Last Post: josemendez
Yesterday, 04:32 PM
» Replies: 1
» Views: 172
|
Scripting rod forces
Forum: Obi Rope
Last Post: chenji
11-09-2025, 01:15 PM
» Replies: 25
» Views: 3,041
|
Burst error causing crash...
Forum: Obi Rope
Last Post: josemendez
10-09-2025, 07:03 AM
» Replies: 1
» Views: 266
|
Controlling speed of emit...
Forum: Obi Fluid
Last Post: josemendez
06-09-2025, 06:29 AM
» Replies: 1
» Views: 535
|
Looks nice on editor but ...
Forum: Obi Fluid
Last Post: josemendez
04-09-2025, 07:20 AM
» Replies: 3
» Views: 780
|
How to Shorten or Scale t...
Forum: Obi Rope
Last Post: josemendez
02-09-2025, 09:53 AM
» Replies: 5
» Views: 852
|
The Limitation of Using O...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 10:30 PM
» Replies: 1
» Views: 586
|
Bug Where a Straight Segm...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 08:46 PM
» Replies: 1
» Views: 552
|
Having an issue with obi ...
Forum: Obi Rope
Last Post: Ben_bionic
29-08-2025, 04:23 PM
» Replies: 4
» Views: 1,056
|
Non-uniform particle dist...
Forum: Obi Rope
Last Post: chenji
29-08-2025, 09:05 AM
» Replies: 4
» Views: 894
|
|
|
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);
}
}
|
|
|
|