Author Topic: Been away from T.E. awhile; some conversion questions  (Read 414 times)

Offline bbosen

  • Silver Member
  • ****
  • Posts: 963
      • AskMisterWizard.com
Been away from T.E. awhile; some conversion questions
« on: September 08, 2010, 08:24:43 PM »
Greetings Terrain Editors!

It's been several years since I created two terrains (Solomon and NewGuinea). They still work, but I've noticed that the beach areas don't look very good anymore. Under Ah2.12.4 they had nice, wavy, random, natural-looking contours. Now all the beach lines are perfectly straight and on right angles, as if all of the beaches were manufactured by a swimming-pool company from the 1950s.

I've been playing around with the TE this evening. I still have all of the old source files, and the TE can edit them and rebuild them, but those beach lines still look like they were cut from a square cookie mold.

I notice that some maps don't suffer from this problem; while most of the old maps look as silly as mine, a few have pretty beach boundaries.

Can anybody point me in the right direction to attack this problem? I can't find any hints on the Wiki (maybe they're there, but I can't find them). I don't need anybody to do the work for me, but I'd appreciate a bit of coaching to figger out what tool(s) to use and perhaps the vocabulary, etc.

I'd like to preserve the elevations I've been using for years, since they are based on USGS satellite data and represent the most accurate data available, so I'm thinking that the effect I want and the tools I'll need to use are purely cosmetic in nature. Does that sound right?


Regards,


-Peabody-

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10899
Re: Been away from T.E. awhile; some conversion questions
« Reply #1 on: September 08, 2010, 10:24:27 PM »
You can edit the shorelines in the TE, using the tools in the Water tab, but it's far too tedious.

Instead, under the File menu, Export Water.

This will give you two new files inside their own folder within your project folder, waterc.bmp, waterd.bmp and the imptexpt folder respectively.

You will need a tool like Photoshop or GIMP to handle bitmaps of this size, 16,384 x 16,384 something. Round the square edges into the shoreline shape you want, save the bitmap as a grayscale. Import it back into the TE with Import Water. Do an easily identifiable test area to see the results. After importing, draw the ground type in the areas that have now turned into grayish dry land.

Learn what the gndtype.bmp does. An alternative method is to do the same thing in the 4096 gndtype file, rounding the edges at the shorelines, then blow it up to the 16,384 size, convert to black and white, then convert to grayscale, save, and import back into the TE. This method still requires that you round the edges of the terrain, cutting into the dark areas.

Standard warning:
It will overwrite your files so only work with a copy.

--------------------------------------------------------------
Most of this should be in your Readme.txt file inside the TE folder. I've probably edited this version some, I haven't read it in a long time, and htc may have an updated version out as well so use it as a guide only. There is a section on converting old terrains.
 :cheers:
--------------------------------------------------------------

New Features

Ability to "paint" terrain textures on land using scalable brushes.
Ability to draw shorelines as well as water depth and water color using scaleable brushes

Terrain: Land Texture Specifications

Texture sizes are Tileable 1024x1024 and cover a 4 sqr. mile area (2miles x 2miles)

Texture Names: Textures are named "nttXXXX"

ntt0000  Deep water ntt0000 will always be deep water  (This is a greyscale BMP designed to
vary the water over distances)

ntt0001  Grass
ntt0002  Forest 1 (evergreen)
ntt0003  Forest 2 (deciduous)
ntt0004  Farm 1
ntt0005  Farm 2
ntt0006  Rock
ntt0007  Swamp
ntt0008  Rocky Grass
ntt0009  Sandy Grass
ntt0010  Beach
ntt0011  River bed /
ntt0012  Snow / Coral

The terrain tab in the editor will allow you to select a brush size and texture type to paint.
You are also able to blend 2 textures while painting.

The editor will create a file in your terrain directory named gndtype.bmp.
This greyscale.bmp sets the terrain types over the terrain. It is 4096x4096 resolution.
1 pixel on this texture is equal to 1/8th of a mile.

Editing gndtype.bmp outside of the terrain editor:

The gndtype.bmp can be edited in photoshop or other graphic editing software.
You may find it easier to edit types in a paint program outside of painting in the editor.
Be sure you are working in greyscale mode. (sgrey profile for photshops users)

RGB Values

      0 = ntt0000   Deep Ocean
     17 = ntt0001   Grass
     34 = ntt0002   Forest Evergreen
     51 = ntt0003   Forest Deciduous
     68 = ntt0004   Farm 1
     85 = ntt0005   Farm 2
    102 = ntt0006   Rock
    119 = ntt0007   Swamp
    136 = ntt0008   Rock grass
    153 = ntt0009   Grass Sandy
    170 = ntt0010   Beach
    187 = ntt0011   River Bed
    204 = ntt0012   Snow

To Blend 2 textures outside of the editor:


RGB values for blending formula:
(texture A ntt number * 16 + texture B ntt number) = blended RGB

So say we want to blend ntt0001 with ntt0010: (1 / 10)

01 * 16  = 16
16 + 10  = 26
26 is rgb for ntt0001/ntt0010 blend

or we can blend ntt0012 and ntt0006 (12 / 6)

12 * 16 = 192
192 + 6 = 198
198 is RGB for ntt0012/ntt006 blend

WATER

there will be a waterd.htz and a waterc.htz file in your terrain folder now.
the waterd.htz is for water depth, and waterc.htz is for water color.

The Water tab in the editor will allow you to draw/erase water,
set the water depth and even color.

Converting/Creating  a Terrain:

First
- Open an existing terrain with the new editor.
There will be a delay as the program creates the new files
(waterd.htz, waterc.htz, gndtype.bmp as well as a few others)

After the files are generated you should see the terrain,
but it will be blocky.
Here you have a choice - edit the shorelines in the Terrain editor,
or use an external graphics program (photoshop).

Go File » 'export water bitmap'
- This will create 2 16384x16384 bitmaps named waterd.bmp and waterc.bmp.
They will be in the texsrc folder.

Open the waterd.bmp in your graphics program.

You will see a black and white image of the terrain.
Black (rgb 0,0,0) is water, White (rgb 255,255,255) is land.
RGB values less than 255.255.255 will be water depth.

Now you can paint your new shorelines.

Once finished, save it as an 8 bit greyscale BMP in your texsrc folder.

Open the Terrain Editor, goto file »import water bitmap.

Your edited water will now display.

-----------------------------------

Hint for smooth water depth from shore
- Select color range 255,255,255 - create a new layer and fill selection
with white. Duplicate this layer then blur it a few pixels to make a smooth
shallow transition in the water.
You can also smudge this layer to create shallow transitions in water.

-----------------------------------

After you have your land/water done it's time to do the terrain types.

Open your Waterd.bmp with graphics program

Open your gndtype.bmp with graphics program - convert to greyscale.

Copy and paste onto a new layer within the gndtype.bmp the waterd.bmp.
You will have to reduce the scale.

Select color range (255,255,255) on the resized color layer.

Now increase the selection size about 4 pixels.
(Select - modify - expand in photoshops)

Create a new layer and fill selection with rgb 170
(ntt0010 - or beach/sand)

Save gndtype.bmp as 8 bit greyscale in the terrain folder overwriting
the existing one.

Open your terrain in the editor - you should now see all sandy
terrain and water.

From here you can go back into your graphics program and fill out
the different types of terrain.

-----------------------------------

Water tricks tips.

Say you want to have some brown muddy lakes,
next to greenish river which flows into a blue sea.
The editor is set up to use wnttXXXX bmps, which are underwater textures
that correspond to the ground nttxxxx texture.

So wntt0001 would display wherever ntt0001 type turns into water.
Hence HTCs setup for ntt0012 being snow/coral.
When we draw ntt0012 on land it displays as snow...but when you put
water over it, it displays wntt0012 texture which is coral.

So if you want some brown ponds in your farm land, you could create
a wntt0003, and wntt0004 texture.

It's pretty much open to whatever you can think of.

Also, since these textures are underwater, they don't need to be large
textures, you can make them 256x256 or 128x128.

SETTINGS: Terrain Type Settings.

Here is where you can set up the names for your textures,
as well as change the base colors for ocean / river color.
There is also a "change selected color" button which allows you to change
the displayed color for the terrain type on low detailed settings.
You will find a "low detail" check box on the lower left to see what the
terrain will look like in low detail.
Easy in-game again.
Since Tour 19 - 2001

Offline bbosen

  • Silver Member
  • ****
  • Posts: 963
      • AskMisterWizard.com
Re: Been away from T.E. awhile; some conversion questions
« Reply #2 on: September 09, 2010, 05:30:47 AM »
Wow Easycor! What a response!

I'm sure glad I asked. You gave me a LOT of great direction. I can't say I totally understand it all, but I'll be using it to dig deeper into the process, and it sounds like most everything I will need is in your information. I can't thank you enough. It sounds like there's a fairly easy path forward in there somewhere....

Thanks again!

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10899
Re: Been away from T.E. awhile; some conversion questions
« Reply #3 on: September 09, 2010, 10:20:18 AM »
You are very welcome.
Easy in-game again.
Since Tour 19 - 2001