Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extrusion and scale curve issues
#1
Bug 
Just noticed a issue when doing shape extrusion. We want to scale the resulting mesh depending on meta data on each the control point. Our approach was to use the TF of each control point and create a control point in the Multiplier X graph. But everything is slightly offset due to our input spline for the extrusion being a closed spline. If I untick the closed option on the input spline, the Multiplier X graph lines up perfectly. Is there any easy fix for this? Changing between source and self as reference seem to to absolutely nothing in this case.

   

Above is a image showing the issue with the offset due to having a closed spline. I'm assuming the issue stems from the closed spline having a extra segment, not being accounted for in the Multipler X graph.
Reply
#2
Hi

The issue is that the graph's X value is not the TF value of a point, but its relative distance, meaning the distance at that point divided by the length of the spline. The documentation is not clear about this, my bad. Will fix that for the next update.
Also, your message made me realize that displaying the Relative Distance in the CP's inspector would be very helpful. To do so, please go to CurvySplineSegmentEditor.cs, and replace the statement at line 420 with the following:

Code:
EditorGUILayout.HelpBox("Control Point TF: " + Target.TF.ToString() +
                                        "\nControl Point Distance: " + Target.Distance.ToString() +
                                        "\nControl Point Relative Distance: " + (Target.Distance / spline.Length).ToString() +
                                        "\nSegment Length: " + Target.Length.ToString() +
                                        "\nSegment Cache Points: " + Target.CacheSize.ToString() +
                                        "\nSpline Length: " + spline.Length.ToString(), MessageType.Info);

Did this help?
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
Aha, was not expecting it to use a relative-distance system as almost all API stuff reference the TF values.
Added your suggested addition to the help box. Also using the same calculation in out graph-generator and everything now works as expected. Thanks!
Reply
#4
(04-08-2022, 07:16 AM)TurboHans Wrote: Aha, was not expecting it to use a relative-distance system as almost all API stuff reference the TF values.

Curvy Generators don't use TFs but relative distances. I get your confusion, things could have been done better. Will improve the situation little by little through the updates
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Shape extrusion scaling tairoark 5 13 06-07-2022, 05:35 AM
Last Post: _Aka_
Exclamation Fixes for known issues _Aka_ 2 7,587 05-03-2022, 07:14 PM
Last Post: _Aka_
Bug Shape Extrusion does not align with Input Spline Shape bit9labs 1 3 04-08-2022, 12:27 PM
Last Post: _Aka_
  Mesh Deformation vs Mesh extrusion Mambosa 6 20 03-04-2022, 04:43 PM
Last Post: Mambosa

Forum Jump: