Jump to content
wouanagaine

SC4Terraformer, a tool for regional handterraforming

983 posts in this topic Last Reply

Highlighted Posts

  • Original Poster
  • Posted:
    Last Online:  
     

    romaq can you send me a TER file of this size ? I only try with freeware version of WorldMachine and it can only save 513x513 max.

    Importing a TER file should match the region size. It seems that you have a region of 4097x4097 and want to import a TER file of 8193x8193

    I only rescale image file ( 8bit or 16bit )

    Take care!

    v1.0b on its way :

    newinterfacewj0.jpg

    Share this post


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

    The *.ter format is 128M. The identical PNG is 48M. I'm not sure it is relevant at this point, because SC4TF throws a memory exception without a report attempting to load a 128^2 sized config.bmp. The 'normal' version simply hangs. The Debug version stops at this point:

    big cities = 0

    medium cities = 0

    small cities = 16384

    CONFIG size (128, 128)

    Traceback (most recent call last):

    File "F:\Python24\SC4Terraformer\SC4TerraformerApp.py", line 1940, in OnClose

    File "F:\Python24\SC4Terraformer\SC4TerraformerApp.py", line 1943, in ShowMain

    File "F:\Python24\SC4Terraformer\SC4TerraformerApp.py", line 531, in __init__

    File "F:\Python24\SC4Terraformer\SC4TerraformerApp.py", line 821, in LoadARegi

    on

    File "F:\Python24\SC4Terraformer\datReader.py", line 811, in show

    File "Image.pyo", line 470, in tostring

    File "string.pyo", line 318, in join

    MemoryError

    I'm not sure if there is a means to verify memory constraints before making the attempt or not. I know for a fact under a prior version of SC4TF I was able to handle a 128^2 sq. km region. Barely. It was slow and painful to do anything... hrm... come to think of it, then I used big cities. Now I'm using small cities. I need to attempt the same size region using big cities, and see how it reports. The memory crasher bug might be in individual city allocation. If it is possible, it would be quite helpful if SC4TF could report something like, "You have memory to support as large as 16384 sq. km. in no more than 1024 cities." ... Nope, it throws the same memory exception without report. Anyway, I don't know if it is possible to calculate how big is too big at runtime, or if you can capture memory exceptions, but that would clarify on a given machine how far you can go.

    I'm not sure if I can get access to a 4 Gb machine. It's in Los Vegas, and I'll need to ask a friend to participate in the experiment. This will take time, since this friend may not be in the office for weeks at a time. But he might be interested in finding out.

    Anyway, I'll have to go with the 64^2 sq. km. tutorial.

    Share this post


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

    hi romaq

    good to get the trace . I can add memory management, this will lead to just have SC4TF not freezing or crashing, but you won't be able to load that size

    I'm still wondering why you can load it with previous version and not with this one as I have not change anything regarding to memory issue or usage

    Take care

    Share this post


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

    I'm not sure. I could do testing with a prior version, but it would be more useful if SC4TF could respond with, "You only have memory for X tiles in Y cities. I can not meet your request for N tiles in M cities." If the math for what memory is required, it may be possible the region is small enough, but too many cities have to be tracked. Or maybe the number of cities doesn't matter, it is only the tile count. Maybe if I took 1k off the side, I could load the image. Or maybe if I could free up 3k or something.

    I'm thinking of the startup also. Perhaps the startup could bring up greyed out windows. The person then has the option to directly open a region or start a new region. Attempting to open a region too big for the current memory brings up the memory warning with info. That saves having to *have* a preexisting region to load before starting a new region. If one wishes to load a region, one can take the existing menu option. This gets rid of the window for default sea level as well. Whatever it is I wish to do, I would like to get straight to it.

    Another idea on the 'wish list', though it isn't important. You have a window that shows the locked/ unlocked condition of the cities.

    1) Could this be fixed-ratio, so the cities are square? A non-square region has 'squashed' cities.

    2) Could the window pop-up during the city load process and flip the colors from greyed (like dark blue, dark red, dark green) to bright colors as the cities load? If something hangs, it might help knowing *where* the bad city is. But more important than a visual debugging tool, it would look cool to see the cities pop into place as they load. ;-)

    I'll explore directly loading in *.ter files tonight. I just have to make one not so big. Cheers!

    Share this post


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

    hi romaq

    I have made change for any exceptions that can occurs during the loading of the region ( included not enought memory ). This lead to a message poping up in case of any error. Memory calculation is not very usefull for users as even if I say that a region will need 100Mo, windows will get its own way of doing it and even if you managed to free 100Mo, it is not sure you can load it. ( no more technical )

    Startup process should be change I agree, but this will require some amount of work, so this won't be done for now. maybe on the future

    the water level has been removed, as rechecking any import plugin I found on STEX, none of them change it. so I remove the dialog and the waterlevel tool as it seems to confuse some people

    1 ) problem with fixed ratio, is that the dialog should be sized accordingly

    2 ) this is really a good idea, definitly in the wish list 4.gif

    I tried multiple ter files from WM free and everythings seems ok for the size. I 'd like you can test non square TER files as there is a special handling case for them.

    V1.0c will be out soon for testing. I have to make the installer and update the readme

    Take care

    Share this post


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

    Yeah, I figured that changing the startup would require some changes that would take too long to be a 'quick upgrade', but thank you for seeing that it comes up awkward the way it currently works.

    Square *.ter files from WM seem to load just fine, and this saves a LOT of *.ter --> *.tif --> *.png conversion on my end. I very much appreciate it. I'll need to test non-square tomorrow. In case you didn't see it, you should find an option on World Machine's, "World Size & Positioning" dialog for "Allow non-square terrain", which is really the only way I can produce a non-square.

    I've just finished http://www.mik-maq.com/sc4tf/MemTest, and I will work on the tutorial on how to create a 64 sq. km. region using World Machine, plus an 'advanced' version that covers issues with making one larger using the $40 standard version.

    Cheers!

    Share this post


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

    V1.0c is ready for testing

    Before downloading please read the following information:

    This version has not been testing, you are the testers

    Compatibility - Sc4Terrafomer only works with Rush Hour and the Deluxe Edition

    DirectX - Microsoft directx team releases a new version about every two months so you should be sure you have the latest version. At the moment you need the april 2006 version of directx 9.0c

    You can download directx from the following locations:

    http://www.softwarepatch.com/windows/directx.html

    or

    http://www.microsoft.com/windows/directx/default.mspx

    MSCVP71.DLL - Some users may need this file. It can be found here:

    http://www.dll-files.com/dllindex/dll-files.shtml?msvcp71

    Instalation - All you have to do is open the downloaded installer and follow the instuctions on screen. After the installer you can open the program in the start menu like this:

    Start->All Programms->SC4Terraformer->SC4Terraformer v.09c

    This is an external program and does not change anything within simcity.

    Please note you use this program on your own risk, you should make a backup of your region and read the included readme.html

    Now you can download SC4Terraformer .

    splashaw5.jpg

    v1.0c
    Removed the water level dialog and tool

    Generic exception handling in case of error while loading a region ( mainly RAM issues )

    Windows positionning persitent accross multiple runs

    v1.0b
    SC4M file format enhanced to incorporate the config.bmp and html notes from the author

    Create region dialog can now accept a new SC4M instead of the width by height values

    On creation or import of a SC4M , the author notes are displayed

    Bug fixes with readonly/only save modified related issues

    On import, the min height values has been removed ( useless )

    v1.0a
    Supporting .TER file format importing

    Sliders of min/max height inverted

    Readonly files has been handled

    Only saving modifying cities

    Share this post


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

    I notice in debug reference to a 'terrangen file' when loading. It is a 'terragen' (take out one 'n') file. ;-)

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     

    OK im confused.... the link to MSCVP71.DLL bringds me to the MSVCP71.DLL

    SO wich is it?

    CVP or VCP

    LOL

    Share this post


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

    wouanagaine: Do you have to purchase the SC4Terraformer? I mean, I clicked on the download link above and it took me to a table with the buttons "premium" and "free" and either one I click on it says that I have to pay. Help me please!

    Share this post


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

    Clicking free should bring you a with a count down.

    Once the count down, reach 0, you will get an edit box and an image code, write the code and click the download button

    In anycase SC4TF is free

    Hope it helps

    Take care

    Share this post


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

    [('0.9', '0.2'), ('0.8', '-0.05'), ('0.69', '-0.3'), ('1', '0'), ('0', '-0.5'),

    ('0.85', '0.05'), ('0.95', '1.25'), ('0.97', '0.5'), ('0.92', '0.75')]

    [('0.9', '0'), ('0.8', '-0.6'), ('perturbheight', '.75,1'), ('1', '0'), ('0', '-

    1'), ('0.75', '-0.85'), ('0.85', '-0.1'), ('0.95', '.05'), ('scalefactor', 'radi

    us'), ('perturbradius', '.85,1.15')]

    height .75,1

    factor radius

    radius .85,1.15

    [('1', '0'), ('0.7', '.9'), ('0', '1')]

    [('0.9', '0.2'), ('0.8', '-0.05'), ('perturbheight', '.75,1.25'), ('0.69', '-0.3

    '), ('1', '0'), ('0', '-0.5'), ('0.85', '0.05'), ('0.95', '1.25'), ('0.97', '0.5

    '), ('0.92', '0.75'), ('perturbradius', '.85,1')]

    height .75,1.25

    radius .85,1

    [('1', '0'), ('0', '-15'), ('.9', '0')]

    [('.9', '.1'), ('.95', '.0'), ('1', '0'), ('0', '1'), ('0.65', '1'), ('0.69', '1

    '), ('.7', '.5')]

    {'Crater': {'spline': [(0.0, -0.5), (0.68999999999999995, -0.29999999999999999),

    (0.80000000000000004, -0.050000000000000003), (0.84999999999999998, 0.050000000

    000000003), (0.90000000000000002, 0.20000000000000001), (0.92000000000000004, 0.

    75), (0.94999999999999996, 1.25), (0.96999999999999997, 0.5), (1.0, 0.0)]}, 'Can

    yon': {'factor': 1, 'pertubRadius': [0.84999999999999998, 1.1499999999999999], '

    spline': [(0.0, -1.0), (0.75, -0.84999999999999998), (0.80000000000000004, -0.59

    999999999999998), (0.84999999999999998, -0.10000000000000001), (0.90000000000000

    002, 0.0), (0.94999999999999996, 0.050000000000000003), (1.0, 0.0)], 'pertubHeig

    ht': [0.75, 1.0]}, 'Plateau': {'spline': [(0.0, 1.0), (0.65000000000000002, 1.0)

    , (0.68999999999999995, 1.0), (0.69999999999999996, 0.5), (0.90000000000000002,

    0.10000000000000001), (0.94999999999999996, 0.0), (1.0, 0.0)]}, 'PerturbedCrater

    ': {'pertubRadius': [0.84999999999999998, 1.0], 'spline': [(0.0, -0.5), (0.68999

    999999999995, -0.29999999999999999), (0.80000000000000004, -0.050000000000000003

    ), (0.84999999999999998, 0.050000000000000003), (0.90000000000000002, 0.20000000

    000000001), (0.92000000000000004, 0.75), (0.94999999999999996, 1.25), (0.9699999

    9999999997, 0.5), (1.0, 0.0)], 'pertubHeight': [0.75, 1.25]}, 'Deep canyon': {'s

    pline': [(0.0, -15.0), (0.90000000000000002, 0.0), (1.0, 0.0)]}, 'Hill': {'splin

    e': [(0.0, 1.0), (0.69999999999999996, 0.90000000000000002), (1.0, 0.0)]}}

    [('0.9', '0.2'), ('0.8', '-0.05'), ('0.69', '-0.3'), ('1', '0'), ('0', '-0.5'),

    ('0.85', '0.05'), ('0.95', '1.25'), ('0.97', '0.5'), ('0.92', '0.75')]

    [('0.9', '0'), ('0.8', '-0.6'), ('perturbheight', '.75,1'), ('1', '0'), ('0', '-

    1'), ('0.75', '-0.85'), ('0.85', '-0.1'), ('0.95', '.05'), ('scalefactor', 'radi

    us'), ('perturbradius', '.85,1.15')]

    height .75,1

    factor radius

    radius .85,1.15

    [('1', '0'), ('0.7', '.9'), ('0', '1')]

    [('0.9', '0.2'), ('0.8', '-0.05'), ('perturbheight', '.75,1.25'), ('0.69', '-0.3

    '), ('1', '0'), ('0', '-0.5'), ('0.85', '0.05'), ('0.95', '1.25'), ('0.97', '0.5

    '), ('0.92', '0.75'), ('perturbradius', '.85,1')]

    height .75,1.25

    radius .85,1

    [('1', '0'), ('0', '-15'), ('.9', '0')]

    [('.9', '.1'), ('.95', '.0'), ('1', '0'), ('0', '1'), ('0.65', '1'), ('0.69', '1

    '), ('.7', '.5')]

    {0: (123, 189, 214), 200: (0, 8, 74), 6000: (0, 8, 74)}

    {6000: (255, 255, 255), 3: (255, 231, 165), 100: (0, 206, 0), 200: (24, 156, 24)

    , 300: (189, 222, 115), 400: (173, 99, 24), 500: (255, 255, 255), 4: (14, 88, 7)

    }

    (0, 0, 255) {0: (123, 189, 214), 200: (0, 8, 74), 6000: (0, 8, 74)} {6000: (255,

    255, 255), 3: (255, 231, 165), 100: (0, 206, 0), 200: (24, 156, 24), 300: (189,

    222, 115), 400: (173, 99, 24), 500: (255, 255, 255), 4: (14, 88, 7)}

    big cities = 512

    medium cities = 0

    small cities = 0

    CONFIG size (128, 64)

    ----

    ----

    region read

    .\FrontEnd.cpp (192):HARDWARE VP WITH 24bit ZBuffer

    Ok

    validadded : 0.00 - -0.50

    added : 0.69 - -0.30

    added : 0.80 - -0.05

    added : 0.85 - 0.05

    added : 0.90 - 0.20

    added : 0.92 - 0.75

    added : 0.95 - 1.25

    added : 0.97 - 0.50

    added : 1.00 - 0.00

    ----

    Perturbation radius : 0.85,1.15

    added : 0.00 - -1.00

    added : 0.75 - -0.85

    added : 0.80 - -0.60

    added : 0.85 - -0.10

    added : 0.90 - 0.00

    added : 0.95 - 0.05

    added : 1.00 - 0.00

    Perturbation heihgt : 0.75,1.00

    ----

    added : 0.00 - 1.00

    added : 0.65 - 1.00

    added : 0.69 - 1.00

    added : 0.70 - 0.50

    added : 0.90 - 0.10

    added : 0.95 - 0.00

    added : 1.00 - 0.00

    ----

    Perturbation radius : 0.85,1.00

    added : 0.00 - -0.50

    added : 0.69 - -0.30

    added : 0.80 - -0.05

    added : 0.85 - 0.05

    added : 0.90 - 0.20

    added : 0.92 - 0.75

    added : 0.95 - 1.25

    added : 0.97 - 0.50

    added : 1.00 - 0.00

    Perturbation heihgt : 0.75,1.25

    ----

    added : 0.00 - -15.00

    added : 0.90 - 0.00

    added : 1.00 - 0.00

    ----

    added : 0.00 - 1.00

    added : 0.70 - 0.90

    added : 1.00 - 0.00

    ----

    Traceback (most recent call last):

    File "SC4TerraformerApp.pyo", line 2134, in OnClose

    File "SC4TerraformerApp.pyo", line 2137, in ShowMain

    File "SC4TerraformerApp.pyo", line 678, in __init__

    File "SC4TerraformerApp.pyo", line 286, in UpdateBmp

    MemoryError

    .

    This is what I hit when I attempted to load in a 64k x 128k region config.bmp. It would bring up all the control windows (blank overhead radar, slider bars, zone tools) except the main edit window. I hit 'no water' and 'city lines' in global controls, and then I would get a Windows 'Crasher/ report to microsoft?' window. This is using the latest V1.0c.

    So at the moment, on my machine 64^2 sq. km. region seems a limit.

    On reflection, I think what happened is that I was testing with only 512m memory, and what I thought was 128^2 sq. km. was really only 64^2 sq. km that runs much better with 2G. of memory. Two questionsn remain in my mind:

    1) Are the limitations of SC4TF close enough to the practical limitations of SC4 that if it's too big to build with SC4TF, it's too big to play in SC4?

    2) If I can play a bigger region with SC4 than I can manipulate in SC4TF, could SC4TF help from some form of on-disk caching? There may be a way of thinking about memory that will allow for improvement from caching resources. GIMP is an example of this. One may edit very, very huge images, SLOWLY. This is not to say one may edit an image easily or quickly. 'Possible yet painful' is different from 'not possible'.

    I must say, if a bigger region than one can build is just as unplayable, point #2 is irreveleant. However... this is something I can test simply by attempting to have SC4 load in the region I just described. I'll report on experiments later this weekend to that effect.

    Cheers!

    Edit

    Ok, I attempted to play 128km x 64km as a region in SC4. And WOW I had a good laugh! The region goes on and on. And on. And on and on and on and on. And on. At a certain point, about 126km east, the region scrolling would hang. I could then scroll down, and I could get to the bottom south east corner, but SC4 really doesn't want to let me get to the top northeast corner. SC4 didn't crash, but I really think that SC4TF and SC4's "unplayable size" point matches the same. I'm quite happy to hear anyone else's opinion on this. I did try to nudge in various directions to get to the northeast corner of the region, but it didn't work very well. That suggests a practical limit of 64^2 sq. km. regions for both SC4 and SC4TF. If that is really the case, then after the memory checks are in place one may suggest if you don't have raw memory to build it in SC4TF, you don't have the raw memory to play it in SC4. And that precludes effort to disk-cache SC4TF processes unless someone can convince Wouanagaine of how the potential benefit would clearly outweigh his development costs.

    Wow, this has been fun!

    Share this post


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

    thanks romaq for testing

    I added the MemoryException on loading, not after 15.gif stupid of me

    1) I don't think SC4 have any limitations, but the limitation I forsee is that a region with more than than 100 cities will last forever to play ( but that is only my opinion )

    2) it can be done, or more exactly it will be possible

    I plan to add an 'offseter'.

    you may or may not know that any city in a region is located in the config.bmp coordinate system, ( look at the name SC4TF create when you first time save a region ). What I plan is that you can specify that a region will not start at 0,0 but somewhere else.

    This will be very handy for merging different already created & built regions

    and for your case, this will be very handy for creating huge map that can be edited by 'patch' ie you want a 128x128 , just edit 4 68x68 then merge them ( and the 4 config.bmp have to be merged also )

    ^^^^^ no I have not made math error , the 4 more are for overlapping so you get smooth transition 3.gif

    this will be the last addition the SC4TF for this process stage

    Take care!

    Share this post


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

    Yeah. Well, the point in my mind of a big region is to do a satellite view and be able to have lots of space for 'where shall I build today?' I started Floyd as a 64^2k city, but I'm having problems because the natural area under water was just slightly too shallow for ferries. I want some islands in sufficiently deep enough bays, and I want hills and mountains. I also want my 'Floyd' region to be in the context of a roughly 510,066,000 sq. km. sized planet, and I want to be able to show anyone how to accomplish this. When I publish my city journal, I want people to see an animated spinning plannet (Floyd) zoom in to the area where my region is. And if a 64^2 sq. km sized region isn't big enough, there is more virtual terrain that could be there. It would also serve as a reference for accurately scaled maps. I'm not confident 'accurately scaled maps' are all that accurate. They'll either not be quite the proper size, or they'll have mercator projection distortion. I could be wrong, but as I started looking into the problem of making a 'really accurate map', I quickly decided making a 'fantasy' region much more directly gets me into playing the game.

    Concerning the '68 x 68' or '64 x 64' sized regions... The actual region size by pixel is vertex. I can have World Machine quickly create a huge region, and save it in smaller sized chunks, such as the 513^2 sized pixels with the free version. Since the *.ter (and sc4/ *.sc4m) formats are vertex, adding four 513^2 pixel sized regions should produce one 1025^2 pixel sized region. Adjacent vertexes 'ought' to be identical, that last odd pixel column. If they are *not* identical, because of the process used to create them, your best bet will be to average out the difference. In fact, that should be part of the 'stitching' process anyway, because it is possible the process may render that 'odd pixel' slightly off, just not off enough to be visible to the eye. An average of each vertex point would smooth out differences in vertex values as best as possible.

    All that to say, I strongly suggest having it possible to have '4 64^2 sq. km regions = 1 128^2 sq. km region', the only 'overlap' being that +1 column of vertexes in the formula (N*64)+1. Anyway, that's my two centimenters.

    Share this post


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

    I need to confirm this, but I believe SC4 has a practical vertical + horizontal limit defined as 'how tall can a region be before the southeast corner of a region is too far left for the northeast corner to be accessible. That would not be an issue of 'size' per se, but a bug in the region display dynamics. That would fall out of the scope of SC4TF, at that point, and become strictly an SC4 bug. But if such a bug is really there, it would be useful as 'things to know' when developing a region in SC4TF.

    And, of course, there is no practical harm in having undeveloped cities within an SC4 region, even if the cause is inaccesibility.

    Share this post


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

    I've never seen this bug before. I have a region zipped somewhere that has a gigantic 1024x768 config bitmap. Took about 12 hours to render the grayscale on it, and as far as I remember, I had no trouble accessing the region. I'll try to find the region and confirm this when I get back to my computer.

    Share this post


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

    Companion Program which may help with DEM comversion.

    Background: I'm using 3DEM to capture Whatcom County, WA from USGIS. 3DEM will allow me to take the group of DEM data I want and make a single terrain elevation map, which is what I did. However, I'm having a bear of a time converting the single, very large DEM to a 16 bpc image that I can then trim to our wonderful formula (N km. *64 )+1. I not only have to crop and possibly rescale on the X,Y axis, but the Z-axis seems fouled up every time I attempt to read the conversions I make.

    A very useful program would be one able to read a DEM and provide a means to select a rectangle in that (N km. * 64)+1 with the target selector automatically sizing things. Once selected, the program would write in SC4M format. DEM files provide axis information along with altitude. Unfortunately, I've been unable to convert DEM to 16 bpc accuracy into a format I can trim the image to fit (N km. * 64) + 1. It may be possible to do the conversion. In fact, 3DEM will allow you to export a selected area or region into Terraform format. The unfortunate side-effect with 3DEM is that it arbitrarily scales all axis to fit Terragen requirements, and you can't pick what scale you want.

    A program that can simply read DEM and scale selections automatically to fit SC4M requirements would be a dream.

    Now to decide if I'm going to take my DEM, mangle it with 3DEM into *.TER format and import to SC4TF anyway. :-( I must say, real world terrain makes a beautiful starting point on a fantasy region. ;-)

    Cheers!

    EDIT: Better idea, at least one I can work on. I don't really need a GUI. I need a given DEM translated into 16 bpc PNG. Once it is in 16 bpc PNG, I can use an image editor to trim it to the (N * 64) + 1 formula and fit it as I like. So I'll start puttering with something along that line. If I can put something together, I'll be glad to post what's going on here as well as http://www.mik-maq.com/sc4tf.

    Share this post


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

    Well i just want to thank everyone that was on the team creating SC4TF and especially wouanagain for helping me get it running, I have now used it for a little while played with the tools and started creating a region and I can't believe how awesome this program is, no more flipping between different tiles trying to get terrain to match perfectly...this program is amazing...

    Once again Thank you to anyone who worked on it!!!


    newsig-1.gif

    Crazy Collection of Cities*2006 Best City Planning Winner*

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     

    I have a question. When I render out m y regions, all of the mountains are WAY too low.  And then they have flat tops too.  I"ve been trying to use this one https://www.simtropolis.com/stex/index.cfm?id=5451 but the mountains don't seem to be as high as they should be.  I"ve also tried https://www.simtropolis.com/stex/index.cfm?id=5761 and the mountains are turned into hills.  Do I need to change settings or something?  I'm using the default everything...

    Share this post


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

    Ugh... 8-bit. I hate 8-bit. Well, I *think* the general idea is that you do NOT use SC4TF unless specifically instructed otherwise in the page that comes up. You just do the alt-r (is that right?) within SC4 and load in the file, and trust SC4 to handle it.

    Share this post


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

    crazychickensc12 , thx a lot

    WorfoSAUR, I just tried https://www.simtropolis.com/stex/index.cfm?id=5451, and it seems ok, anyway with v09c there was a little bug on the import feature with the default number. you should put 3 as scale factor and 0 as min height. and if you want the same colors as flamesrock picture, you should download the snowcapped mod, he provide a link in the comments

    And you should use v1.0c it fixes this bug and provide a simpler import dialog

    Romaq, well using SC4 for CTRL-ALT-SHIFT can be quite long, especially if the users are not aware that removing any unnecessary plugin can speed up the process. it in my opinion only usefull if :

    -you want the same erosion as the author

    -you want the SC4 color from start

    Share this post


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

    Ah. Yeah, SC4TF would be faster, and heartily recommended then. Still, I hope map authors would consider ditching 8-bit. If SC4TF is going to be the way to go, why suffer the limitations of 8-bit images? If SC4M is going to hold the config.bmp as well, then SC4TF becomes a 'download and drop' solution to generating regions. One question on my mind has been with compression within SC4M files. If you already have compression built-in, that's great. If not, perhaps .SC4M could be done as an archive (.tgz or .zip) of a 16 bpc PNG (taking advantage of PNG compression), the config.bmp and the region.html. The advantage of making SC4M an archive is that someone could rename region.sc4m to region.zip (or region.tar.gz) and extract the 16 bpc PNG file, then edit the file and recreate region.sc4m entirely without usign SC4TF. region.html could include the SC4M version information also. I'm just thinking in terms of easily opening up SC4M to command line tools. I don't think I could make a GUI, but I have been thinking of making a script from command line that could read in DEM files, calculate scale values, and have it spit back out a SC4M file. If we steer people towards using SC4M instead of .JPG and .PNG, compression will become an issue. Making the SC4M 'data package' just another PNG within an archive would be one solution to meet both archive and open tool issues.

    Anyway, I have finally decided to create the BellBaker region. It is as accurate a rendering of the area from around Bellingham to Mt. Baker in Washington, USA. http://www.mik-maq.com/sc4tf/BellBaker I already have the DEM data ready, but DEMMIT I'm having a hard time hitting the 15.625 meters per pixel scale using 3DEM, and nothing else appears able to stich adjacent DEMs together or make some sort of data file I can work with to scale. I'm not clear on how other people are doing it AND ensuring they are really REALLY really accurately to scale AND doing so in 16 bpc. But that's my goal, and to publish the means so anyone can make an accurate map of anything they can get DEM data for.

    Anyways, I'll keep people posted on the DEM --> SC4M accurate conversion effort. Cheers!

    Share this post


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

    romaq

    SC4M is already compressed, ( zlib ie zip file ) and for test files I used, it is around 10% less or more than a 16bit png.

    to anyone here is the file format reading code

    unzip the SC4M to memory (using zlib )

    once unzipped the structure is the following for v.09c and prior

    4 bytes : SC4M ( signature )

    DWORD : version 0x0100

    DWORD : height in pixel

    DWORD : width in pixel

    float 32 : minimal height ( currently always 0.0000 )

    4 bytes : 'SC4D'

    width * height unsigned char : low channel elevation ( ie the lowest 8 bits of the 16bits )

    width * height unsigned char : high channel elevation ( ie the upper 8 bits of the 16bits )

    quote>


    once unzipped the structure is the following for v1.0b and after

    4 bytes : SC4M ( signature )

    DWORD : version 0x0200

    DWORD : height in pixel

    DWORD : width in pixel

    float 32 : minimal height ( currently always 0.0000 )

    optionnal block:

    4 bytes : 'SC4N'

    DWORD : length of html code

    length char : html code

    quote>

    4 bytes : 'SC4C'

    DWORD : width of config.bmp

    DWORD : height of config.bmp

    3 * width*height unsigned char : config bmp stored as RGB value, one pixel is stored as 3 unsigned char

    4 bytes : 'SC4D'

    width * height unsigned char : low channel elevation ( ie the lowest 8 bits of the 16bits )

    width * height unsigned char : high channel elevation ( ie the upper 8 bits of the 16bits )

    quote>

    code to get the 2 channels mixing and get the real float32 elevation:

    (lowerchannel + higherchannel * 256)/10

    Share this post


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

    Wouanagaine: I would like your permission to copy the SC4M file descriptions to my SC4TF Wiki at http://www.mik-maq.com/sc4tf site. It would be even better if you would be willing to add a Wiki page yourself, but I understand if you would prefer not to at this time.

    I am considering a command line program called sc4mtool. I want to hammer out what options it would need to support, and I'll create the ManPage for it first. Having created the documentation, I'll know what software to write.

    I want to say up front, if anyone else is interested in particiapting, doing research, or even doing the code work, I would be quite happy to have someone else do all the work. ;-)

    But to start... sc4mtool takes an input file that is one of several DEM formats or a GeoTiff image. For the initial version, the file *must* have the following details in its format:

    1) It must be raster, though a later version might accept vector images. Whatever language is used, the ability to read library files that will *handle* various formats in a library would be useful. That way, someone could simply write the library and a new feature, such as the ability to process vector formats, would be possible.

    2) The file must provide scale or coordinates by which scale can be determined. At least at first, I'm only going to deal with formats that provide scale (X, Y axis)

    3) The file must provide altitude information (Z axis).

    Once I have this information from a file, I can then scale the file along X, Y axis to meet the 15.625 m/ pixel requirement of SC4M files. After rescaling an image, including setting the water level and height, I plan to pad the image to the nearest kilometer, and save the whole thing in 'small cities' with the config.bmp.

    Would anyone have any other design considerations in such a tool?

    Share this post


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

    hi romaq, no problem, you can copy it. I put it here so everyone can write/read SC4M easily

    I have made some testing and definitly the distance between 2 pixels in SC4 ( hence the length Tile ) is 16

    Share this post


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

    Gah! Tiles are 16^2 sq. meters per pixel? But... that would make a small city 1.024^2 sq. km. instead of 1 sq. km. And it is much easier for me to carve up 1km segments of terrain than 1.024 km segments. But, of course, Maxis didn't ask me.

    Ok, I'll publish the SC4M info on your behalf. Do you have a link to the confirmation of 16^2 sq. meters per pixel? Ugh! It's far easier to show a region is an 'accurate render' if the city border lines are 1km. in scale. One idea I had for the SC4M tool was to take the coordinates of a region and output a .kmz file to compare against the render. But I have to get there one step at a time, and having an accurate measure of the tiles would be a very useful place to start. ARG!

    Hopefully the Geospatial Data Abstraction Library (www.gdal.org) would help with the process.

    Share this post


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

    for the 16m : in SC4 city mode, type ctrl-X, this bring the cheat code box, type terrainquery then enter

    then select the query tool, you will see more infos than usual

    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


    • 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