Rolling Line
No hay suficientes valoraciones
Generated Terrain Guide
Por Seraph y 2 colaboradores
This guide will use a terrain generator and a track layout with some vague terrain shapes to import our layout into Rolling Line.

However, I want to be clear: terrain generators are complicated, and the guide below might not match your specific situation. You may find yourself starting on the next step and realize you must redo some of the last step. There are also many ways to do something in a terrain generator, what I’ve done below isn’t the “right” way, just one way.

I’ll be creating a track layout & terrain in Rolling Line, changing it into a heightmap in Blender, processing in World Machine, polishing it up in Blender, and finally exporting to Rolling Line and recreating the track layout. This is not a process that will be easy or simple, but if you’re determined you might find it rewarding.
   
Premio
Favoritos
Favorito
Quitar
Intro
While I don’t wish to endorse any particular terrain generator this guide will be using World Machine 4. You can download the Basic version for free here ( https://www.world-machine.com/download.php ), but it has a resolution limit of 512x512. I’ve also used Instant Terra which has a higher resolution limit but only a 30-day trial. There are a few others, but almost all of them work on a similar node system, so even if you’re not using WM4 you can likely figure out what you need to do with some trial and error.

We will also be using Blender and Photoshop, but everything you can do in Photoshop you should be able to do in Gimp, just Google how.

Huge thanks to KingNathantheIII, who gave his permission for this guide to recreate his Narrow-Gauge Logging Camp layout. If you haven’t already checked it out, you really should - it’s fantastic! I’ll be making only one modification to KingNathantheIII’s layout as I’ll be using the tunnel to create a reverse loop, so to make room for it I’ll also be getting rid of that valley in the middle in favor of more mountain.
https://steamcommunity.com/sharedfiles/filedetails/?id=2350493374

The below flow is intended to work for any layout, however if you have a simple layout without much elevation change check the WM4 Tips & Tricks section for ways you can skip forward to the Terrain Generator step and trick the generator into making room for your track.
Creating Your Track Layout
The first thing we must do is lay out track & vague terrain in Rolling Line, export that, and create a heightmap from it in Blender. Later, we will use this heightmap to generate terrain, then bring back into Blender, and finally back into Rolling Line.

I’ll be loading up KingNathantheIII’s layout and modifying, but if you’re creating from scratch just lay track or terrain as you normally would. I will be using the games “Delete all details/scenery” function and adding back in my terrain shapes. Another option here for already completed layouts is to just delete the details by hand but not the terrain, which is painstaking, but you’ll skip rebuilding the terrain shapes. You can find these buttons in the Manage Save section of the menu.


First, I’m going to make my layout modification, the reverse loop. Then I’m going to remove the huge tailings – this is because we want something normal sized for a track mask. You might be tempted to save this and try to put our generated terrain under it but check the Tips section on Terrain Replacement first before you attempt.


Now we create some terrain. Make sure any track lifted off your table has some track support, and then align that to the general shapes you’d like for the rest of the terrain to take. Don’t worry about colors here at all, this is only for the shapes, we’re tossing this away and replacing it! Because we’re using general shapes, I’m going to be using the smoothed track support as much as possible and I’ll keep my transitions as smooth or sharp as I’d like to see them later – just meaning make a soft hill a soft hill and a sharp cliff a sharp cliff. Some of the smaller angles should be lost in the noise, but the larger shapes will guide our terrain later. We’re not using the actual track for our heightmap (it would show the track itself), so make sure you have support for everything but a bridge or tunnel.

While we don’t need to be perfect as we can smooth our track layout later in Blender, the closer you are to what you really want now means less work later! Trust me when I say small gaps or rough transitions now will look drastic after we generate terrain. Tunnel entrances will look like cliffs for now, as we’ll cut them out later. You also could use the shape pieces instead of the terrain pieces, it really is all up to you.


Before we remove all of our track go to the C:\ drawer and hit “Export Track”. Then remove all your track so we only see terrain.


C:\ drawer again on the third page we’re going to going to “Export all”. As it says, check the file was created in \Steam\steamapps\common\Rolling Line\Modding\export – it should be titled yourlayout_0.obj, and you should see your track object there as well.


Off to Blender to generate a height map & track mask!
Generating Heightmap in Blender
File > Import > Wavefront (.obj) and point to your terrain and then your track in the export folder. Now both should be separate objects, but we’re going to have to do the next 3 steps in unison so the terrain lines up to the track.

Click each once so the outline changes from orange to yellow

Object > Set Origin > Geometry to Origin

If your terrain isn’t centered use the move tool to center it, and make your lowest point is close to Z = 0

Line your track up to the terrain and hide your track for now, let’s export terrain heightmap.

Select your terrain and Right Click and select Shade Flat – we want to see the exact geometry as it’ll show in the generator.

In Edit mode A to select all, Alt+ M > Merge by Distance, no need to turn it up but you can a little. Hopefully it removed nothing, but mine removed a lot. Definitely do this before you subdivide, if you do.

Separate your ‘floor’ level - hit Tab to go into Edit mode, Face Select mode, and I used L to select Linked faces 4 different times because there was 2 tables in 2 parts. Then P to separate into a different object. Obviously your situation will vary, but if you have a floor level (often the table) make sure it’s separate here.

Follow this tutorial up to the point that you save the image file: https://www.youtube.com/watch?v=dUEPieo26nk&ab_channel=Markom3D

Now if you’re like me and you have an odd shaped table/floor – meaning not a square that fills the render area, you’re going to have to take whatever your bottom layer is and scale it up to fill it. Press S and Shift+Z to scale without changing Z, drag it way out. Hit F12 and Save Image when it’s done. I had to temporarily delete my track here to get a clean image.


We’ve got a height map! Next we can unhide our track, triple check it’s lined up then hide the terrain. Run through the tutorial on this object too – add the material.Then we’re going to G Z and raise it up until all of it is white, then F12 and Save Image again. If it's only showing up as gray you need to copy and paste the shader you did from the video on the terrain to your track.


Track Mask! Time for some terrain generation.
Intro to World Machine 4
First, if you have a wide screen monitor you’re probably going to want to change the view to side by side with the 3D view, so click:




If you don’t have the screen size because you’re on a laptop or something, you can just use F5 and F8 to flip between nodes & 3D view or just click up top.

Now you should have nodes on the left and the 3D view on the right, likely showing the default Scene View node that loads. Note that if you click a different node the viewport reflects what that node is doing; in the default example Scene View is putting it all together just for us to view to final product before exporting. The F key will lock the preview to a specific node while you work with other nodes.

Moving around in 3D View: left click rotates, middle mouse button pans, and right click or mouse wheel control zoom.

That should be enough to get you to follow my directions below, and there are a couple tutorials made by the developer https://www.youtube.com/watch?v=PglKkG0Ja8A&feature=emb_title&ab_channel=WorldMachineVideos

But if you really want to know about how each node works I recommend this tutorial series https://www.youtube.com/watch?v=1bR3zkmGLj4&list=PLKhXdgyv6XZ_AF5vyoOtv9GArgS6H1xtw&index=1&ab_channel=HYLK

In general, you need to understand nodes are used to:
1. Generate terrain
2. Modify terrain
3. Colorize terrain
4. Convert or combine terrain or colors in various ways
5. Export

When you want to add a node you can click it up top and then click to place, or hit Tab and start to type in the name and it will pop up, then click to place. Connecting nodes is done with simple click & drag.

One final thing to keep in mind: this process makes elevations in WM4 appear doubled compared to Rolling Line. We’ll fix this in Blender later but keep this in mind when viewing your terrain.
Terrain Generation
I will post the file I create at the end, however you need to understand you’re not going to be able to simply slap your track plan into the file input and have it look like you want. We must use some finesse to get the terrain generator to do what we want, so the below is an example intended to help guide your plan. However, a lot of this process is creating something, going back and tweaking it, creating the next step before even more tweaking to all previous nodes, etc. All something the directions below won’t reflect.

Let’s just modify the default example for now – it’s easy to follow the flow of what’s going on and you already know where Scene View is to check your final product. However, we are going to delete the Advanced Perlin and Curves.

Add File Input, Set.. to your heightmap PNG. Add a Curve on your heightmap to accommodate for distortion – I wanted to flatten out the lower end but bring the higher end back close to normal. Play with it until it closely resembles to what you saw in Rolling Line. Add a Blur and run your heightmap to it, adjust the radius way down. I’m using 10m but you should play with it, it really depends on the scale of your layout.

Add Basic Noise, then Add a Clamp to rescale this to something a bit flatter by lowering the high end slider on the right side.

Add a Combiner, using Average mode is fine, and wire both of our generators above into this. Play with the Strength, I’ve ended up at ~0.45-

Progress! Let’s talk about WHY we’ve done what we did here.

I wanted to Blur our heightmap so our transitions are a little smoother. As you noticed when it’s turned way up we lose our track entirely, so we turn it way down to get a more subtle smoothing.
The Basic Noise is going to give our heightmap look a bit more like realistic terrain. The Clamp is because we don’t want to change our heightmap elevations drastically.

Combiner is a strong tool, go ahead and flip through the different modes other than Average. It can also take a mask input, though the Chooser is more ideal to use a mask input to guide the combination.

If you’ve followed along so far you should have something like this. It’s the general shape we want, you can see where the track goes, but it’s not very realistic yet!


You might be concerned with deformation of the track area, especially the blur slopes the edges off in places. We’re going to flatten this later in Blender, but it won’t likely be table flat even when we place track and that’s ok.

Let’s weather this! Let’s add our track mask via the file input, and if you followed my color scheme we have to Invert it. Then I’m going to add a Thermal Weathering and turn the Talus production way down. Run the track mask through the Talus Removal input.

Next, we can wire this through the Erosion that was in the default scene, or add one if you need. Wire the track mask into the mask input. This is going to take a lot of tweaking. I’ve ended up with lower Duration, higher Rock Hardness, much lower sediment carry amount, and slightly lowered the erosion-time intensifier. Why did I do all this? I just played with it until it was doing what I wanted.

Erosion is such a big deal you might want to go the Quick Texture and pick one of the four textures that fits your goal better. Then hit F on Scene View to lock it, then go back to tweaking Erosion.
The default Quick Texture really only has 4 good options. The Alpine Highland is going to work well for my intentions, but you can also use the Colorizer which has more preset options and is easier to customize but doesn’t take in the erosion wear mask. There are also other options in the Macros > Texturing section of the menu, but you’ll need to look up how to use most of them.

Here’s what I have:

It’s not perfect, in fact it looks quite off in a few places. We are going to have to take the Blender sculpt tools to the mesh where the track areas are looking off so our track will fit.

For export we’re going to remove the default Height Output and add in Mesh Output. Open the Mesh Output node, Write Output to Disk, then repeat with the Bitmap. Note the Mesh Output has a Simple mode if you want fewer verts here, but I’ll be simplifying in Blender. By default, the files show up in \Documents\World Machine Documents\

Done! This seemed simple, but the truth is I tried this a lot of ways before deciding on something so simple. You’re going to have to do a lot of trial and error to get things looking like you want, and likely some Googling of how some of the nodes work. You’ll note a lot of my terrain is mostly flat, but I’ll be cutting that out and back to its original oval shape.

My World Machine file: https://www.dropbox.com/s/ir2jlwadekgeoav/NG%20Logging%20Camp.tmd?dl=0

Heightmap:
https://www.dropbox.com/s/mqory3w6i4vbhb9/Heightmap.png?dl=0

Track Mask:
https://www.dropbox.com/s/9g8o59fex5apg54/Layout%20Mask%20Full.png?dl=0
WM4 Tips & Tricks
Terrain Replacement is theoretically possible, but practically impossible. After running your terrain through the erosion modifier your original track simply won’t line up. In addition, getting the dimensions exactly 1:1 back into Rolling Line seems more challenging than it should be.

Have a relatively simple plan in mind? Check out the Creating Roads example, Tutorial #9 in WM4, and skip all the heightmap stuff.

You could draw rivers in WM4 and use that for a track if you don’t plan on complicated elevation changes.

Microcosmologist used shapes to create ‘shelves’ for his track to go on and combined it with the mountains with left room for the bridges between, resulting in an excellent effect!

Looking to simplify? Find a terrain you like and imagine a layout (without many elevation changes) that works. This is much simpler than imagining a layout first!
Polishing in Blender
Maybe we like what we’ve got, but we aren’t completely in love with it yet. The look is almost there, but some of it looks off, and some of it needs to be modified for track laying.

File > Import > Wavefront (.obj) and point to the mesh we just created.

Select the object, hit N to open the transform panel, change rotation from 90 to 0, and up the scale to 100x100x50. Why so big? If we’re going to do any operations in Blender, like Boolean, it’s just going to be easier for the program to not try to calculate incredibly small decimals.

Apply Scale in the Alt+A menu

Object > Set Origin > Geometry to Origin

I’m going to add my texture, mostly so I can see how my sculpting is affecting the final look but you don’t have to. Go to the Shading tab, make sure the object is selected. In the lower half add Image Texture node, open your texture and connect the node to the BDSF. Note in Blender we can change viewport to Solid (no material), Material Preview, and Rendered (uses light). Add a sun object if you want to use the last one.

From here you might want to review the Importing Generated Terrain guide I’ve created previously (but you can skip the first bit):

https://steamcommunity.com/sharedfiles/filedetails/?id=2342348396

I’m going to do my sculpting before mesh simplification but know that this might harder on PC resources. Do yourself a favor and save a pre-sculpted named snapshot of this file before going back to your main file.


Above is my current status, note I added a sun and am using rendered mode as the shadows can help our brains process the nuances of the terrain a bit. Also, if something goes to a crazy angle you’ll see odd shading.

Open the Sculpting tab and switch to Sculpting Mode. First thing, open that Symmetry menu in the Active Tool panel, and turn it off by click X. We aren’t sculpting a face, that’s not helpful!

We are going to use a lot of the Flatten and Smooth tools, mostly on track areas, but also anything that looks particularly out of place. Be conscious of your Radius and Strength, as you will need to change both to fit your situation. When I Flatten my track area, I’m actually going to use a Strength of 1 – we want it really flat. Since Smooth can cause some distortion I tend to use it fairly low at ~0.2-0.3.

If you need something stronger you can try the Clay Strips tool – notice it can work in Subtract mode as well. I had one section of track (on the left side in the previous shot) that I could just tell it wasn’t going to transition to track without clipping through the track. Pull out some surface with the Subtract, then Flatten it & Smooth a little if you need.

Why is this sculpting step important? It’s actually preventative work. There is a really good chance later when we are laying track, or worse when we’re placing details, that we’ll wish something here was a bit different. In fact, I can almost guarantee you’ll end up having to do this anyways, but if you can switch back and forth less it’s nice to save the time! Fact is, there still is no right way, and if you skip sculpting now in favor of more later, that’s your choice.

Now I’m going to cut my terrain to the oval shape. Add your shape, transform it, add Boolean modifier, Intersect Mode, use the eye dropper to select your shape. Pro tip here, you can add the modifier, hide the shape to check how it looks, then unhide and edit some more, before finally Applying the modifier and deleting the shape.

Next, I’m going to Decimate. Add the Decimate modifier in Collapse mode (the default), I like to use something aggressive around 0.50 or even less – if you want roughly X% of current verts to remain then use 0.X, so 0.5 should reduce roughly 50% of verts. You can also try Planar mode but it is a more complicated calculation which may take longer. On both if you see artifacting change your settings or don’t apply that modifier and find another way to simplify the mesh. You can also try a Limited Dissolve, but I find this uses less intelligence on what faces to combine or vertices to remove and can cause issues.

Follow the other guide to make some sides. I won’t be changing the shape at this point as any modifications will be to the terrain itself.


Export from Blender into Rolling Line. Not sure how? You really need to read the other guide already.
Laying Track
“Seraph, I know way more about laying track than you, what could you tell me?” That’s likely true however laying track for generated terrain is extra difficult as normally we’d cater the terrain to the track, but now that’s not an option. You can try to place track in the classic fashion, but I found it very frustrating.

Below is the easiest way I found to lay my track, as well as some tips to adapt yours.

First, I’d recommend setting up your switches. Flat switches are easy, then after that you should use a small piece of guiding track on your switches on an elevation to try to get the angle right, but in my experience, we’re going to have to sculpt those a bit more afterwards. I’d also recommend setting up any sections you can utilizing any snap angle (anything that lines up on the layout to 90 degrees in Rolling Line) to give you a strong start.

For the rest, use an extremely short piece of straight or curve track at the right elevation and use the “Fill In” piece.

We might want to use a larger tailing so the track is less likely to show a gap when raised off the terrain slightly. But be aware you can’t use this close to the edge of the layout as it will poke out the sides. Later on I pulled a sneaky and covered some transitions from normal to larger tailing with my terrain!

I favored being below terrain than above, as it’s easier to spot:

We’re getting there but how do we fix our issues?

No… not back to Blender again… please no…
Back to Blender again… and again… and again…
Take screenshots of the places where you are getting issues with the terrain clipping through. Here is my most buried switch:

Here I’ve used the Clay Strips tool a lot. Mostly subtraction, but there were a couple places that needed a little addition as well. A lot of Flatten to clean it back up, just a little Smooth where needed.
Then we try again, see below tip on model replacement.

Model replacement: Want to replace your terrain without having to re-place it? The simple solution is to change the model in your Mod, and restart Rolling Line and reload your layout. Note you have to use a new named file - or you have to set the mod to a different model temporarily before restarting, then set to new model and restart again.

In my case I got halfway there on the first pass. So, we do a second pass. And a third if we need. For these later passes you might want to just alt tab from game to Blender.

Note we haven’t talked about tunnels in a while. On these later passes I’m going to focus on lining my terrain up to the tunnel entrance so when I put a prop there the transition is relatively smooth. You also are going to want to double check your clearance.


Before cutting out your tunnels save a copy of your Blender file so if you have to re-cut them you don’t lose your sculpting. Note if you don’t want to cut these out you can use a black piece of shape for the “shadows”, it's not as unrealistic as it sounds.

Carefully orient yourself to your tunnel, and in Layout, Edit, Face Selection and slowly delete faces from this area. It took me four passes to get both of the tunnel entrances correct.


We’re actually done! You can now detail your Layout.
Detailing
Again, I know some of you don't want to read about how to detail so let me summarize:

Listen to the terrain!

Not sure what I mean? Read on.

The terrain generator has it's own concept for what's rocky and what's extra lush. Our goal should be to support what's there! Pay attention to what colors the Colorizer has deemed based on the terrain.

For me this mean my white sections are rocky cliffs and needed a lot of rock work and no grass . I tried to use the grass sparingly on brown areas, especially up high, and laid the grass on thick in the greenest areas, also topping those spots off with a few flowers. On the cliffs I also tried to leave visible most of the erosion lines, as these are places where sediment would settle, between the rocks.

I know some people don't care for the biome brush, due to it's randomness, but that's what makes it perfect for nature props. I have a tendency to try to get an even spread of plants but that's not how nature works, so let your props clump and get sparse where it makes sense!

13 comentarios
BenDragon81037 7 NOV 2024 a las 4:47 p. m. 
Yeah, you use world machine and blender; It takes you out of the environment entirely?
Seraph  [autor] 16 OCT 2024 a las 4:23 p. m. 
No one outsourced anything. I just wanted to do layouts my own way and shared how I did it.
BenDragon81037 16 OCT 2024 a las 3:54 p. m. 
So... Wait.

Instead of including terrain modification tools like Trainz or Workers & Resources: Soviet republic

They outsourced the tools to create terrain to 3rd party applications?
Seraph  [autor] 19 DIC 2022 a las 4:52 p. m. 
Retrospect from Tehachapi: I oversimplified the main terrain too early, before I had to do a lot of sculpting. This leaves some areas with very odd shapes as I was sculpting irregular terrain. Leave the majority of the Decimating to later in the project, to the step before you cut out any tunnels.

Also, I tried to use a separation of 0.7 for my double track to make sculpting easier, but there’s a bit of rail cars clipping each other so next I’ll try 0.8. The slimmer the less sculpting later!

Finally, the compass rose on the ground is contradictory to the in-game’s sun, which I wish I had noticed earlier.
Seraph  [autor] 15 ENE 2022 a las 9:33 a. m. 
Retrospect for Depoe Bay & Sitka Lumber RR: Sculpt the miniature in RL in the first place and cut ‘everything’ out from the middle of that. But make sure you don’t sculpt near the edges after you’ve separated them! Meaning separate your mini as late as possible or mark your seam.
Seraph  [autor] 6 DIC 2021 a las 8:41 a. m. 
You can see all of the props created and ported for these projects on my Workshop: https://steamcommunity.com/id/phoenixseraph/myworkshopfiles/?appid=754150
CirroCellus_likesTornados 5 DIC 2021 a las 6:43 p. m. 
? you have that to wow
CirroCellus_likesTornados 5 DIC 2021 a las 6:43 p. m. 
how did YOU get those trees to look like that
CirroCellus_likesTornados 5 DIC 2021 a las 6:42 p. m. 
i have dell not windows 7+
Seraph  [autor] 25 SEP 2021 a las 10:26 a. m. 
One point I want to make after Pont Du Vecchio - I'm having trouble getting proper "peaks" through the heightmap. In both Pont & Devil's Nose I wish I had created some peaks manually at the very top of the hills.

There are two good ways to do this: sculpting by adding clay strips or one of the other clay additions, or through Blenders Proportional Editing Objects, where you can lift a vertice up and it will affect nearby vertices based on the Falloff you pick - note Random can easily create random low poly terrain, the rest change the hill shape.