Jump to content
Sign In to follow this  
jeffryfisher

Using Config.bmp as a Mask

1 post in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Have you ever rendered a large region, and maybe even started building cities in some of its sectors, only to discover to your horror that there's some ugly flaw in the way one sector was rendered? Have you ever wondered if you could re-render just one sector or a small subset of the sectors in a region (especially a large one)? Well, you can.

Using config.bmp as a mask, it is possible to black-out virtually all of the area that you don't want to re-render, leaving only sectors that you want (and are willing to wait for). However, there are some rules to obey and some filesystem juggling necessary to pull it off.

Since others have already written config and rendering tutorials, I won't repeat them here. I am using paint at 8x zoom to edit config.bmp, and SC4 itself (Ctrl-Alt-Shift R) to render a region. You should have read about and practiced both before attempting what I describe below.

Step 1: To begin, create two new folders. Create a new "masking" region folder with a copy of the config.bmp that you used to render the region that you want to repair. Also create a project backup folder (I have an SC4 folder called backup, and it has several folders inside).

 

Step 2: Carefully identify the file names of the city sectors that you want to replace. Note: "New City (#)" is an unstable name.

 

Rule: The game saves new-city sectors as files named "New City", and Windoze provides the (lowest, momentarily unused) number if other(s) exist. If some previously numbered files have shifted to mayor mode, then their former numbers are liberated, and any "New City" saved after that will acquire the lowest number available, possibly changing from what you thought you knew. Therefore, do no in-game saving until the repair project is complete.

 

Step 3: Move the city-sector file(s) from your build region to your project backup. If you want, you can try to load the region in SC4 to verify that the desired sectors have all "gone flat" (are now undefined). Be sure not to save anything in this condition.

 

Step 4: In your masking region's config.bmp, black out all of the city-sectors that do not need re-rendering.

 

Step 4b: if you want to chop up the re-rendered space in some new way, then copy the original config.bmp to your backup folder, and then re-chop the space in config.bmp in your masking region. Then select-copy the changed pixels in mask's config.bmp and paste them into the corresponding area within the build-region's config.bmp.

Rule: When asked to render a region, SC4 will crop its config.bmp until there's a legit RGB touching each edge of a rectangle. When cropped, config.bmp will no longer match your gray scale image. You want to prevent cropping. So...

 

Step 5: If your desired sectors don't happen to touch all four edges, then put a red dot into either or both of the upper-left and/or lower-right corners of config.bmp, thereby forcing SC4 to align your masking bmp with your whole original greyscale image.

 

Step 6: Save mask's config.bmp

 

Step 7: After verifying rendering plugins (like erosion-control and height magnification), render the mask "region" using the original greyscale image file.

 

Step 8: In the mask region, inspect the rendering results and identify the file names of (or delete) any surplus corner city-sectors. If the build region still contains numbered "New City" files, then rename the newly minted files in the mask region to avoid conflicts.

 

Step 9: Move files from the mask region to your build region.

 

Step 10: If you've done everything perfectly, then you may load the altered build region. Your newly rendered city-sectors should fit right in the space left open by the files you moved out.

It may look complicated, but if you understand what is happening, then a couple minutes of file manipulations can save you from several hours of rendering. In my own play, I just re-rendered 9 city sectors of a 260-sector region and successfully slotted the new sectors into the original region folder. I am unhappy with the lumpiness of the latest erosion setting, so I will re-do the replacement and may even revert to the backed-up originals if I can't get what I want.

 


-- Jeff Fisher ><> Vancouver WA
"I may be pissing into the wind, but if I keep my enemies behind me and aim carefully, I can still rain on their parade."

Share this post


Link to post
Share on other sites

Sign In or register to comment...

To comment in reply, you must be a community member

Sign In  

Already have an account? Sign in here.

Sign In Now

Create an Account  

Sign up to join our friendly community. It's easy!  

Register a New Account

Sign In to follow this  

×

Thank You for the Continued Support!

Simtropolis depends on donations to fund site maintenance costs.
Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

Make a Donation, Get a Gift!

Expand your city with the best from the Simtropolis Exchange.
Make a Donation and get one or all three discs today!

STEX Collections

By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

Each donation helps keep Simtropolis online, open and free!

Thank you for reading and enjoy the site!

More About STEX Collections