• Welcome to SC4 Devotion Forum Archives.

Hiding City Tile Boundaries and Creating Cross Border Composite Images

Started by Battlecat, August 26, 2009, 10:01:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Battlecat

Techniques for Hiding City Tile Boundaries and Creating Cross Border Composite Images

1: Introduction

Greetings everyone.  Due to the response to one of my updates in Adara, I felt I should take the time to write a more detailed tutorial and discussion on detailing the borders of you cities, and how to create composite images between the two. 

Simcity 4 is unique among city builders due to the ability to build a region instead of just a single city.  However, due to some flaws in how those cities are displayed, they exist in a vacuum during gameplay with no really easy way to see what's going on next door. 

This is what we usually see when we start building at the boundary of a city tile. 



Just like in every other version of Simcity right back to the original, the only indication that there is anything beyond this line is the roads and railways crossing the border.  The terrain is also an indicator to some extent, but it doesn't truly have to match, even in this game. 

But as we strive for realism within in our city tiles and across ever expanding regions, we tend to avoid the city borders simply because it can be a pain to work with.  The reality that is often hard to see in the game is more like this:



And given a bit of time and effort, anyone can create shots like this:







My goal here is to provide some guidance and techniques for building and creating shots like the ones above.

2: Setting Up and gathering Materials

First, I'd like to run you through some of the in game tools that are useful for accomplishing what you see above.

1. Photo editing software: Gimp, Photoshop or any other raster based photo editing suite will work for this.  This software will be used to create the final composite images outside of the game. 

2. Neighbour Connection Arrows: There's nothing that ruins a nice intercity shot more than a pair of big floating yellow arrows wherever your roads and rails cross the borders.  Thanks to ebina on the STEX, we don't have to worry about that anymore thanks to the Hidden Neighbor Connection Arrow Mod.

3. Plopable farm fields: These can be used to carry a farm across the boundary quite easily.  Most of the farms in game and mods are available in plopable form in this pack by uroncha.

4. Simple Background: The last thing that needs to be changed is the background.  The default tiled background is nothing but trouble when it comes to creating these composite images.  They are simple images that can be found in you main Simcity 4 folder.  There is a different image for each zoom level.  The changes you need to make here is very similar to setting up a green screen when making a movie.  Just fill each of these images in with a solid color of your choice.  I prefer black, but any color will do the job. 

5. Linear Features: Any sort of park or add on that creates a linear pathway can help tie your city together across the border.  For example, trail parks and bikeways work just fine.  The Rural Renwal Project fences, gravel paths and pasture flora are all useful for farmland as well. 

3: Getting started – Prepping and Counting the First Tile

Here's the boundary I'm going to work with.  I just threw this city together for this tutorial.   


It's not the prettiest place I've ever made, but for the purpose of this discussion, it's not necessary.  Here are some typical shots of the area:

The urban area and a park. 


A stream lot by Diggis and a small woodlot. 
 

A couple of farms along the road (corn and basic RRP fields). 


Unlike a lot of situations in this game, the Grid is actually your friend when trying to hide the boundary between tiles.  The key technique is making sure you align things across the border by counting how many tiles are taken by a particular feature. 

It makes things a lot easier if you start counting from roads since they are the only reference point you'll have on the other side. 

In this case, I've counted up the number of tiles between sections of fencelines.  I usually track this information on paper on my desk.  Simple graph paper helps, but even just a sketch can make a big difference. 


Urban areas are a lot more challenging because of their complexity.  There are a few handy tricks you can use to make the edge easier to manage. 

1.  Plan your subdivisions carefully if you're hitting the tile boundary.  Avoid leaving 1 tile gaps left over at the edge. 

2.  Keep streets away from the edge of the map by at least 2 tiles.  Use a larger buffer if you're building a heavily urbanized area.  Fill this edge area with buildings and plan to do something similar on the other side of the boundary. 

3.  Remember, streets don't cross city borders, if you run a street up to the edge of the map, plan on connecting it with a trail park or some other feature on the other side. 

4.  If you're building a park at the edge of a map, it doesn't hurt to plan to have it cross the boundary. 

Remember, these are just guidelines.  The key here is to try and disguise the existence of any artificial boundary between city tiles.  Here's how I counted up the tiles for the small urban area. 


The important things to note are any points where either a feature crosses the boundary like a trail, or places where a zoning type changes, for example from residential to commercial.  In that case, it always helps to make sure the dimensions of your zones are consistent on both sides of the map.  In the case of farm fields, also note whether the rows run parallel or orthogonal to the city border. 

4: Inserting the information on the other side

Relatively speaking, this is the easy part.  You simply need to take the information you gathered about the first city and apply it to the second city.

Make sure you have the tiles both oriented in the same way when you take the actual screen shots for later, the reason for this should be apparent later. 

For example, the features in this shot:


Should match up with this shot when they are aligned properly:


Actually, ironically enough, there is an error on the second shot, the path further from the stream is actually in the wrong place.  I made a small mistake counting, which resulted in the duplication.  While it's easy enough to fix, it really sucks to discover this halfway through making the composite shots! 

Here's the result of applying the counting on the second tile at the fields:


And in the urban area:


The other thing you have to consider is how far each feature should extend across the boundary.  Under ideal circumstances, you want to avoid making all the farms extend the same distance across the border, unless there is a larger scale grid you're working on.  Unlike what I've done here, make sure they are all different sizes and shapes!

5: Putting the Pieces together

All this work so far has just been preparation for building the screenshots.  After all, there isn't any way in game that I know of outside of the region view to see multiple city tiles at once.  But all this work deserves a bit more detailed attention. 

The most important thing to know when taking the screenshots is that humans are far from perfect, so on one side of the border you'll need to be taking bigger sized shots than on the other.  If you take an 800 x 600 shot on tile 1, and you want an 800x600 composite shot, you'll need a 1024x768 shot or 2 800x600 shots on tile 2.  Make sure all the screenshots are the same size! 

1: Once you're happy with the shots and the appearance of both side of the border, it's time to bring the shots into your photo editing software.  GIMP is my preference, but all these tools should be available in any photo editing suite.  Create an extra large shot, about the size of 2 shots to give yourself room to maneuver. 


2: Once you've got this image put together, you can drag or insert all the shots you want to combine into the image.


3: The black backgrounds are the first thing we need to deal with.  Select the layer containing one of the shots with the black backdrop.  Use the fuzzy select tool (aka the magic wand select tool) and click on the black area. 


4: Then simply delete the selected black area.  If you have a large black building on the border, it will probably be appropriate to use a different color for the background.


5: Repeat steps 3 and 4 on each layer with the black background.  You can ignore any shot that shows the underground dirt style below the city, that part is going to be hidden once the two images are joined together. 


6: Zoom in nice and close on a road or another linear feature and try to line them up.


7: Your shot should now look like this.



8: This is the point where any errors you might have made will be apparent.  As you can see here, there is one too many tiles in the park and a trail that shouldn't be there.  These errors are a fact of life with cross border details because there's no way to check the two sides until this stage. 


9: If you do have a mistake, you'll have to determine what caused the errors, correct it in Simcity 4 and then take a new screenshot.  Then you'll have to repeat all the above steps with the new shot.  I wish there was an easier way to discover the errors, but there isn't one that I've found so far. 

As a quick side note, when you're trying to align shots from the same city tile, it helps to look for small spots with good contrast so you can line them up to the pixel.  One nice thing about the fixed camera positions in SC4, as long as all the shots are taken at the same angles, all the props will look absolutely identical in every shot.  Things like the feature circled in red in this shot are invaluable. 


10: Once the alignment is correct, you should have a shot that looks like this: 


11: The only thing left is to crop the image down to 800x600.  Alternatively, you can add more images to this to build a mosaic, using the typical techniques described in other tutorials.  One nice thing about GIMP, it lets you define the exact size of the crop window and then move it around at will. 


12: Crop to selection, and then you're done!  Here's the completed image from the example. 



And that's really all it takes!   The big key is planning and ensuring that you remove any obvious patterns, or make sure that any pattern that does exist is set up to carry across the border cleanly, such as a residential neighborhood or a block of farm grids.  Don't be worried if you make a mistake, just head back and fix it up! 

I hope you found this tutorial useful!  I did my best to cover all the steps, but I may have skipped over a step somewhere that might not be obvious to everyone.  I'll keep an eye on this thread, so if you want anything clarified or if you would like more details, don't hesitate to ask!   Have fun blurring those edges! 

RippleJet

Excellent and well written tutorial, Battlecat! &apls


Quote from: Battlecat on August 26, 2009, 10:01:31 AM
Unlike a lot of situations in this game, the Grid is actually your friend when trying to hide the boundary between tiles.  The key technique is making sure you align things across the border by counting how many tiles are taken by a particular feature. 

It makes things a lot easier if you start counting from roads since they are the only reference point you'll have on the other side. 


I'd like to quote Zack on this from your MD, Adara...

Quote from: woodb3kmaster on July 27, 2009, 03:01:10 PM
You are a true master of matching boundaries! That's far more effort than I would/should normally use to get quad borders looking right. The only way your method could be improved would be to take advantage of the "terrainquery" cheat that's enabled as part of the SC4 Extra Cheats plugin. That way, you could just write down the coordinates of each farm or river boundary to make matching them up on the other side easier and less error-prone. Nevertheless, you've done an outstanding job without that cheat - well done!

I also prefer using the TerrainQuery for any kind of alignment between cities. ;)
You can see how to use it in how to measure height and depth in SC4.

SC4BOY

Just a minor note.. TerrainQuery doesn't require any special "cheat addon" .. it works right out of the box... (and of course it ignors caps.. so as long as you spell it right, the caps won't matter) And once turned on, it stays on until you leave the city tile.. Great tutorial!!

CasperVg

That is one excellent tutorial, Battlecat! I think it might come to good use for me someday. Would you mind if I converted it to Wiki Markup and put the tutorial up at the SC4 Wiki?

- Casper
Follow my SimCity 4 Let's play on YouTube

Battlecat

Thanks for the feedback! 

Ripplejet, SC4BOY: I honestly keep forgetting about that tool despite seeing it used quite regularly on the site.  I keep thinking about it when I'm doing the writeups for my MD, but it keeps slipping my mind when I'm actually in front of the game.  I'll have to work with that and see what else can be done with it!  I can see where it would be very valuable, unambiguous and more precises for keeping track of coordinates, particularly in places where there's an absence of roads. 

caspervg: Go right ahead and modify it for use on the wiki, I'm glad you think it's worth adding to the site! 

JoeST

Oh man, that is awesome...even the example... you could easily stick that in as just an any-old shot and nobody would notice...I would even vote for it in the pic comp :D

Joe
Copperminds and Cuddleswarms

Leodido


Omnia, my first MD. Check it out!

sumwonyuno

Heh, Battlecat, I've done the same things for Capitalis as well.  Try to figure out which pictures are made up of multiple city tiles  ;D.  Trees are a good way to hide the transitions.  But for water, it really takes good photo editing skills to pull off a seemless boundary, especially when the water textures don't match because the game puts a radial lighting over the water layer to simulate sunlight.


The City & County of Honolulu, a Mayor Diary based on Honolulu, Hawai'i.

mark's memory address - I've created a blog!

Battlecat

Hello everyone, I've got something new to add to this tutorial today!  I've been working on a trick to really clean up the city edges to allow for better overlapping!  It was posted a while back in my MD and I've just managed to around to posting here now.  Hope you find it helpful! 

Here's an example of the problem I'm looking at.  This was originally posted as an image in my MD.  If you look at the location by the power poles indicated with the red arrow, there are large black blobs messing up the image boundary.  This issue is being caused by the trees and the gaps preventing clean selection of the black background color.  Of course, these gaps are pretty hard to clean up by hand, there are tons of tiny ones hidden in here as well.  More importantly, we can't select by color because there are other things that may be black around this image that would also be deleted.   


As you all know, two images are required for each cross border mosaic.  Due to the nature of the game, only one of the two shots is the source of these artifacts, specifically the one where the backdrop shows through the background.  This is an example, and the shot I'm going to use for this tutorial. 


The following is the technique that I'm using to correct this problem in some of my latest cross border efforts: 

Step 1: So first you need to load the image up in your standard photo editing suite.  I personally use gimp, but these tools or analogues of them should be in most photo suites.  We're going to be using the various select tools a lot in this tutorial. 


69-4: The first tool needed is the fuzzy select tool.  It's also known as the magic wand tool.  It selects all the pixels that meet a certain standard, specifically color within a clicked area.  This is the reason I chose black for my background, since I've got a lot of green on the border.  You may want to choose something else for your background depending on your style or the type of things you have on your border. 

Also, you'll want to make sure the Antialiasing and feather edges buttons are unchecked!  I unchecked it shortly after taking this shot.  It will severely mess things up in this tutorial because it tries to blend the edges.  We want sharp edges for what we're trying to accomplish here.


Step 2: As in the original cross border tutorial, delete the selected black area.  This is where the last tutorial left off.  But the black areas between some of the trees are clearly visible.  Next we're going to get ready to eliminate those easily.  The color select tool would work, but it would also select roads and other black details that you probably want to keep. 


Step 3: So here's the tool that's going to help us out.  This is called the free select tool, or the Lasso tool in some programs.  It allows you to draw a freehanded select around only the features you want. 


Step 4: So very carefully, use the freehanded select to only grab the objects that cross the border.  Holding down shift while you do this will allow you to select separate groups.  As you can see here, I've selected two blocks but I've excluded the road.  Once you've selected the items, copy them, and then paste them to a new layer.  The key thing here is to ensure the pasted stuff winds up in the exact same location as it was in the original.


Step 5: This is the tricky part.  What you want to do here is use the alpha to selection tool to select everything on your new pasted layer (only containing the stuff you want to edit).  Next, make the original layer the active layer and delete everything within the selected area. 


Step 6: If you turn off your newly pasted layer, this is what the original image should now look like. 


Step 7: Make the new layer your active layer.  From here it's easy.  We can now safely use the select by color tool and we'll only be grabbing the black on the active layer.  This ensures that we won't be deleting anything from the rest of the image.  Click on any one of the remaining black spots between the trees with your select by color tool.


Step 8: This is what the image should look like when you've successfully selected by color.  Now hit delete.


Step 9: Clear your selection and you should have a shot that looks like this.  All the black areas are eliminated with one quick click of the button.  If there are some spots that were missed, you can go through and hit them to clean the rest, but you should be able to do it in one pass.  Note that this technique will not work with the standard maxis backdrops! 


Step 10: Next flatten the image, or merge the layers down and hit save.  Now you have a perfectly transparent city boundary ready to be overlaid with the other town using the techniques described section 5 of my earlier tutorial.


Step 11 - The Payoff: This is the finished shot with the partner image now added as a composite.  In rural areas like this you really have to eyeball the alignment.  It takes some getting used to but good planning on the edge can really help clear that up. 


And that's all it should take.  If you go back up to the first post in this thread, the remaining tutorial will cover the tips and tricks for assembling the two pieces of your now clean image together! 

packersfan

I attempted this following just the first section of the tutorial, but I get a black line as residual effect of the black background that the fuzzy tool couldn't all quite get.  Then I tried to clean that up with the second part but still no luck.  Wish I could figure out how to get it seamless like your examples.  I will keep attempting with different borders as I move along my MD...maybe just a poor area to work with.