Splineworx is a Unity extension to create complex meshes based on spline systems within the editor. You can also use it to place objects along splines and mix both approaches.
First thoughts
For our upcoming project we need to create hundreds of kilometers roads, fences, power lines and so on.
So basically one of our core questions during shaping out the ideas was: ‘Do we want yet another road tool?’ And the answer was: ‘Yes and No’.
We wanted a tool able to do roads, bridges, crossings, cloverleafs, on/off ramps, powerlines, railtracks, fences, hedges, rows of buildings, you name it, in one consistent system with all the neccessary options to combine them.
After doing some extensive research we had the following major points on our list:
- Remove all restrictions and break the system down to one point: Bezier splines.
- Give the user the full control what mesh the system shall create and even if a mesh is needed
- Save all created systems into external data to reuse and modify at every place needed inside the project or in other projects
- Combine generated meshdata with prefabs like e-towers or simple guardposts aside the road
Some serious headaches later Splineworx was born or better said it is still in the phase of birth.
Core features
- terrain independent but interacting with terrain if needed
- bezier splines
- spline parts hold spline connection
- spline connections can split. Therefore you can have more than 1 or 2 connections controlled by one marker
- each connection controls subsplines
- each subspline can be numerically altered between two connections to change x distance to main connection (usefull for road markings, transitions between different e-towers eg)
- each subspline has 4 layers
- each layer can hold up to three different profiles (start, tiling, end)
- each profile is created in external modelling tools and stores uv and mesh data
- mesh generation generates up to 4 meshes per spline part (one for each layer)
- each mesh creates one material index per different profile type
Additional Features
- each connection can alter the terrain with specific width, smooth width and fixed heights to create soil walls if needed
- meshdata can be used like any other mesh inside Unity
- core library of complete XML files fore some common constructions (will be massively updated in the near future)
Next steps
We currently call it Beta. It is allmost full featured but still has some weaknesses and bugs and in some cases you can shoot your own foot and lose the whole leg. After fixing those issues it needs to be documented.
The future
Splineworx is part of our suite of tools we are developing to create large scaled simulations including paged terrain system, traffic and AI, traffic rules, vehicular physics and so on but will also work stand alone and of course for other stuff than only roads.
Splineworx itself will be developed further since we need it for more than just one product and most likely some very cool feedback from the community will help making it better and better over time.
Also content updates will follow like more complete xml files and corresponding profiles and more signs.
First Shot without the splines
Part of the intersection
Edit January 22 2015
Its been a while since the last update on the progress. Important things first: Splineworx will be more feature rich on start, then originally planned, but it will delay a bit. We’ve been busy extensively using and testing it for our own project and some great things are coming down the road.
- Since it is very complex we add more XML files to the release than planned. Therefore you can get first results very quickly and take your time to learn about how it works.
- Some changes under the hood for the upcoming AI
- Convenience was a bit of a problem with the first internal versions. Now you can copy and paste connections, expand your current XML data by appending other xml files making the the creation of presets more flexible and usefull. You can also pre set materials for all profiles now making it easier to check your results and work faster. Just to name a few
- Terrain altering has been massively improved including four times more options to be as flexible as you are with the splines itself.
- Whilst overhauling the terrain related functionality another feature has been added allowing you to create *.png files splatting your road in white on black background. This is extremely helpfull when working with Terrain Composer.
After splatting out a mask of the road some altered copies of it have been saved and used to force Terrain Composer to add smaller vegetation and foliage near the roads without creating them on the road.
The Roadhouse will be part of the example files. Its not done yet but all the road stuff on this screenshot has been made with the help of Splineworx showing its flexibility. The main advantages of this approach instead of creating it in your 3d app are:
After creating one roadhouse you can reuse it and make it fit your surrounding roads without even leaving Unity Editor and of course you have all the paths you need for AI, Pathfinding etc.
A lot of splines…But not done yet.
Going into Detail including barred areas following your road