Author Topic: Terrain Editor  (Read 23874 times)

Offline hitech

  • Administrator
  • Administrator
  • *****
  • Posts: 12317
      • http://www.hitechcreations.com
Re: Terrain Editor
« Reply #195 on: October 16, 2015, 02:10:41 PM »
Thanks HT, I'll ignore the u1000 file then.

I get now that Black is 0 feet land and white is 0 feet water and shades of darker greys represent higher land and lighter greys deeper water.

A problem I am having is that when viewed in Photoshop the raw file's shades of grey seem to have a very low vertical resolution. I made a test terrain with a 5200 ft mountain and the mountain top has a grey shade value of only 13, fourteen shades lighter than sea level terrain, which works out to roughly 371 feet per change in shade of grey. This doesn't seem right as you can change the height to within a foot in the TE.

371 seems like a strange value, I would have thought it came out in 256 foot increments. I.E. work similar to an rgb value.

The issue your having with photo shop is why we gave up on the u1000. We had created it for photo shop.

HiTech

Offline Greebo

  • Skinner Team
  • Platinum Member
  • ******
  • Posts: 6925
Re: Terrain Editor
« Reply #196 on: October 16, 2015, 03:10:39 PM »
I got a more precise value for the top of the mountain at 5,335 feet, but that makes the vertical resolution 381 feet. As I don't know how close the mountain's height is to the nearest change in grey value, its only going to be a rough guide anyway. 14 lots of 256 feet makes 3,584 feet so its definitely not that though.


Oddly though, a 30,000 ft mountain I just made got a grey value of 117 which worked out to almost exactly 256 feet per grey shade. Definitely not showing more than 13 for the 5.3K mountain though.
« Last Edit: October 16, 2015, 03:22:20 PM by Greebo »

Offline Greebo

  • Skinner Team
  • Platinum Member
  • ******
  • Posts: 6925
Re: Terrain Editor
« Reply #197 on: October 16, 2015, 03:40:50 PM »
Made a series of big plateaus at different heights:

30,000 ft gives a grey of 117 (256.4 feet)
25,000 ft gives a grey of 97 (257.7 feet)
20,000 ft gives a grey of 77 (259.7 feet)
15,000 ft gives a grey of 56 (267.8 feet)
10,000 ft gives a grey of 34 (294.1 feet)
5,000 ft gives a grey of 11 (454.5 feet)
2,500 ft gives a grey of 4 (625 feet)

Even given the coarse resolution there seems to be a definite curving progression as altitudes decrease.

Offline hitech

  • Administrator
  • Administrator
  • *****
  • Posts: 12317
      • http://www.hitechcreations.com
Re: Terrain Editor
« Reply #198 on: October 16, 2015, 05:03:50 PM »
Made a series of big plateaus at different heights:

30,000 ft gives a grey of 117 (256.4 feet)
25,000 ft gives a grey of 97 (257.7 feet)
20,000 ft gives a grey of 77 (259.7 feet)
15,000 ft gives a grey of 56 (267.8 feet)
10,000 ft gives a grey of 34 (294.1 feet)
5,000 ft gives a grey of 11 (454.5 feet)
2,500 ft gives a grey of 4 (625 feet)

Even given the coarse resolution there seems to be a definite curving progression as altitudes decrease.

Almost as if there doing luminosity?

HiTech

Offline USRanger

  • AvA Staff Member
  • Plutonium Member
  • *******
  • Posts: 10325
      • BoP Home
Re: Terrain Editor
« Reply #199 on: October 16, 2015, 10:43:19 PM »
Made a series of big plateaus at different heights:

30,000 ft gives a grey of 117 (256.4 feet)
25,000 ft gives a grey of 97 (257.7 feet)
20,000 ft gives a grey of 77 (259.7 feet)
15,000 ft gives a grey of 56 (267.8 feet)
10,000 ft gives a grey of 34 (294.1 feet)
5,000 ft gives a grey of 11 (454.5 feet)
2,500 ft gives a grey of 4 (625 feet)

Even given the coarse resolution there seems to be a definite curving progression as altitudes decrease.

Yup
Axis vs Allies Staff Member
☩ JG11 Sonderstaffel ☩
Flying 'Black[Death] 10' ☩JG11☩

Only the Proud, Only the Strong Ne Desit Virtus

Offline Greebo

  • Skinner Team
  • Platinum Member
  • ******
  • Posts: 6925
Re: Terrain Editor
« Reply #200 on: October 17, 2015, 01:53:07 AM »
Almost as if there doing luminosity?

HiTech

I'm not sure what you mean by that. It seems to me that the routine that translates the height data into shades of grey is using an exponential rather than linear progression and is also using 8 bit rather than 16 bit values.

Offline mrmidi

  • Aces High CM Staff
  • Silver Member
  • ****
  • Posts: 1879
Re: Terrain Editor
« Reply #201 on: October 17, 2015, 08:54:40 AM »
oofff
In charge of nothing.
C.O. 29th TFT, "We Move Mountains"
It is what it is!

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10884
Re: Terrain Editor
« Reply #202 on: October 26, 2015, 09:05:46 AM »
Object Editor patch 79

The 'Current Shape' window was caged within the main window on this machine without a video card and unviewable.
I'm on the road and working on a Tablet-Laptop hybrid.

dxdiag and jpg included.
Easy in-game again.
Since Tour 19 - 2001

Offline 68falcon

  • Aces High CM Staff (Retired)
  • Platinum Member
  • ******
  • Posts: 6440
      • 68th Lightning Lancers
Re: Terrain Editor
« Reply #203 on: October 28, 2015, 02:14:36 PM »
Check terrain for errors showing cvtg has to many towers. There is a tower on the CV and a Tower on the Battle Ship
Commanding Officer
68th Lightning Lancers
Fear the Reaper no more. Fear the Lancers

Offline Greebo

  • Skinner Team
  • Platinum Member
  • ******
  • Posts: 6925
Re: Terrain Editor
« Reply #204 on: October 30, 2015, 05:15:55 AM »
I find working with the RAW images the TE now generates to be a bit of a pain. Photoshop Elements will load them but won't let me work with the file unless I convert it down to 8-bit and I can't see how to convert it back. Besides I don't like Photoshop and would rather work in Paint Shop Pro.

I see there are various image converting utilities that change RAW files to BMP or JPEG but these seem to be geared for the various camera formats of RAW (Canon etc). Is there a cheap image converter program that will change the TE's RAW files into BMP and back again?
 

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: Terrain Editor
« Reply #205 on: October 30, 2015, 11:58:50 PM »
I find working with the RAW images the TE now generates to be a bit of a pain. Photoshop Elements will load them but won't let me work with the file unless I convert it down to 8-bit and I can't see how to convert it back. Besides I don't like Photoshop and would rather work in Paint Shop Pro.

I see there are various image converting utilities that change RAW files to BMP or JPEG but these seem to be geared for the various camera formats of RAW (Canon etc). Is there a cheap image converter program that will change the TE's RAW files into BMP and back again?

I might be misunderstanding you but the .raw files are raw binary data, 16-bit signed integers to be exact, with no bitmap header, or any header at all.  It's not an image format at all.  The AH .raw format is not the same as the raw format from cameras.  If you wanted to edit them with a bitmap painting program you would need to find one that could handle extremely high resolution/high dynamic range color.  Normal bitmap programs either assume grayscale with 8 bits per pixel, i.e. 256 shades of gray, or as 24 bit color, which consists of 3 8-bit bytes, ie red, green, and blue (or 32-bit color which adds an 8-bit alpha, transparency, channel).   You'd have to find a bitmap paint program that would handle extreme dynamic range 16-bit grayscale.  Does that even exist?  If you use a program that wants to convert to 8-bit you're going to get garbage out of the .raw files as every other point is going to be taken from either the lower byte of the height or the higher byte.  I can't imagine any camera that digitizes at 16-bit resolution (65,536 levels of intensity) except maybe special astro cameras.

If you were able to write or find a program that converted AH .raw files to 8-bit grayscale then you would loose all the extra resolution in the altitude points of the terrain that AH3 added.  Instead of 32,768 possible heights above sea level that AH3 allows, you be left with only 256.  So you would be limited to altitudes below 256 feet or you'd have to write a special program to scale everything to the peak altitude (like AH2 used to do).

Why not use the program mentioned at the beginning of this thread?  Isn't it designed to edit terrains?

Forgive me if I am totally misunderstanding what you are trying to do (I've been known to do that).

Offline Greebo

  • Skinner Team
  • Platinum Member
  • ******
  • Posts: 6925
Re: Terrain Editor
« Reply #206 on: October 31, 2015, 03:12:06 AM »
I was thinking of making a new MA terrain. The way I like to do this is to create a to-scale field layout and height map in Paint Shop Pro. Its easier to get a fair layout of fields with them all the correct distances apart than trying to do it in the TE. The height map is built up in layers like a contour map, i.e one layer at sea level, one at 500 ft, one at 2,000 ft, one at 4,000 ft and so on. While this might seem a very time consuming way of doing it I use various tricks to reduce the time it takes. Once I am happy with the map I gaussian blur the layers and save the result as a grey scale image. Doing it this way I can create a precise layout of mountains and hills with valleys running exactly where I want and with flat areas around fields and SPs. I also use the file to create a temporary CBM for the TE with all the field and strat positions on shown on it, which makes it a lot quicker to place the 100s of objects.

I tried L3DT Pro briefly a while ago but I didn't have much luck with it, something I mentioned earlier in this thread. What I tried was importing a height map from my converted CraterMA terrain into it. It generated what looked like a very high plateau across the ocean areas with the land areas very low. I presume this has something to do with the water areas being much lighter in the file. I also ran through a few of the tutorials for the program to get a feel for how it works. It has a very low resolution map making screen where you can tell it you want a mountain range of a particular style somewhere around here, some hills about there, some water over there. Then you let it generate the terrain for you, which it does very well. However this map screen is nowhere near precise enough for what I want to do so I gave up on the program.

Thanks for your explanation 715, I understand things much better now. It seems though from what you are saying that I am going to be retiring from the map making business.


Offline Greebo

  • Skinner Team
  • Platinum Member
  • ******
  • Posts: 6925
Re: Terrain Editor
« Reply #207 on: October 31, 2015, 06:02:01 AM »
Thinking about it some more I do have a way round this. I can create a height map for the current TE and then use the new TE to convert that terrain over.

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: Terrain Editor
« Reply #208 on: October 31, 2015, 01:19:35 PM »
I looked more carefully and came up with this from the GIMP FAQ:

Quote: For some industries, especially photography, 24-bit colour depths (8 bits per channel) are a real barrier to entry. Once again, it's GEGL to the rescue. Work on integrating GEGL into GIMP began after 2.4 was released, and will span across several stable releases. This work will be completed in GIMP 3.0, which will have full support for high bit depths. If you need such support now and can't wait, cinepaint and Krita support 16 bits per channel now.

The current development branch, GIMP 2.9.x, supports higher bit depths than the 2.8 and older 8-Bit-per-component...

http://www.gimp.org/docs/userfaq.html#c16bit     (use search on "16-bit" to scroll down to 16-bit section)

So there are graphics programs that will support 16-bits per channel (GIMP is a free image editing program available for Linux, Windows, and Macs).  I don't know about cinepaint and Krita but they apparently support 16-bits per channel now.  You would then only need a program that inter-converts AH3 .raw into whatever standard hicolor format is used.

However, your plan of using the old TE to create the terrain and then having the new TE convert it will probably work better for you.  (I assume the new TE interpolates the old terrains smoothly?)

Offline Greebo

  • Skinner Team
  • Platinum Member
  • ******
  • Posts: 6925
Re: Terrain Editor
« Reply #209 on: October 31, 2015, 01:36:51 PM »
(I assume the new TE interpolates the old terrains smoothly?)

It is not ideal as the old height map is less detailed, the vertical resolution is about 60 feet and it is not possible to alter the water depth. However it will do as a backup plan. I didn't want to start serious work on a terrain until I knew I could use the height map and this method will do a reasonable job.

Thanks, I never thought of Gimp. I'll give it a go. Come to think of it I am not even using the latest version of Paint Shop Pro, I'll have to check that out too.