Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple Splines and Generators Performantly for Road System
#1
Hello!

My use case is roads and multiple style of roads, this is procedural generation system

Right now I have a generator and am referencing the InputSplinePath and setting the spline in code at runtime: 
Code:
public InputSplinePath inputSplinePath;
    void Start(){
        var spline = CurvySpline.Create();
        spline.Add(.....); // Vector3 Positions to add roads
        inputSplinePath.Spline = spline;
    }

Now I want to generate breaks / no roads regions. Is there an optimal / performant way to do this?

If I want the road to be between say the origin and point (100,0,100).
With a empty spot at specific points. How do I generate these breaks. (no road will be generated).
For example I want a break / no road between (40,0,40) and (60,0,60). 
Do I need to generate a multiple splines & generators?
How do I do this dynamically in code? (the break will not always be at the same spot)

Another question mentioned generating the spline path with code and calling the input Spline Path
Is this the most performant way to do this?
Is there a way for a generator to support a list of InputSplinePaths?
Reply


Messages In This Thread
Multiple Splines and Generators Performantly for Road System - by drock - 07-16-2023, 03:38 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with procedural roads and splines ramiroflores 1 4 05-07-2024, 08:57 AM
Last Post: _Aka_
Information New free asset: Converter For Unity Splines _Aka_ 5 19 04-25-2024, 11:11 AM
Last Post: _Aka_
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 3 11 04-02-2024, 02:24 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_

Forum Jump: