tySplineMesher orientation from knots
#1
Hey Tyson, I encounter twisting issues when trying to use the "from knots" orientation option of the tySplineMesher (Mesh or Tube mode, same problem)
I can't figure out how to get the spline cross sections aligned to the particles orientation.
Looks like it relies only on the z/up axis, x/forward and y/right have no effect. Is that normal?
  Reply
#2
Hi Geoff, in "from knots" mode...the forward vector of the matrix comes from the knots, the up vector is the tangent of the spline at that knot, and the right vector is the cross product of the two. Once the vector is formed it is also made orthogonal so that the forward vector is ensured to be 90 degrees from the other vectors.

The Spline Paths operator itself has an "orientation" setting that allows you to set which axis of a particle's transform will be used as that forward vector in the knot. From there you can basically customize the orientation of each knot cross section however you wish.
  Reply
#3
(11-21-2019, 11:29 PM)tyFlow Wrote: Hi Geoff, in "from knots" mode...the forward vector of the matrix comes from the knots, the up vector is the tangent of the spline at that knot, and the right vector is the cross product of the two. Once the vector is formed it is also made orthogonal so that the forward vector is ensured to be 90 degrees from the other vectors.

The Spline Paths operator itself has an "orientation" setting that allows you to set which axis of a particle's transform will be used as that forward vector in the knot. From there you can basically customize the orientation of each knot cross section however you wish.

Im not sure to understand...maybe my question was not so clear... It can be difficult to express myself in a foreign language sometimes ? I’m French don’t blame me! Wink
What I want is to control and insure the cross sections of generated splines (tySplines+tySplinemesher) to match the particles orientation over time so I can maintain consistency of section rotations or face/point distances of neighbor splines (or branch connections) or let say just keep the uvs in place with other attached splines. Imagine I want to control the twist along the spline like in loft objects with the curve editor but with particles or Imagine I have a tree generated using tySplines and want it to get collided, bended, or what ever I can do with particle bindings or PhysX bindings, but I want to use displacement maps and don’t want to feel like the branches can slide over their parent branches because of twisting cross section occurring during dynamic behaviors... do you mean the orientation option in the spline path operator is intend to generate correct spline sections TM?
Because I tried all the possible matrix and axis order but I’m still not able to control the exact (and I mean all axis) spline meshes cross section orientation, or at least the sections twist angle..
  Reply
#4
Yes, that's what I mean. The Spline Paths operator will pass down the particle transform axis to the tySpline object. The tySpline object will then pass that data down to the tySplineMesher modifier when in "from knots" mode. From there, the data passed down from the flow will be used to construct the cross sections.

That doesn't mean it won't be tricky to get the right TM for the job....you can try a Rotation operator in your flow, aligning particles to their sibling or target depending on your setup, then choosing an appropriate forward vector to keep orientations consistent, etc....this is all flow-dependent....you haven't shared any info about your flow so I can't help beyond giving you general advice. If you haven't actually aligned any of your particles properly, then you won't get good tySplineMesher results.

Here's an example scene showing spline knots aligned to particles, particles aligned to each other, and the particles rotating which, in turn, affects the spline mesh. Notice the flipping that occurs in "from spline" or "from world" modes, whereas "from knots" mode maintains perfect correspondence to particle orientations.


Attached Files
.max   splineOrientation.max (Size: 704 KB / Downloads: 311)
  Reply
#5
I set the particles orientation matrix using both current particle and its parent up vectors so I can cross prod with the plane made of this two vectors. Then no problem on the particle orientation side...(btw, I didn’t compare with the align option of your SCA implementation, maybe it’s the same)
So, as I understand the orientation option is intend to set the « normal » vector I mean the vector perpendicular to spline tangent.. ok! I was a bit confused though! Wink thank you very much Tyson!
  Reply


Forum Jump: