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
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 0 0 6 hours ago
Last Post: ShiroeYamamoto
Bug Issues when working with in-place prefabs Sacryn 4 6 02-27-2024, 04:08 PM
Last Post: _Aka_
Question Generator Canvas workflow issues Sacryn 1 7 02-02-2024, 11:22 PM
Last Post: _Aka_
Lightbulb issues with the shader in URP sukhov 4 8 11-22-2023, 12:52 PM
Last Post: _Aka_

Forum Jump: