The Smooth Spline Tool: pros and cons

JonMyrlennBailey

Well-known member
One may have a track running close to a river or a road: various spline items close together. Have you noticed your track ballast looks rugged along the edges and you want to iron it out to look nice? You want to grade or even out the ground under splines?

The Smooth Spline tool works for that but it might screw up nearby river banks making them look like somebody cut a zig-zag pattern in a cloth with a pair of pinking shears or screw up the shoulder or road bed of a nearby highway.

It has a shockwave effect. Smooth Spline "telegraphs" changes in ground topology for quite a distance away from the item intended for applying the edit making the selected spline look nice but messing up the looks of other nearby splines. Smooth Spline can also uproot spline telegraph poles running near the track making them suspended above ground because this tool removed some ground from the nearby steep hill or rock face the poles were planted in.

For some reason certain Surveyor tools which affect the shape or relief of the ground can't stay very close to the selected place on your map you are working on or where your mouse points to apply the edits. The Topo and Paint tools work in similar fashion often spreading out elevation changes or texture changes beyond the dotted circle with not-nice-looking consequences.

Trainz sorely lacks the ability to shape the ground (with surgical precision) under and around spines nicely all over.
 
Last edited:
The "Smooth Spline" tool has no adjustment, it applies a 20m swath of terrain on both sides of the track, no matter what ... You must fine tune adjust each and every spline point all manually by hand (tugging up/down on the terrain height tool, sensitivity on min, radius on min) (or apply the terrain up, terrain down button.

To fix these terrain cliff drop offs, I hold "Shift", and apply hundreds of short sections of track, every 20m apart (looks like medical stitch's) then apply the smooth spline tool to each stitch of track.

I would safely say that I have fine tuned @ 1,000,000 spline points, all by hand, to get the desired effect on hillside cuts, fills, and river channels (you can also re-dig the river channels using track laid 20m distant the intended riverbank).

And, NO, there is no automatic, automated, feature ... and there never will be !
 
Last edited:
Tanx, cascade:

I am much too lazy to do all that "hand stitching".

I will have to decide between slightly-crappy track ballast or totally FU'ed river banks or highways nearby (within 20m as TUME built many of them in Avery-Drexel).
 
Last edited:
With that route, I don't know why you just didn't leave it alone, and just take out the catenary, then all the terrain would still be perfect as the original was.
 
There is nothing worse than track that floats! I've ended up replacing the flat-bottomed track with some that have a deeper ballast. There are numerous tracks available on the DLS which are suitable.

With the deeper ballast, smoothing the terrain underneath doesn't pull away from the track, but instead manages to keep the track and ground together so the track doesn't float. I have found that using the smooth grade tool is useful in those places where there are a lot of tracks at the same grade, such as in a yard or junction, however, in those places that are tight, such as river valleys, cities where there are embankments, and other tight quarters, it's best not to use that tool. In cities and other tight places where the grade separate between two different tracks, I use retaining walls.

There are hundreds of retaining walls on the DLS and many built-in. For those I use under track, I have changed the top surface to a ballast. I simply cloned the retaining wall I want, and change the grass or dirt texture for the ballast of my choice.

In addition to retaining walls there are some tracks already on walls and embankments. Some of these are quite old and have the old brown flat track. I have updated these by replacing the track, by substituting the bridge track in the asset, and by updating the ballast to match, I have used these tracks with great success as well.
 
That's because Trainz uses a grid system to form geometry. You can't have a perfect circle raised, ever. I'm not sure if the floating track issue has been fixed in TANE.

On another note, please stop creating so many threads. A bump into your profile shows that you've created 112 new threads in 1-and-half months.
 
For some reason certain Surveyor tools which affect the shape or relief of the ground can't stay very close to the selected place on your map you are working on or where your mouse points to apply the edits. The Topo and Paint tools work in similar fashion often spreading out elevation changes or texture changes beyond the dotted circle with not-nice-looking consequences.

This is because Trainz terrain uses a grid system. Terrain can only be raised or lowered at the intersection of the grid lines.

Easy way to see this in action.

Start a new, blank route. Go to Topology and change the Radius and Sensitivity to their lowest values. Now select the Height Up button. Center the circle directly over the intersection of two YELLOW grid lines and click the left mouse button. The terrain rises at that intersection. Center the circle over the intersection of two GRAY grid lines. Notice the ground won't move.

Routes default to a baseboards using the 10m grid (YELLOW lines). An entire existing baseboard can be changed to a 5m grid (GRAY lines) and when adding new baseboards you can select 10m or 5m grids.

In your blank route, change it to 5m by doing this:
Place cursor over Add Ground button and Right Click.
Choose "5m grid"
Place cursor anywhere on the baseboard and Left Click.
You get a warning that this can't be undone. Click the checkmark and the change is done.

Now repeat the Height Up procedure, noting that you can now raise/lower terrain at the intersection of the GRAY lines, including where a GRAY line meets a YELLOW line.

You can switch a baseboard back to 10m using the same procedure.

A 5m grid allows for much finer terrain control at the expense of a larger file size for the route. I use the 5m grid on the baseboards that contain track and 10m grids for those that are in the background (i.e. - no tracks) where fine terrain control isn't needed.

The grid system also means that using the Smooth Spline tool on tracks that run exactly North-South or East-West (i.e. - along the grid lines) results in smooth embankments. Using that tool on track placed at any other angles results in the "jagged edges" of the raised terrain.

Back in your blank route, place some track parallel to the grid lines and some at an angle. Raise the track up 5 or 10m and use Smooth Spline. Try this with both 5m and 10m grid options to see the difference.

Ground Textures are also affected by the grid. Go to Paint, select a texture. Adjust Radius to its smallest setting. Notice that the texture is only applied at the intersection of the YELLOW lines (if the baseboard is 10m) or GRAY lines (if baseboard is 5m). Notice the jagged nature of the textures, especially when using a small Radius - this is why textures don't have a sharp, clearly defined edge but seem to fade into adjacent textures.

Your welcome.

Todd
 
As a 10m grid has 4 points, and a 5m grid has 9 points, for your PC and Trainz to remember ... a 5m grid route can have over 2 times more grid points to remember.

Is there any detrimental effect on framerates, from changing to the smaller 5m grid (besides the fact that it can't be undone) ?

A 10,000 baseboard route in 10m grid, with @ 14,800,000 grid points ... as opposed the the same route in 5m grid will be 30,000,000 grid points for Trainz to remember
 
I have not tried this but I was reading how changing your route from 10m to 5m could really mess up your topology. No idea what it does to framerates etc but I would hate to have to go over the map again sorting out the terrain. Probably something to consider when you start a new route and not change your mind half way through. This brings to mind a question then.. What would be the result of trying to merge a 10m route to a 5m route and visa versa ???


Doug
 
Is there any detrimental effect on framerates, from changing to the smaller 5m grid (besides the fact that it can't be undone) ?

Not that I've noticed and actually it can be undone the same way but this time select 10m grid. Can't be undone just refers to the fact that the undo button doesn't undo it.
 
I have not tried this but I was reading how changing your route from 10m to 5m could really mess up your topology. No idea what it does to framerates etc but I would hate to have to go over the map again sorting out the terrain. Probably something to consider when you start a new route and not change your mind half way through. This brings to mind a question then.. What would be the result of trying to merge a 10m route to a 5m route and visa versa ???
Doug
It doesn't mess up the topology as such however it messes up the ground texturing in that you will get the cross hatch effect as any swirling of textures gets undone and has to be redone.

Joining 5m to 10m is ok in flat areas may get a few strange gaps in hilly areas.
 
Thanks for that Malc. It answers a few things for others with regard to their route questions I am sure. Sorting out the texture cross-hatch is a bind but not the end of the world. We we were always being told it was best to insert a blank base on a merge to help smooth the "transition" between the old and the new. This will probably help too with a 5m and 10m route merge.

Doug
 
I have found too that if a route is converted after the fact from 10m to 5m grid, the textures end up blocky and can almost never be fixed. I ended up scrapping a good section of a route because of this. By good section, I mean one that I really liked and was done well and was ruined when I changed resolution.

Yup the butting of two meshes types can get a bit weird with blue cracks appearing along the edges that can never be covered up unless they are flat.

John
 
The 5m or 10m grid is really IMO, a decision you need to make before starting the route or at least before adding any ground textures.
 
There is nothing worse than track that floats!

There's actually a way around it:
Step 1: raise the track .2 meters above the ground.
Step 2: use the 'Smooth Spline' tool.
Step 3: drop the track back down .2 meters.
Now the track won't float above the ground.

EDIT: If you're able to, I highly recommend using the 5 meter grid. The reason why is because of two dig holes: 'Dighole_1x1', <KUID2:38408:28009:2>, and 'Tunnel Dig Hole', <KUID2:69518:1999:2> (this is an update of a built-in dig hole with another name). Unlike all the other dig holes available, which uses the yellow lines on the grid as the edges of the hole, these two dig holes are offset, resulting in them using the grey lines on the grid as the edges of the hole. Using these two dig holes and the other dig holes allow you to make irregular shaped holes, which can be helpful when making tunnels like those on the Mojave Sub route included in Trainz 12 and Avery-Drexel included in T:ANE and TS2010.
 
Last edited:
There's an even better way ... Don't nit pick with a fine tooth comb, (for nits are way too small to see, buy Ridex) ... Don't look at the track, look at the actual Twain, and elevate you trackside camera's a meter or two, looking a tad down on the train
 
Last edited:
There's actually a way around it:
Step 1: raise the track .2 meters above the ground.
Step 2: use the 'Smooth Spline' tool.
Step 3: drop the track back down .2 meters.
Now the track won't float above the ground.

EDIT: If you're able to, I highly recommend using the 5 meter grid. The reason why is because of two dig holes: 'Dighole_1x1', <KUID2:38408:28009:2>, and 'Tunnel Dig Hole', <KUID2:69518:1999:2> (this is an update of a built-in dig hole with another name). Unlike all the other dig holes available, which uses the yellow lines on the grid as the edges of the hole, these two dig holes are offset, resulting in them using the grey lines on the grid as the edges of the hole. Using these two dig holes and the other dig holes allow you to make irregular shaped holes, which can be helpful when making tunnels like those on the Mojave Sub route included in Trainz 12 and Avery-Drexel included in T:ANE and TS2010.

Yup done that... Long time ago. :D

An alternative is to add the following track parameters or modify the existing ones to this:

adjust-height-to-ground-threshold "-0.01"
adjust-height-to-ground-offset "0"adjust-height-to-ground-offset

These create an extending mesh which prevents the ballast from floating in the air. The problem though is the steep side off the tracks which doesn't quite look right, but it's good in those places where the track would float otherwise and besides, it's a lot easier than adjusting each and every track spline. :D

Thanks for the tip on the dig holes. Tunnels are still a pain, but using free portals and a tunnel spline makes the chore a lot easier. :)
 
Back
Top