Are your DEM gradients wooping you ... Take back control !

I lay a circular curve, and it usually has 1, or 2, or more, controlling mid spline points inside the curve ... Then I usually just place 2 more spline points back down the straight tracks @ 40m, then delete the original straight spline points, which in essence slides the straight spline points back @ 40m ... this makes a curve easement (sort of)

Can you recommend any software or techniques for laying curve easements which are more precise than 'sort of'? Im looking at CADrail at the moment, but its a little expensive for what I want to use it for. Ideally something that has an interface at least as sophisticated as TransDEM - so that I can create the layout over the top of GE imagery or similar.
 
"Sort of" easements are close enough for Trainz, so that the train does nor appear to go directly into a sharp curve

I watched Reading & Northern video, and the curve easements were very broad, and the straight to curve transitions were not even noticeable ... Good enough, is good enough ... You will not be graded on your inconsistencies

If you want it broader ... place the curve easement spline point on the straight tracks @ 100m back, then delete the original spline point

An actual easement is a very complex french curve ... not worth fretting over ... I don't pet the sweaty things ... I mean, I don't sweat the petty things :hehe:

http://forums.auran.com/trainz/showthread.php?90049-Gradient-Problem&p=999035#post999035

https://www.google.com/search?q=cur...UICCgB&biw=1139&bih=581#imgrc=yNpOAMvvEgpePM:
 
Last edited:
Very good reading, cheers for the links!

BTW: Leonhard Euler was Swiss, not French. And its not 'that' complex.
 
Last edited:
It started life as a toy train sim, which evolved into what it is today. Unfortunately the tools to implement precise calculation of curve elements as per the prototype didn't. I would be content with a feature that allowed you to specify a set radius laying a spline. However as the developer I believe has noted in another thread, TANE updates are now confined to bugfixes and feature requests are not being taken.

Bear in mind too that such complex tools might overwhelm the casual route builder who just wants an approximation of their favourite railway section and to thrash some trains over it.
 
It started life as a toy train sim, which evolved into what it is today. Unfortunately the tools to implement precise calculation of curve elements as per the prototype didn't. I would be content with a feature that allowed you to specify a set radius laying a spline. However as the developer I believe has noted in another thread, TANE updates are now confined to bugfixes and feature requests are not being taken.

Bear in mind too that such complex tools might overwhelm the casual route builder who just wants an approximation of their favourite railway section and to thrash some trains over it.

Well in fairness such complex tools can be external tools. Really TransDEM is nearly complex enough for what Im looking for, its just its track elaboration that I find a little wanting - with regards curvature.
 
To an extent this is how 12d and most road and rail design programs work in the real world. Designing a centreline using VIP's and HIP's choosing curves between each, if you're getting to this kind of detail in trainz I think its probably time you looked into becoming a Civil Designer like I did! Might as well get paid for it lol. If you guys are super keen I can get the calcs and formula to work out the transitions for spiral curves and superelevation
 
All of this really isn't that necessary. Seriously.

If you are using a DEM with a topographic map and follow your route carefully while laying the tracks, you will find that the track curves right along the ROW without needing too much tweaking. What I do is, since I use T:ANE, is zoom out quite far from the surface - enough to see the map clearly, and lay the track along the route. When there is a curve, I start the curve where it appears on the map and then place a spline point on the apex and another at the opposite end. When I continue to lay track, the spline bends and fits pretty much spot on the overlaid ROW. It's more difficult to explain than it is to do.
 
Less interested in formulae, more interested in how I can get it into Surveyor without loads of hassle. I can google how to calculate a spiral curve, and there are plenty of results with instruction and examples (Im not averse to you providing more, if you are so inclined). Im just not having any luck googling how to get such curves into surveyor, and as the editor does not have a text entry field for placement of spline points, its not something I can realistically do by hand.
 
Less interested in formulae, more interested in how I can get it into Surveyor without loads of hassle. I can google how to calculate a spiral curve, and there are plenty of results with instruction and examples (Im not averse to you providing more, if you are so inclined). Im just not having any luck googling how to get such curves into surveyor, and as the editor does not have a text entry field for placement of spline points, its not something I can realistically do by hand.

There is no need to use text entry for spline points. Click and drag for placing, and then click on the advanced options panel and add additional spline points where needed.

To set your super elevation and track quality, click on the properties or "?" to bring up an additional panel to set these values. I was going to provide a link for super elevation values that have been worked out for our use, but I can't remember where I saw it and searching these forums is rather a disgusting process.

To get your maps into Surveyor, you need TransDEM to create the Trainz route out of the DEM and topographic map or images.
 
Wasnt really looking for "just eyeball it" for how to do it. Cheers anyway.


I know what you are looking for but unfortunately it isn't available at that level so eyeballing it is the best you can do. There are templates for curves and track spacing available if you want to try those. I can't remember the asset creators that did create them, but there's a substantial number.

Automating this process, however, is no longer available. I say no longer because at one time a user was able to create routes using a CAD program. This was possible way back in the earlier Trainz days I think through TRS2004 or TRS2006. After that period, however, the track file (.TRK) changed format and what worked before no longer works. This actually affected a number of nifty utilities which among them would allow you to print out your route if you wanted. That was called TrainzMap. It worked barely in TS2009 and had some quick updates, but fails to work in TS12 and up. The CAD program in the early days was a proprietary system written by the user, but it was heading in a direction which would have been useful.

It's interesting that this issue came up again after 10 years. Gone but not forgotten I suppose. With this in mind, you may want to post your idea into the Suggestion Boxcar. What that will do is allow further discussion on your idea of using an external program to lay track accurately. If there is strong interest in this ability, the issue is brought up to the developers for possible future add-ons or capabilities with the program. There have been quite a number of things that have made it into what we have today with more to come.

In addition to the above, N3V has been working on releasing what is known as the Trainz Native Interface to allow access to the code from external sources. This area is still a WIP since it was placed on the back burner while they work on the hot fixes and service packs for T:ANE.

John
 
The fact TransDEM is able to export spline points into Trainz would suggest that despite the format not being the same as years past, it is still possible to create track fitting such curves, with appropriate (automated) placement of spline points. Its simply that TransDEM does not have a sophisticated enough editor to define spline points as existing on specific curves.
 
The fact TransDEM is able to export spline points into Trainz would suggest that despite the format not being the same as years past, it is still possible to create track fitting such curves, with appropriate (automated) placement of spline points. Its simply that TransDEM does not have a sophisticated enough editor to define spline points as existing on specific curves.

That I don't know. It would be nice if that is possible and the code has to be written.

I recommend posting this suggestion in the Suggestion Boxcar forum. The post won't appear immediately because it has to be approved by a moderator, but it will show up within an hour. Once it's there, people will be more apt to look at it and comment. The Development group also looks through there as well and we've even pointed out stuff to them via the Trainz Dev forum, which you can read but can't access.
 
Well, Ive just made such a post, only to see Im not the first, either: http://forums.auran.com/trainz/showthread.php?132045-Suggestion-for-improved-track-laying-tools

I guess its not going to be approved on account of being a duplicate thread.

Not necessarily because posts in there get duplicated often with the same subject.

There's also another user... look for his name. ModelerMJ. He's working on an interesting route utility and might be able to make use of your idea as well. If this is the case the maybe he'll integrate this ability. His program currently works in testing mode only to view and print routes out as well as bunch of other things.
 
The fact TransDEM is able to export spline points into Trainz would suggest that despite the format not being the same as years past, it is still possible to create track fitting such curves, with appropriate (automated) placement of spline points. Its simply that TransDEM does not have a sophisticated enough editor to define spline points as existing on specific curves.
TransDem can both read and writeout trk files that are compatible with TANE and any other Trainz version from TRS04 on up. It will use the appropriate format version for the target Trainz version you specify. Geophil has kept up with all the changes in the mapfile formats even though Auran/N3V haven't published any info on the mapfile formats since 2006.

Note, WindWalkr - N3V chief programmer - has recently started making some info on the mapfile formats available in the form of grammar definition files that work with a personal program he's developed. Unofficial and not complete but we take what we can get. I might add here that all versions of Trainz will read a correctly formated mapfile (.gnd, .trk, and .obs are the 3 most important ones) written in any previous format version. HOG will always use the .gnd file version introduced about 14 yrs ago, I think with UTC. TANE will read these .gnd files correctly if the files are named correctly. The problem becomes important only if you want to read a file written in a newer version or take advantage of any new features and write them into the file since the older format doesn't support them. Trans DEM doesn't have a problem with any of this.

If you create you own vector data files for TransDEM you can have it follow any curve you want. I do something similar with the tzCad2Trk program - except I'm stuck using TRS06 mapfile formats. I draw out the track plan usually at full scale in a cad program and write out a dxf file containing the vector data. I use straight lines, circular arcs and to some extent cubic spirals to define the track route. My program reads the dxf file or a special CadRail file format and extracts the vector data it needs. By appropriate use of the straighten flag bit in the .trk file you can control curvature to some degree in Trainz. However circular arcs and spiral transition curves are a problem in Trainz.

All railroad curves typically involve 3 parts: 1) a transition curve lead in. 2) a circular arc 3) a transition curve leadout. The problem in Trainz is we can fake the curve so it looks appealing but the actual curvature produced by the Trainz track spline is not correct. A curve with constant curvature (a circular arc) is impossible to create in the game. Likewise a spiral transition curve with the curvature varying linearly from 0 to a fixed value matching a up to a fixed radius circular arc is impossible to achieve. The cubic spline used in Trainz to represent the track spline is just not capable of this. We can only approximate it to some degree. Usually though if the track looks ok trains don't jerk about too violently as they follow the track in Trainz. The change in curvature vs arc length while technically incorrect is still continuous and sufficiently "smooth" in most cases.

In Trainz at places where a fixed radius curve meets another curve with a different fixed radius or a transition spiral with a linearly varying curvature it is not possible to enforce the tangent to the track spline at the point they connect. TransDEM appears to take these curved sections in the vector data and output a series of short length spline sections to avoid this problem. I try to avoid a direct connect of a curve to another of different fixed or varying radius like the plague. If the radius is large enough no transition curve of varying radius is really necessary for looks or other effects in Trainz. If it isn't I might lay in a very short straight section 2m or less in length to enforce the required tangent though I'd prefer a better fix or work around. Since I do this in a cad program accuracy is not an issue. For circular arcs my program automatically divides the arc into segments of 30 degs or less unless a smaller arc length limit governs. These points must be equally spaced around the arc to an accuracy that you can't obtain if done manually in Surveyor. This ensure the curvature variation around the arc stays within tolerable limits.

Anyhow I think the point I'm trying to make is I can take these dxf files (TransDEM supports other formats - dxf isn't necessarily the best for geo referenced data) I create and I can use them in TransDEM to output a track file. I can draw out a track plan in just about any cad program and use straight lines or circular arcs with fixed radius or transition curves of various mathematical formulation or any combinations of these and as long as I can accurately draw the curve and exactly define the location of the vertices I want to include TransDEM will do its best to output a track file that follows the vector data I created with the vertices following that data very accurately.

Bob Pearson
 
Last edited:
Well, that sounds good - but I also need my track plan overlaid on the real world imagery as I am creating it, which poses a problem. To my knowledge no CAD program lets me do this. TransDEM is made to, only its editor thinks solely in terms of straight lines, not arcs.

Do you know of a workflow I can use for several hundred miles of track, to overlay it in CAD over sateĺlite imagery?
 
Nahhh ... That just aint' gonna happen to easily get a program to lay Trainz track for you ... Get used to laying track the good ol' fashioned, taking 6 years of your life, way !
 
Last edited:
Back
Top