Jump to content
Sign In to follow this  
ldvger

creating new grey scale maps from scratch

13 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

How is this done, does anyone know?  Has anyone unlocked the secrets the game engine uses to assign various degrees of elevation to individual grey scale values? 

I am thinking about trying an experiment.  I have a USGS topo map with contours at 100' intervals for both above and below sea levels.  I am thinking about tracing the contours in Photoshop and creating a greyscale, with each contour level assigned it's own greyscale value.  Then, I'd open the resultant greyscale in Terraformer and create a region. 

But before I do this, I need to know how the game reads the grey scale color values.  From what little I already know about mapping, there would be no water in the resultant region...I would have to lower terrain until the game sea level of 250m was reached, but at least then I would have a semi-realistic sea bed under my water. 

Do grey scales get darker as they get higher in elevation, or do they get lighter?  Is it possible to assign a "0" level and have grey scale values below that at negative values?  Would this establish a sea level? 

Lora/LD

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

There's no negative to define underwater.

There is this tool I have, called "SC4 Landscape Designer". It has a database of names of towns and states in the US, a config bitmap painter and a automatic terrain generator.

If you're planning to do something from your mind and make a heightmap on photoshop or something, note that sea level is at a tone of 61 red, 61 blue and 61 green (75% grey). Anything darker that 75% is considered deeper water.

There is, in fact, an easier way than tracing them up. Go here for the tutorial. Hope this helps.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

shoji_sim i would have to disagree, from my experimentation with custom heightmaps in photoshop i have found the water line to be around the 96-7% grey mark. i foud the easiest way to get started lora is to give your self a series of plateaus in the terraformer at various heights to give you a legend of sorts in one corner of the region then export that as your base greyscale using the mapper. then when you open it in photoshop you can use the eyedropper tool to select those predefined heights. blending is somewhat tricky though.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

These are the appoximate color values:

RGB= 0: 252 meters (827 feet) below sea level
RGB= 84: Sea level
RGB= 255: 513 meters (1683 feet) above sea level

Other elevation values:

RGB= 50: 102 meters (335 feet) below sea level
RGB=100: 48 meters (157 feet) above sea level
RGB= 150: 198 meters (650 feet) above sea level
RGB= 200: 348 meters (1142 feet) above sea level

with import.dat
    RGB=10 very deep water
    RGB=25 about sea level
    RGB=35 about one god mode level about sea level

 

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Some thoguht-provoking information here folks, thank you!

    Shoji_sim, I have tried to use the tutorial you provided a link for and was unhappy with the results, which is why I am considering tracing my TIFF topo map manually in Photoshop.  The tutorial as it stands is also rather badly out-dated and needs to be re-done to reflect the methods for creating a 16 bit rather than 8 bit grey scale map, as well as having the screenshots brough up to date to reflect changes made to both the MICRODEM software (which I have) and the USGS download site.  Lastly, using the tutorial's method of creating a grey scale from an existing RL map does semi-funky things with coastlines along oceans and rivers.  And...I happen to also have underwater/ocean depth contours shown on the map I have, which is another reason why I was thinking of trying to create a grey scale manually (not that accurate ocean depths mean beans to me, but as an OCD type person, in for a dime, in for a dollar!). 

    mightgoose, my friend, I think you misunderstood my question or maybe the reason for my question.  I'm not really just making this little project up out of my head and on the fly...I have a map I want to render into a detailed greyscale.  I don't like the results I get using the MICRODEM process, so I thought I'd experiment and see if I could come up with an alternative.  However, before I devote the time to tracing countours, I want to figure out how to assign greay scale RGB values to the various bands of contour.

    tungston, you may have given me the most pertinent information yet.  The MICRODEM process tutorial, which I read through again last night, says actual water level is at RGB=83 but if one uses that exact value, the game does wierd things with the edges of land/water, then goes on to suggest an eventual RGB value of I think 86 for sea level as a "reasonable compromise".  From my experience, using the 86 value creates shorelines of cliffs 1 tile high, which I don't care for and which I find to be a royal pain to terraform in game down to something a little more realistic.  So your recommendation of 84 sounds good to me.  And given that you (or someone) has taken the time to correlate RGB values with game elevations is also excellent knowledge to have.  Given the numbers you have provided, it shouldn't be all that difficult, using my calculator and a lot of paper, to take your numbers and extrapolate them into RGB values for 100' contour intervals, which is how my TIFF map is divided up.  I'm a math lover, so I can see spending an enjoyable afternoon with my calculator and perhaps and an Excel spreadsheet.  But I have a couple of questions.  First, the grey scale only runs from 0 through 255, isn't that correct?  Does that mean that 513 m is the max height of any object in our game?  I think, in fact I *know* I have objects taller than that in the map I wish to copy, as well as in my current region.  Second, I don't know/understand what an "import.dat" is and how/why the RGB values for game elevations would be different from those you outlined above.  Could you explain?

    Thank you all for your advice, I really appreciate it!

    Lora/LD

    I just did some quick calculator work and found that there is 150 m of elevation difference for every 50 units of RGB values, which translates to approximately 492 feet per 50 units of RGB value.  Given that I am working in feet rather than meters, this also translates out to 98.4 feet of elevation difference per 10 units of RGB value and 9.84 feet per 1 unit of RGB value.  I think 98.4 feet per 10 RGB units is pretty darn close to the 100' interval I am looking for, especially given that I don't think I can create an RGB value in unites of 10.16 units, which is what I would have to do to get even 100' rgb value intervals.  Ths info may be what I was looking for!  Thanks again!

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I don't take credit for the color values, they were posted by Mallowthecloud.  He also has posted a set of height mods, including the "import.dat". 

    The reason for the height mods is to override the limits of the color values.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    tungston-

    I checked out Mallowthecloud's height mod and may think about using it, but will decide that later, after I figure out another couple of issues I need to resolve.  Someone, you or anyone else, may be able to help.

    1.)  I am using Photoshop 6.0 to create my new grey scale in.  When I load the USGS TIFF map, I am unable to create a new layer and work directly over the map image, so I created a new blank document larger than the TIFF map, then copied and pasted the map into the document.  Now I am able to create new layers as needed and work over the face of the TIFF.  My problem here is the size of the USGS TIFF map, in pixels.  It's huge, about 4400 x 5600.  At a resolution of 72 ppi, I have fantastic detail at even extreme close zooms, which is very helpful for tracing contours, but I worry about having to eventually downsize the image and losing detail when I do so.  Any advice here?

    2.)  In Photoshop, I am not finding a way to select an overall RGB value without also selecting values for the component r,g, and b.  I have NOT converted my new document with the copied TIFF to grey scale values...do I need to do that before I can select "generic" RGB values that will correspond to the values you posted? 

    Any/all advice/suggestions/help is appreciated.

    Lora/LD

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I am by no means expert with PS 6, but it is the version I use.  I would resize it before you work on it, at least before you convert it to jpg.  I have not had good results with resizing before rendering. 

    You can make custom colors in PS, but I don't know a way to select a specific RGB color value.  But then I don't work with grayscales very often in Photoshop.  I use Photo Plus by Serif a lot, because it is a lighter application.

    My problem here is the size of the USGS TIFF map, in pixelsquote>

    I am not sure what you mean by that.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    tungston- Well, like I said, pixel-wise the USGS TIFF map I am wanting to trace over is huge, 4400 pixels by 5600 pixels or so. It had great detail at 72 pixels per inch and so is fantastic from tracing over at extreme close zooms. If I resize the map before I trace it, I will lose all the detail I would kinda like to keep. In fact, I already tried that, downsizing the map to 256 pixels by whatever the constained other value came out to be (I don't remember) and also upped the pixel resolution to 150 pixels per inch, but the map was completely unreadable. That's why I'm wondering about resizing the map AFTER I trace it, rather than before, although I imagine the same problem will occur and the map tracings will then become unreadable. I've kinda been following dedgren's methods and using some of his recommendations for properly sizing grey scales and I seem to recall he recommended 1024 pixels by 1024 pixels, so maybe I will try that next and see how that turns out. Now I just need to figure out how to create the necessary grey scale tones I need. Is Mallowthecloud still arund these days? Maybe he (she?) could help me with that. Lora/LD

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    The default size region config.bmp is 16x16, which requires a grayscale of 1025x1025 pixels.  The formula for the grayscale to config.bmp is 64:1 plus 1 pixel.  So for every pixel in the config file you need 64 pixels in the grayscale, plus one pixel added to the total.  I think you ask about the extra pixel before, and I don't know the answer to that.  Maybe to make sure the terrain covers the region completely.

    I would not set the size of the grayscale canvas by inches, but by pixels, to the size that you want the region to be.

    I haven't seen Mallow much in the last 2 years or so.  I think he checks in once in awhile though.

    The custom color values can be set in Photoshop.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    tungston-

    I have downloaded the height mods, but they did not include a readme file or any instructions about how to use them.  Can you point me in the direction I need to go in to figure this out?

    Thanks!

    Lora/LD

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Cool beans tungston, I appreciate the help.  I will check out the tutorial tomorrow, but it's getting on towards 1:30 am now and I really should think about heading for bed!

    Lora/LD

    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  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    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