Bezier Curve Path Plugin

I made a plugin that lets you create bezier paths of any degree. Let me know what you think (suggestions and criticisms). [strike]The only quirk I know of so far is that the parts aren’t connected flushly, which is evident on sharp corners. Not entirely sure how to fix that yet.[/strike] ← Edit: That quirk has been resolved with a “Gap Fill” option.

Link to plugin: http://www.roblox.com/BezierPath-Under-Development-item?id=232918839

EDIT 2:
The plugin has optional use of wedges now (as opposed to using rectangular segments), which will avoid any overlapping parts and also avoid any gaps. It also unions easier. Only downside is that it uses more parts. Credit for Stravant’s PolyFill module which is used internally to fill in the triangular points (why write code that someone else already wrote very well?). Therefore the video below is now a bit outdated. Also, I released the Bezier module that I use for the plugin, which can be found here:
http://www.roblox.com/item.aspx?id=236384347&rbxp=308165

Here’s a video demo:

8 Likes

It would be cool if you can add a border option for the path, other than that nice. :imagine:

Loving it.

External Media

This would definitely be really neat for creating race tracks :stuck_out_tongue:

Trying to get corners mathematically perfect for each part individually is tricky, especially when using this many parts!

Suggestion (I don’t know how difficult this would be to implement): How about adding an option for generating it from wedges instead of blocks? or an alternating pattern of block → wedge for example. The only reason I suggest this is that you then don’t have any overlapping and therefore it’s easy to apply textures to enhance the look of the path, if you do it with blocks the textures overlap.

Haven’t taken a look at it, but how does this work mathematically? Do you just combine cubic and quadratic curves to get a curve with more points or did you actually implement higher-order curves?

He uses a generic algorithm to solve for every order by using geometric construction (1+2^(n-1) lines, interpolated from 0 to 1)

^

This would make making rollercoaster stuff so much easier. :woohoo:

It should be fairly simple to overide his current path segments with actual models that are positioned the same as the path parts are.

I pushed a new feature that allows “Gap Fills” for the paths. Right now it’s just a single-brick solution that fits nicely. Of course, I want to minimize Z-fighting, so I’m working on changing that to 2 wedge pieces instead. I don’t think it will be too difficult, but I’m not very good with that stuff. Will update once the wedge solution is pushed as well.

Update: Now uses wedges

[quote] I made a plugin that lets you create bezier paths of any degree. Let me know what you think (suggestions and criticisms). [strike]The only quirk I know of so far is that the parts aren’t connected flushly, which is evident on sharp corners. Not entirely sure how to fix that yet.[/strike] ← That quirk has been resolved with a “Gap Fill” option.

Link to plugin: http://www.roblox.com/BezierPath-Under-Development-item?id=232918839

Here’s a video demo:
https://youtu.be/u9gSjh8rjMc?list=UUWwi752JNTUKZo_Nv55Uskg [/quote]

The plugin works pretty well.
I used the Bezier module in the plugin to make this:

[quote] The plugin works pretty well.
I used the Bezier module in the plugin to make this:
-Video- [/quote]

That’s awesome! BTW, if it helps, I released my Bezier module as well that the plugin uses internally. That’ll allow you to just get the raw points on the curve given the control points:
http://www.roblox.com/item.aspx?id=236384347&rbxp=308165