Bezier help
-
Hello everyone,
I'm hoping someone can help me out here as it's really beginning to be a pain for me and after hours of googling I cannot find the answer that solves this problem.
I'm using fredo6's bezier plug in to create smooth track sections which works perfectly until track begins to twist.
Here is an example of the track without a twist dropping downwards
As you can see the rails are aligned nicely to the track ties all the way along the track.
I did this by creating a bezier curve straight along both axis til they meet on the blue axis then divide both these lines by 3 and draw the cubic bezier 2/3 along these lines which will create the curve. Then the same process is repeated for the left and right rail giving you the above result.
However when the track twists down the same path the curves pull inwards towards the curve making the rails thinner than the track ties
To solve this I could snap the bezier curve to each tie along the path and itl be perfect as the node number isn't important it can be many but in order to do this I need to see the control handles that are making the curve from tie to tie (as seen in blender in the aligned bezier curve)
This doesn't happen with any bezier plug in I've found so far but without those control handle positions the game cannot import the track.
Does anybody know how I can create accurate bezier curves for the track as it twists showing the handle positions (maybe via a Construction line) so that I can snap fredo6's bezier curve to the track ties and export the bezier data as required by the game)
If anyone can help but need more info please let me know!
Blender example for visual reference (aligned)
-
I did check my plugin, but I can't reconstruct the control points, because I use a direct formula for Cubic Bezier.
It would require significant work to modify the algorithm (patch of Bezier curves).
Why do you need the control points in your game?
Fredo
Advertisement