Question regarding splines

SHOPlanB

New member
Hi all,

I have a question about splines. The question is this. Is each "section" of a spline considered a spline?

Example : Tree spline XXX has a start, a middle and an end ( A,B,C). Is this considered 1 spline or is it considered 2 (A-B,B-C)?

Thanks in advance.
 
Splines come in two basic flavors - 1 part and 3 part.
The only real difference is with a 3 part spline:
1. The length of he two end parts must be the same length as each other but can be a different length from the center part.
2. They do not have to look like the center part or each other (tho they almost always do except one is rotated 180 degrees from the other).

Personally I wouldn't consider each part of a 3 part spline as a separate spline because the two ends do not repeat - only the center part repeats. Splines are strange beasties, lol.

Ben
 
Last edited:
Splines come in two basic flavors - 1 part and 3 part.
The only real difference is with a 3 part spline:
1. The length of he two end parts must be the same length as each other but can be a different length from the center part.
2. They do not have to look like the center part or each other (tho they almost always do except one is rotated 180 degrees from the other).

Personally I wouldn't consider each part of a 3 part spline as a separate spline because the two ends do not repeat - only the center part repeats. Splines are strange beasties, lol.

Ben


Ben, first off, thanks for your fantastic contributions to the DLC. I've used a LOT of them and am a fan.

Now, regarding the splines, I got a bit confused with what you wrote. So if I used 1 particular tree spline, say going left to right with 3 spline points, that's considered 1 spline or is that a 3 part?

For that matter, do spline points even matter in a spline aside from movement points?
 
My User Manual describes splines as, ‘... generally long thin objects such as roads, power lines, fences and rows of trees. They consist of two or more “spline points” denoted by white circles. These spline points can be placed any distance apart and the spline object is then “stretched” between the spline points as you place them on the route’.

What’s always confused me a bit is where the Objects-Add Spline flyout has a 'Delete spline' button. However, it doesn’t delete the whole spline, only the section between two spline points (which would be a whole spline if it has just two points). I guess the button should really be tagged ‘Delete spline section’ to completely avoid confusion.

With regard to the usefulness of spline points, they do have a use in addition to being able to move them sideways or up/down.

The image within the spline will have a maximum point at which it stretches before adding another repeat section. If you insert and position the spline points at different spacings for scenery splines such as trees or fence posts it will give a different look to each section, either compressing or stretching the image.

That’s very useful for breaking up the repetitive pattern with scenery assets, although it will make bridge arches look odd.

The same technique is also used to make adjustments to splines like telegraph poles, where one or more might sit in the wrong place (like straight through a building) if not adjusted.

Cheers
Casper
:)
 
Last edited:
While we're on the subject of splines...why do they eat up frame rates? It's often suggested to use fewer of them in order to maximize performance. I've never been sure why though, unless they're car generators, why should, say, a row of unmoving trees eat up resources?

Thanks!
 
Re spline impact on performance (my experiment)

I cannot explain the technical details but I have experimented with splines/no splines and I can see the difference. Here is what my experiment involved:

1. A single rail line through a simple rural landscape, no splines in sight.
2. Now place orchard splines (one or two rows only) on one side of the track, grassland on the other.
3. Ran a loco with a few cars.
4. Run FRAPS.
5. In driver, rotate so the train is seen from the side with the orchard splines in the background.
6. Then rotate so the train has the grassland in the background.
7. The orchard splines view reduce FPS by around 40FPS.
8. But in my test going from 100+ FPS to 60+ FPS in a rural environment is something I can live with. In an urban environment, excessive use of splines is much more problematic. But due to hardware your experience may vary.
 
Last edited:
I cannot explain the technical details but I have experimented with splines/no splines and I can see the difference. Here is what my experiment involved:

1. A single rail line through a simple rural landscape, no splines in sight.
2. Now place orchard splines (one or two rows only) on one side of the track, grassland on the other.
3. Ran a loco with a few cars.
4. Run FRAPS.
5. In driver, rotate so the train is seen from the side with the orchard splines in the background.
6. Then rotate so the train has the grassland in the background.
7. The orchard splines view reduce FPS by around 40FPS.
8. But in my test going from 100+ FPS to 60+ FPS in a rural environment is something I can live with. In an urban environment, excessive use of splines is much more problematic. But due to hardware your experience may vary.


Good Lord man! How are you getting 100 FPS?! =o I know I'm running everything at max with a resolution of 1680 X 1050 and I get around 40-50. I did read that a high index count can be a culprit on hammering the system in terms of FPS, but I haven't a clue on what's considered "high". Oh, I probably should add I'm running fraps also, but an old build.
 
Here is what my experiment involved:
That was not a usefull or meaningful test. All you were doing was saying that a spline of trees uses more resources than no spline of trees.

What really needs to be tested, for example, is a group of trees vs an identical spline of trees. Then you might learn if one uses more resources. I have heard it said, but never by anyone from N3V that I can recall, that splines use more resources, but no one has ever said why that is the case. I tend to think that this is one of those Trainz urban legends like "track direction" that has little basis in fact. Maybe it is time to bring in the Mythbusters.
 
One thing I have noticed, though this isn't spline-related, is that on a rural landscape with hills and static object trees, the frame rate lags more when I'm looking down along the line of travel as opposed to from the side. Maybe it's that it has to work harder to produce the perspective effects than a simpler left-to-right motion?

Sorry if this is getting a little off topic from the original question - I don't want to hijack the thread! But since we're talking about splines, it seemed germane.
 
With no facts to support it, one possible cause of a performance hit is because splines are dynamic objects. That is, each point along the spline has to be calculated on the fly as the end points are moved whereas non-spline objects are all fixed in their dimensions.
 
And the model needs to be scaled / stretched to fit between the points and skewed around curves; unlike a static model which is rendered as-is.
 
Could it be too that the spline objects use alpha channels, or as I should say, many are developed with alpha-blended graphics like the old flipboard trees. With this the CPU then has to give in and do a lot of muscle work that has been mostly handed over the much faster GPU when it comes to the new way of rendering stand-alone mesh objects.

I did notice a performance hit when I included some really old fence models. These dated back to the earlier days of Trainz, so I'm wondering too if this is because of the alpha-blending issue, and perhaps lack of LOD.

John
 
Some spline objects have fairly high poly meshes - once repeated a few hundred times this can really eat up resources.

I suspect Pencil42 has hit the nail on the head as far as spline vs fixed object for the same number of polys.

For creating splines, the answer is to go with stitched mesh splines, which progressively reduce the level of detail as the spline recedes into the distance.

Paul
 
I think I best butt out of this discussion as I've never dane anything with a tree spline so don't really know what your talking about.

Sorry to have thrown confusion into the ranks,

Ben
 
I think I best butt out of this discussion as I've never dane anything with a tree spline so don't really know what your talking about.

Sorry to have thrown confusion into the ranks,

Ben


You're not missing much, Ben. Tree splines are theoretically a nice idea, but really do look terrible because they get transparent even in the older versions of Trainz.

John
 
One thing I have noticed, though this isn't spline-related, is that on a rural landscape with hills and static object trees, the frame rate lags more when I'm looking down along the line of travel as opposed to from the side. Maybe it's that it has to work harder to produce the perspective effects than a simpler left-to-right motion?

Sorry if this is getting a little off topic from the original question - I don't want to hijack the thread! But since we're talking about splines, it seemed germane.

No hijacking sighted here! Knowledge is power! And the more information brought to us with questions will make us much better route makers! Heck, this is why I love this community! No flaming, just courteous conversation amongst fellow enthusiasts! NC, I've noticed this myself. I wiped out EVERY spline on my route thinking that'd help, but the difference was barely noticable in terms of FPS. I'm at my wits end at what could be causing the scene load to be at 90% at some views, but at 10% at others (same scene selection (for lack of a better term). I like to think I have a decent system, so I'm just befuddled by why certain items just hammer the heck out of my system.
 
This is probably a 'way out' idea but you could try looking at your route in 'wireframe' mode. It is possible that you may have something hidden below ground level.

Peter
 
Also consider what might be within the draw distance on the, other side of the Hill or Mountain you might not be able to see it but the jet engine can.
 
Also consider what might be within the draw distance on the, other side of the Hill or Mountain you might not be able to see it but the jet engine can.

My emphasis in red.

You can see it.

When in wireframe mode press Alt W. That will toggle you into alternative wireframe mode when you will see through hills and mountains. You can open and adjust the performance setting in this view and see exactly what effect changing the slider bars has on assets, splines etc.

There are also some other advantages to this view, e.g. fine tuning of the topolgy. This is particularly useful when cleaning up the intrusions which spike into items like road splines, because you can see all of the hinge points where the terrain deforms (you get the diagonals across each grid square).
 
Last edited:
Unfortunately, I can not seem to enable the alternate wireframe in TS2010 using the Alt + W keystroke. :( It could be that TS2010 has it but it is accessed by a different keystroke, but who knows?

Regards,

Retro.
 
Back
Top