Can I make shapes that snap together?

The MSTS 1 Route Editor can be a beast to use, but it's capable of some amazing results, here you can talk with the wizards that are building some of the fantastic routes available and learn how to make your own.

Moderator: Moderators

Locked
User avatar
GSX1400
Been on the forums for a while
Posts: 207
Joined: Tue Dec 18, 2007 5:52 pm

Can I make shapes that snap together?

Post by GSX1400 »

I'm not sure if this should be here or in the Scenery forum, apologies if I have got it wrong.

The Kenet and Avon canal spends a lot of its time annoyingly close to my route so I was wondering if there is a way in which I can make shapes that snap together like track and road sections do to help me put the canal down rather than having to make some straight and curved shapes and place thema nd line them up manually.
Regards Tim

Restarted the GWR Devizes Branch Line project!
User avatar
jbilton
Very Active Forum Member
Posts: 19267
Joined: Fri Oct 10, 2003 12:08 pm
Location: At home ..waiting to go to Work.
Contact:

Re: Can I make shapes that snap together?

Post by jbilton »

Hi
Earlier this year, Don was looking at similar

http://forums.uktrainsim.com/viewtopic. ... &p=1041730

Cheers
Jon
------------------------Supporting whats good in the British community------------------------
Image
User avatar
GSX1400
Been on the forums for a while
Posts: 207
Joined: Tue Dec 18, 2007 5:52 pm

Re: Can I make shapes that snap together?

Post by GSX1400 »

The answer is as yet alluding me so i think I will make some sections of a similar format to road sections, a lock, a bridge and so on and hopefully if I find out how to get the sections to snap together like roads and track do I can build that in.

It can wait as I have yet to finish putting roads and bridges down before getting on to interactives.
Regards Tim

Restarted the GWR Devizes Branch Line project!
User avatar
NicolaFan06
Well Established Forum Member
Posts: 845
Joined: Thu Jul 27, 2006 9:02 pm

Re: Can I make shapes that snap together?

Post by NicolaFan06 »

You'll need to get id numbers allocated in the tsection.dat file and lay them as roads or track if you want them to snap together in RE, this is the same way that the magnetic platform kits work. Best way to actually generate the shapes accurately is probably with the paid version of DynaTrax if you want to get the joins to appear exact easily.
User avatar
GSX1400
Been on the forums for a while
Posts: 207
Joined: Tue Dec 18, 2007 5:52 pm

Re: Can I make shapes that snap together?

Post by GSX1400 »

Thanks for that. I'll concentrate on the shapes and if I'm good enough we'll see what happens.
Regards Tim

Restarted the GWR Devizes Branch Line project!
dkightley
Very Active Forum Member
Posts: 9802
Joined: Sat May 08, 2004 8:52 pm

Re: Can I make shapes that snap together?

Post by dkightley »

How about this as a possible way to get platform pieces snapping together....

Locate some road sections that haven't been used, and won't be used in your route so you can "borrow" the names. Then make two sets of platform shapes, one with the real names, and exact copies each one named exactly the same name as one of the "borrowed" names. You'll then be able to lay the platform pieces as if they were roads.

Once you've finished the route, do a text search in each of the world files for the "borrowed" names...and change them for the real names.

I've not tried this....but it sounds as if it might work!
User avatar
NicolaFan06
Well Established Forum Member
Posts: 845
Joined: Thu Jul 27, 2006 9:02 pm

Re: Can I make shapes that snap together?

Post by NicolaFan06 »

In theory Doug, what you've suggested should work with no problems whatsoever, and it's pretty close to the method the track conversion process we did on the District line used to upgrade the track shapes without breaking any paths or the tdb, definite good idea. The only caveat to watch out for, is that you'll have to make the canal shapes match the radius/angle of the road pieces you replace exactly, otherwise they'll snap together at weird angles rather than the intended ones.

As I'm currently in the process of assembling the LUL track, I'd be more than happy to answer any questions you have on comprehending the tsection.dat you might have as well, since I know it gave me something of a headache the first time I tried to use it to look up info!
User avatar
drjimi
Well Established Forum Member
Posts: 637
Joined: Fri Aug 30, 2002 10:48 pm
Location: New Hampshire, USA

Re: Can I make shapes that snap together?

Post by drjimi »

There's a much easier way to get shapes to snap together. I had a similar need for the miles of line-side cables on the LU District route.
Make the shape so the origin is at one end. Edit the S file so the volume is fixed and the shape doesn't disappear. Now - the trick - edit the SD file and add the line "ESD_Snapable ()" (without quotes) after the current lines in the file. The shape will now snap into place if you use the 'X' key (it's an on/off toggle each time you hit 'X').

So to use this, place the first part. Now place the 2nd part close to the end of the 1st part. Hit X. Move the 2nd part closer to the end of the first part (where you want the join) and it will snap together. You can still adjust its direction when 'snapped' and the join will hold. When happy, hit 'X' again and de-select the 2nd part. Wash, rinse, repeat.

Yell if this isn't clear and I'll try to explain better. It does work nicely and ensures adjacent parts look joined.

EDIT: Further thought. I realize a 'canal section' shape is much wider than (say) a fence or cable run, so when/if adjacent parts are rotated to follow a direction change (if needed) you'd see a gap in one side. It would be possible to set the origin slightly 'in' from the end, such that when they 'snap' there's a slight overlap. Not sure if you were planning on making straights and multiple radius/length curves to they all snapped like track does, or if you'd be slightly adjusting the path of straights.

Best, Jimi
User avatar
GSX1400
Been on the forums for a while
Posts: 207
Joined: Tue Dec 18, 2007 5:52 pm

Re: Can I make shapes that snap together?

Post by GSX1400 »

Jimi,
This sounds very hopeful and many thanks indeed.
drjimi wrote: Make the shape so the origin is at one end. Edit the S file so the volume is fixed and the shape doesn't disappear.
I'm not near my own PC at the moment but an extract from one of my .S files I do have has. .
volumes ( 1
vol_sphere (
vector ( 94.414206 0.615999 -10.713984 ) 98.141442
)
)
Is this what you are saying I need to edit and if so, what do I change?

I am thinking of doing road style (lengths, radius and turns) sections so in theory they should all connect without gaps due to turns. . . .in theory anyway :D
Regards
Tim
Regards Tim

Restarted the GWR Devizes Branch Line project!
User avatar
steamnut44
Very Active Forum Member
Posts: 2548
Joined: Sun Dec 07, 2003 3:04 pm
Location: Tamworth, on the WCML & somewhere on the SCP Route

Re: Can I make shapes that snap together?

Post by steamnut44 »

I am surprised that no one has come up with the idea of making canal sections for MSTS, that can be laid just like track or roads. I think if America had canal systems like we have in Britain, maybe someone over there may have done some.
It's worth thinking about, for anyone capable of doing them. :roll: :roll: :roll:

Geoff
Owner of The First Steam Powered Computer by James Watt
Creator of The Blackpool Illuminations for The Blackpool Tram Route
Joint Author of the SCOTTISH CENTRAL PLUS ROUTE
Presently TAKING A BREAK!
User avatar
drjimi
Well Established Forum Member
Posts: 637
Joined: Fri Aug 30, 2002 10:48 pm
Location: New Hampshire, USA

Re: Can I make shapes that snap together?

Post by drjimi »

Hi Tim,

sorry for the late reply - New England had a major ice storm Thursday night, killing power to most of the area (downed power lines, etc.) - we just came back on!

re the volume - the rule of thumb I use (learned from others) is the value on the end of the line you show should be about 10% larger than the largest of the three values inside the quotes. So you have 94.41 as your largest value, and 98.14 on the end. If the part does NOT disappear as you view it from various angles (especially near the end of the shape) then all is well. Else adjust the 98.14 (value on the end) up a bit. The part disappearing usually happens if the origin is at an end and the part is "thin". You should be OK I feel.

If you're planning on doing sections as you note, then the origin at the end (or a hair in from the end so you have a slight overlap) should work well adn leave no visible gaps.

Best, Jimi
dkightley
Very Active Forum Member
Posts: 9802
Joined: Sat May 08, 2004 8:52 pm

Re: Can I make shapes that snap together?

Post by dkightley »

Jimi

Thanks for describing the technique...

I'm glad to report that it works extremely well. :lol: :lol:
User avatar
drjimi
Well Established Forum Member
Posts: 637
Joined: Fri Aug 30, 2002 10:48 pm
Location: New Hampshire, USA

Re: Can I make shapes that snap together?

Post by drjimi »

Great to hear that Doug! I've been using it for fencing and cable runs for a while, and am now doing the same for some walls. I wish I could recall who told me the idea many years ago so I could give credit. Examining some of the MSTS-provided route fences gave me the final info needed (i.e. the SD line addition). Not a well-documented feature, but useful once you figure "how" :)

Best, Jimi
User avatar
GSX1400
Been on the forums for a while
Posts: 207
Joined: Tue Dec 18, 2007 5:52 pm

Re: Can I make shapes that snap together?

Post by GSX1400 »

That's good news indeed. :)

I'll just have to remember this post when U get round to doing it.

Thanks guys this is a great help :D
Regards Tim

Restarted the GWR Devizes Branch Line project!
User avatar
ARG706
Well Established Forum Member
Posts: 523
Joined: Mon Dec 25, 2006 7:16 am
Contact:

Re: Can I make shapes that snap together?

Post by ARG706 »

drjimi wrote:There's a much easier way to get shapes to snap together. I had a similar need for the miles of line-side cables on the LU District route.
Make the shape so the origin is at one end. Edit the S file so the volume is fixed and the shape doesn't disappear. Now - the trick - edit the SD file and add the line "ESD_Snapable ()" (without quotes) after the current lines in the file. The shape will now snap into place if you use the 'X' key (it's an on/off toggle each time you hit 'X').

So to use this, place the first part. Now place the 2nd part close to the end of the 1st part. Hit X. Move the 2nd part closer to the end of the first part (where you want the join) and it will snap together. You can still adjust its direction when 'snapped' and the join will hold. When happy, hit 'X' again and de-select the 2nd part. Wash, rinse, repeat.

Yell if this isn't clear and I'll try to explain better. It does work nicely and ensures adjacent parts look joined.

EDIT: Further thought. I realize a 'canal section' shape is much wider than (say) a fence or cable run, so when/if adjacent parts are rotated to follow a direction change (if needed) you'd see a gap in one side. It would be possible to set the origin slightly 'in' from the end, such that when they 'snap' there's a slight overlap. Not sure if you were planning on making straights and multiple radius/length curves to they all snapped like track does, or if you'd be slightly adjusting the path of straights.

Best, Jimi
Thanks for disclosing this method. If only I knew about this when placing the many vineyards in the Barossa . This is groundbreaking, and I will certainly put this technique to good use!
Locked

Return to “[MSTS1] Route Building”