Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Generating a path from selected point to the beginning of spline on a closed spline?
#1
Question 
Hi,

I would like to be able to create a very controlled mesh extrusion path along a closed spline. As an example creating a starting area from first control point to 5th, some custom path from 8th to 12th. Until this point everything works fine with the generator. But I can't seem to figure out how to generate something from a selected start point until the beginning of the loop to cover the last segment from the last control point to the first.

To break it down further, I can control the input path in any other range but not from the last point of the spline to the beginning of the spline. Is there an option to do this without using an open spline and just placing the last point to the same position as the first one is.

The issue when trying to do this is that when you would try to do this, the end CP would be earlier in the spline than the start point, Namely start point being any point in the spline, and end point being control point 0. And because the End point is earlier in the spline In this situation, it is not allowed.

I was hoping I'd be able to do this by only setting the Start Control point, but currently what this does a shift for the starting position instead of selecting from the starting position to the end of the closed spline, like it would do on a open spline.

I can do something a bit like what I'm trying to do by Setting the start point close to the end and then manually shortening the length to cover the segment from the end to the beginning, but this is not an ideal solution as It would need to be readjusted whenever the spline changes.

Any help is greatly appreciated.
Reply
#2
Hi
What about using the Range parameter in the Shape Extrusion module? Does it fit your needs?
https://curvyeditor.com/documentation/generator/modules/shapeextrusion#range
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
(10-28-2021, 04:51 PM)_Aka_ Wrote: Hi
What about using the Range parameter in the Shape Extrusion module? Does it fit your needs?
https://curvyeditor.com/documentation/generator/modules/shapeextrusion#range

No, but I was able to achieve the targeted result by changing the source code for the input spline module to accept a lower end point and changing the calculations to take that case into account. So I'm now able to create a Mesh for example from point 15 to 4.

The range variable was not applicable because the Spline could not be clamped for the end/beginning of the loop, so it did not work the same way as it would on an open spline.

Thanks for the response.
Reply
#4
(10-29-2021, 06:53 AM)Zendariel Wrote: The range variable was not applicable because the Spline could not be clamped for the end/beginning of the loop, so it did not work the same way as it would on an open spline.
If I am not misunderstanding, you could have two Shape Extrusion modules both with ranges, one from say 0.8 to 1, the other from say 0 to 0.3.
Even though your modified module fits properly your needs, without having to have two Shape Extrusion modules, please let me know if what I suggested is an alternative solution to your issue.
Thanks a lot, and 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
#5
(10-29-2021, 12:18 PM)_Aka_ Wrote:
(10-29-2021, 06:53 AM)Zendariel Wrote: The range variable was not applicable because the Spline could not be clamped for the end/beginning of the loop, so it did not work the same way as it would on an open spline.

If I am not misunderstanding, you could have two Shape Extrusion modules both with ranges, one from say 0.8 to 1, the other from say 0 to 0.3.

Even though your modified module fits properly your needs, without having to have two Shape Extrusion modules, please let me know if what I suggested is an alternative solution to your issue.

Thanks a lot, and have a nice day



It is pretty close, but if you use the range, and you then make changes outside of that area those changes will affect how the range variable works. So while I can cover the area that way, Any change that affects the length of the spline also affects where the extrusion using range variable starts and that causes a need for manual re-adjustment. And when using the range on a closed spline it works a bit differently when there is no end point determined at least in the current version. Range is a single number determining the starting point and length determines how far it will go.


The exact issue was that I could not set both a start and an end point that would be tied to a stationary point. When the length of the spline changed at any part, I'd have to manually fix any generators that use the range variable to cover until the last segment. So if i wanted to cover the last 100 meters of a kilometer track, I'd have set the range to 0.9 and length to 0.1, but if the Track was changed to be 1.3 kilometers in length, I would now have a a mesh that started 30 meters earlier than I wanted and be 30 meters longer.


It is a decent workaround, but if you have for example 5 different generators for different kind of objects starting from different points but ending at the end of the loop, you would have to change each of those manually every time the spline length changes.



I could also do it with one extrusion on a closed spline by setting the Range to 0.8 and Length to 0.5 in this case, but it would also need to be readjusted every time the length of the spline changes.



Or on a closed spline I could also choose the starting point as a the last point and adjust the length which would give me one point that does not move, being a bit better option. But again, any changes to the rest of the spline would cause a need to manually readjust every generator that uses the range in this way.



Thank you very much for the advice, it was helpful and I understand the range and length variables on closed splines a bit better now, even if it did not quite cover the need I had.

Nice day to you too.
Reply
#6
Thank you for taking the time to explain to me.
If you think the change you did on Input Spline module or any other change would make sense as part of a future version of Curvy Splines, feel free to send me said change and I will consider including it in the official release.

If and when you feel like it, please leave a review for the asset, that helps a lot
Thanks again, and 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


Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  GO can't fit end of the spline GameDeveloperek4123 3 13 03-04-2024, 11:06 AM
Last Post: _Aka_
  Generating GO only on CPs in Generator GameDeveloperek4123 1 6 03-04-2024, 11:06 AM
Last Post: _Aka_
  Avoiding runtime GC allocations on control point position change Ell223 8 18 02-24-2024, 10:43 AM
Last Post: _Aka_

Forum Jump: