Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Graphical twist on rope
#1
Hi,

is it possible to remove the twist on the rope that is caused by movement upstream? I understand that the rope component doesn't store and calculate twist like rods do. So twist is naturally following the consecutive angles of the particles.

It should be possible in each particle iteration seek to blend the twist toward an upward direction, right? Any advice on where to look?

Here's a gif of the effect. Now when I tried to record it it only did so weakly, but it can look very jittery if the rope jitters a lot upstream.
https://drive.google.com/file/d/1BUROTTK...drive_link

Thanks in advance!
Reply
#2
(10-11-2025, 11:21 PM)goosejordan Wrote: Hi,

is it possible to remove the twist on the rope that is caused by movement upstream? I understand that the rope component doesn't store and calculate twist like rods do. So twist is naturally following the consecutive angles of the particles.

Hi!

Unfortunately rope twist cannot be controlled at all.

(10-11-2025, 11:21 PM)goosejordan Wrote: It should be possible in each particle iteration seek to blend the twist toward an upward direction, right? Any advice on where to look?

During simulation, rope particles have no twist - in fact, they don't have an orientation at all, it's just positions in space. During rendering, parallel transport is used to determine the smallest change in orientation that points from one particle to the next. This is implemented in BurstPathSmootherRenderSystem.cs/ComputePathSmootherRenderSystem.cs.

Taking the Burst one as example: in ParallelTransportJob, particle data goes in and a list of BurstPathFrame structs comes out. Each BurstPathFrame is initialized using its Reset() method, which sets orthonormal normal, tangent and bitangent vectors. You may be able to force a specific initial orientation by choosing vectors aligned with a desired orientation.

kind regards
Reply
#3
(11-11-2025, 08:07 AM)josemendez Wrote: Hi!

Unfortunately rope twist cannot be controlled at all.


During simulation, rope particles have no twist - in fact, they don't have an orientation at all, it's just positions in space. During rendering, parallel transport is used to determine the smallest change in orientation that points from one particle to the next. This is implemented in BurstPathSmootherRenderSystem.cs/ComputePathSmootherRenderSystem.cs.

Taking the Burst one as example: in ParallelTransportJob, particle data goes in and a list of BurstPathFrame structs comes out. Each BurstPathFrame is initialized using its Reset() method, which sets orthonormal normal, tangent and bitangent vectors. You may be able to force a specific initial orientation by choosing vectors aligned with a desired orientation.

kind regards

Thanks, it worked Sonrisa

I updated transport with the following bias upward. I understand with will break the twist effect if one would for instance make a telephone cable, but it works for my case, the rope looks much more stable now.
Code:
public void Transport(in BurstPathFrame frame, float twist)
{
    // Calculate delta rotation:
    quaternion rotQ = Quaternion.FromToRotation(tangent, frame.tangent);
    quaternion twistQ = quaternion.AxisAngle(frame.tangent, math.radians(twist));
    quaternion finalQ = math.mul(twistQ, rotQ);

    // Rotate previous frame axes to obtain the new ones:
    normal = math.mul(finalQ, normal);
    //binormal = math.mul(finalQ, binormal); //Calculated later with cross product
    tangent = frame.tangent;
    position = frame.position;
    thickness = frame.thickness;
    color = frame.color;
   
    // --- Binormal Up-Bias (only affects twist) ---
    const float upBiasStrength = 0.2f;
    float3 up = new float3(0,1,0);

    normal += up * upBiasStrength;
    normal = math.normalize(normal - math.project(normal, tangent));
    binormal = math.cross(normal, tangent);
}
Reply