[Tool] CurveBuilder

Hello,

today I started to work on a small editor tool called “CurveBuilder”. It probably will be similar to the road tool that epic is developing. I am doing this because I need it right now and I have some special requirements for my game.

At the moment the tool is in its very infancy.

Here are some bullet points:

You will be able to add control points to create a curve.
It has virtually no limits of how many points to can add.
You can manually specify how many points it will generate.
At each point it will spawn a mesh that you can completely control with your own scripts.
You can also customize if you want the generated points to be evenly distributed.
You can rebuild the curve at run time.

And here is the proof of concept.

Once I have figured out how I can make a library module I will upload the source code to Github. I will probably license it under the MIT license which means it will be completely free.

I also started to create some functional constructs on top of Ue4. Here is a small taste of some “functional” programming in c++. I use the following code to generate the curves.


FVector ACurveBuilder::Decasteljau(float t, TArray<FVector> Points)
{
  check(Points.Num() > 0);// rethink the err case, maybe with an optional value?
  if (Points.Num() == 1) return Fun::Head(Points);
  auto TailPoints = Fun::Tail(Points);
  auto LerpV = std::bind(Fun::Interpolate, t, std::placeholders::_1, std::placeholders::_2);
  return Decasteljau(t, Fun::ZipWith<FVector, FVector, FVector>(LerpV, Points, TailPoints));
}

This looks really nice! Good work.