Train-Sim.Com
MSTS Route Design

Editing Terrain with Photoshop

Notice to all visitors and members of the Train-Sim.Com message forums:
If you plan on using a signature banner in your posts, we would like to remind you that there is a maximum size for banners. That maximum is 450 pixels wide by 120 pixels high, and not to exceed 25k. Your compliance is appreciated. FORUM RULES Problems? There are two common reasons for problems with logging in and posting messages. The first is that you are running a firewall that prevents your messages from being sent to the server. The other is that you have cookies disabled; the DCForum software requires cookies to work properly.

Archived thread - Read only
Previous Topic | Next Topic

Printer-friendly copy Email this topic to a friend

Reading Topic #8356

Charter Member · 502 posts

Here I go again. Another post of useless information. For those of you fool hardy enough to read through this mess, I wanted to share a few things I have discovered with you. I am not claiming that this is a tool of any great value, just information. I know there are some on this forum that already are aware of all of this. They have chosen not to share it with the rest of us, or perhaps they have and I just missed it. That often happens with my pea brain. In that case, just ignore this and move on. All of my assumptions are probably not correct, but I’ll throw them out there to maybe give you something to think about.
Anyway, I was just messing around in the tiles folder for my white void experimental route and the idea hit me that Photoshop had an option in the file menu to open files with the .raw extension. I knew that the .t and the y.raw files contained all the terrain elevation information, so I took a chance and opened a y.raw tile file with Photoshop. After experimenting a little bit I learned the following: the y.raw tile file consists of a 256 x 256 pixel grid of 16 bit grayscale values. Actually it appears that this is a numerical value corresponding to the elevation data that just happens to be a grayscale picture when viewed graphically. Looks just like the grayscale mode of Microdem when you look at a tile that has had DEM data applied to it! In the editor, when you set a maximum and minimum elevation, you see it calculate a scale factor. When you multiply that scale factor against the value of a pixel in the y.raw file you get the actual value of the height of that point of terrain. So in Photoshop, maximum white corresponds to maximum height, and black corresponds to minimum height. Shades of gray in between are steps of elevation. You can use the Photoshop tools and color selection to “draw” new height information.
Some of the problems with using this as a useful tool are: Knowing which tile you need to edit. After the editing you must select the tile in RE and change the max-min height and save to get the change to register correctly, just like in the first versions of dealing with demex.
One potential use of this could be to “draw” stream beds with the pencil tool instead of using track sections within the Route Editor. As it said, the hardest part is figuring out which tiles to edit. Studying the tile names in the RGE gives a clue to the way they are named and is a place to start. Demex also provides the name of the tile your cursor is over. In Photoshop, the top of the tile is North.
If you want to give this a try, select and open a tile that ends with y.raw with Photoshop. It will attempt to guess the format of the graphic. You may need to help it the first time by making sure that the size is 256 by 256, Channel count is set to 1, Depth is set to 16 bits, Byte order is set to IBM PC, and 0 header bytes. I am using Photoshop 6.0 and I don’t recommend that you use your favorite route to play around with.
The following are some photos showing the results of playing with a single tile in Photoshop.
Larry

Attachments
Editing Terrain with Photoshop – image 1
http://www.train-sim.com/dcforum/User_files/3e3b5ea82e9aabc1.jpg
Editing Terrain with Photoshop – image 2
http://www.train-sim.com/dcforum/User_files/3e3b5ede2f3234b5.jpg
Editing Terrain with Photoshop – image 3
http://www.train-sim.com/dcforum/User_files/3e3b5f052fc5db0c.jpg
Editing Terrain with Photoshop – image 4
http://www.train-sim.com/dcforum/User_files/3e3b5f2630aa1b1f.jpg
Editing Terrain with Photoshop – image 5
http://www.train-sim.com/dcforum/User_files/3e3b5f4431069ded.jpg

Printer-friendly page | Top

Editing Terrain with Photoshop [View All], lfriddle, 00:50 AM, Feb-01-03, (0) RE: Editing Terrain with Photoshop, Coonskin, Feb-01-03, 03:39 AM, (1) RE: Editing Terrain with Photoshop, MarkMyers, Feb-01-03, 05:26 AM, (2) RE: Editing Terrain with Photoshop, JohnCS, Feb-01-03, 07:09 AM, (3) RE: Editing Terrain with Photoshop, landnrailroader, Feb-01-03, 09:31 AM, (4) RE: Editing Terrain with Photoshop, dispatcher618, Feb-02-03, 02:09 AM, (6) RE: Editing Terrain with Photoshop, lfriddle, Feb-01-03, 12:53 PM, (5) RE: Editing Terrain with Photoshop, rpicardi1, Feb-02-03, 08:57 AM, (7)

Conferences | Topics | Previous Topic | Next Topic

Member since Aug-1-02 · 3200 posts

RE: Editing Terrain with Photoshop

Not bad for a pea brain.So, if I'm understanding you correctly, one could create terrain by using shades of gray.Interesting.Andre Andre MingVisit VSC's temporary web page at: http://www.vscalecreations.comVisit VSC's Forum at: http://www.3DTrains.comEditing Terrain with Photoshop – image 6

Printer-friendly page | Top

Member since Jun-26-02 · 377 posts

RE: Editing Terrain with Photoshop

Click to send message via ICQ

Editing Terrain with Photoshop – image 7

LAST EDITED ON Feb-01-03 AT 05:28 AM (EDT)

hmmm....Bryce 5 uses the same type of scheme in their terrain object editor. I will have to experiment and see if I can get photoshop to export to bryce (should be able to do this by saving the .raw file as a bitmap), and get bryce to do the 3d terrain editing, and export back into photoshop, and then reconvert back to the .raw format and see if the results match. Just a little food for though from a mind that feeds too much on mental cotton candy Editing Terrain with Photoshop – image 8

A Crowded Elevator Smells Different to a Midget.

Printer-friendly page | Top

Charter Member · 799 posts

RE: Editing Terrain with Photoshop

Very interesting Larry!One of the first things anyone did with the raw files was load them in photoshop (see http://www.train-sim.com/cgi/dcforum/dcboard.cgi?az=show_thread&om=263&forum=DCForumID6)but I don't believe its ever been noted that photoshop can directly handle a 16bit greyscale bitmap (Paint shop pro can't). I certainly didn't know that (didn't have photoshop, though that may have to change now!).Thanks!JohnCS

Editing Terrain with Photoshop – image 9
http://www.digital-rails.com

Printer-friendly page | Top

Charter Member · 1432 posts

RE: Editing Terrain with Photoshop

I have Photoshop 4.0 LE, which was reasonably priced when it was available a few years back. Full blown photoshop is in the range of $500, and you can buy a better PC for that. I don't know if LE will handle this, but I do use it to edit the pix. that I post.J. H. Sullivan

Printer-friendly page | Top

Charter Member · 189 posts

RE: Editing Terrain with Photoshop

Editing Terrain with Photoshop – image 10

Guys, don't forget to take advantage of being a student if you can. An educational license for Photoshop runs about half as much as the full retail license. ($250-$300) There's no difference in the program.Just remember that you shouldn't be making money off of it. Another few things-- I don't know if it'll work in 16-bit mode, but try quick and easy random terrain with the clouds filter (set your foreground and background colors to black and white, or different shades of gray.)- Scan your own mug in 16-bit grayscale and drive trains over it. Build a bridge over your gaping mouth. Use your imagination...- My experience with Bryce tells me you should be able to save any flattened photoshop file as something like a TIF, BMP, PIC/PCT, or something along those lines, but I don't know if Bryce can read 16 bit grayscale files. Converting it to 8-bit is obviously going to alter your terrain. - dispatcher618

- DISPATCHER 618

Printer-friendly page | Top

Charter Member · 502 posts

RE: Editing Terrain with Photoshop

Thanks for the link John. I didn't get MSTS until August 01 so wasn't on the forum yet. I did a complete search for any information on RAW files before posting and that never came up. I have such hit and miss luck when doing forum searches that I can't rely on it to keep me from repeating something. It is now printed and "in the book".
Just points out a need for a depository of known information.
Larry

Printer-friendly page | Top

Charter Member · 1371 posts

RE: Editing Terrain with Photoshop

You can do something similar with Vistapro and export their DEM database to grey scale picture for editing in a paint program. Grey scale value = terrain height. Would be a pain to do a route - there are far better ways - but that opens up possibilities for custon terrain tweaking.SRV Ron

Printer-friendly page | Top


[ Home | MSTS Forum | MSTS FAQ | How To... | File Library ] Copyright © 2004 by Nels Anderson. All Rights Reserved.

Restored from the Train-Sim.Com archive, captured June 28, 2004. About this archive.