Aggror's devlog #3: Road splines
In a previous developer blog I showed how I use spline paths inside the Leadwerks editor. The cool thing about splines as that they are extremely multipurpose. I started working on generating meshes based on the splines. Think about ropes, wires, rivers, rollercoasters and of course roads
Ropes and wires are in progress because I find them the coolest. Especially rope bridges are awesome to make and see in play. They require a lot of finetuning so I have put that on halt for now. In the meantime I also started working on road nodes. The Return to the Zone project uses terrain textures, but the original scene from Leadwerks 2.3 used the in-editor road tool. Time for some new roadfeatures.
Roads
The generic nature of the splines allows easy creation of meshes based on the spline. Constructing basic geometry was relatively easy. However, getting the road to appear on the terrain properly proved a little harder. When there is no terrain, the generation of the road is instantaneous. The roads that are created snap perfectly together and it is really satifying to see the result. Per node you can't only tweak the road with the spline handlers, but you can set a road width, a material and several terrain alignment options.
When the node has to deal with terrain allignment the performance on startup is little slow at the moment, but the first results look promising. I want to add this feature to my winter game "On the road again", which makes cool random tracks from CSG brushes.
Another cool automatic feauture is that the road still functions as a path spline. You can attach a car to the road spline and it will follow the generated road.
Ropes and wires
For a next video I will show the progress on the ropes and wires, with hopefully some working physics. Here is an older image based on the earlier splines to give you an idea on what I am going for:
- 8
8 Comments
Recommended Comments