Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Procedural Connections
#1
Hey there!

I'm using Curvy to generate some roads at runtime. I generate roads in segments by spawning a pre-set-up prefab with the generator, adding control points, then use a CurvyConnection to snap the end of one segment to the start of the next. The issue is that using bezier curves doesn't seem to connect the meshes nicely. If I use TCB curves and manually set the follow-ups (which aren't set automatically for some reason like other curves) it looks a lot better, but still not perfect.

Attached are some screenshots illustrating my settings and the issue I'm seeing.

Here is the code that is generating the connections:
Code:
var firstPoint = trackSpline.Add(currentPosition);
if (previousSegment != null)
{
    var connection = CurvyConnection.Create(previousSegment.trackSpline.LastVisibleControlPoint, firstPoint[0]);
    connection.SetSynchronizationOptions(true, true);
}

Any help is appreciated. Thank you!


Attached Files Thumbnail(s)
           
Reply
#2
Hi,
You need to update the handles of your connected control points. In other words, the direction of CP1.HandleIn should be the same as CP2.HandleOut, and vice versa.
I think this will solved your issue. Please keep me updated.
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
(10-21-2024, 10:23 AM)_Aka_ Wrote: Hi,
You need to update the handles of your connected control points. In other words, the direction of CP1.HandleIn should be the same as CP2.HandleOut, and vice versa.
I think this will solved your issue. Please keep me updated.
Have a nice day.

That helped a lot. There are still small cracks showing if the handles aren't super far from the point, but its something I can hide with clever mesh generation shapes I think!

Thank you!
Reply
#4
You are welcome.
For the remaining small cracks, try with high values of resolution in both the spline's inspector, and the Shape Extrusion module.
If and when you feel like it, please leave a review for the asset, that helps a lot.
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
  Connections doesn't work in split scenes nehvaleem 4 10 05-29-2024, 07:31 AM
Last Post: _Aka_
  Help with procedural roads and splines ramiroflores 1 9 05-07-2024, 08:57 AM
Last Post: _Aka_
  Connections Problem Juton 3 17 03-06-2024, 10:41 AM
Last Post: _Aka_
  Are connections pooled? Lupos 1 4 05-09-2023, 09:18 AM
Last Post: _Aka_

Forum Jump: