Author Topic: makeahmap Alpha for AH3 terrain editor  (Read 2227 times)

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10884
Re: makeahmap Alpha for AH3 terrain editor
« Reply #15 on: May 08, 2016, 11:25:28 AM »
btw, it's almost trivial to mix and match the existing ground types so long as you keep them in the same Atlas by size. If you like ETO's Rock better then MED's it takes only a few minutes work to build a frankinstine set.

It's creating artik's 3D(?) urban ground tile that would be a problem imo because we don't have enough variation in speedtree buildings and I'm unsure whether it might kill frame rates. USRanger or Greebo could probably create a semi realistic urban tile using textures and bump mapping but they are tile and skinning gods.
Easy in-game again.
Since Tour 19 - 2001

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: makeahmap Alpha for AH3 terrain editor
« Reply #16 on: May 08, 2016, 11:51:23 AM »
btw, it's almost trivial to mix and match the existing ground types so long as you keep them in the same Atlas by size. If you like ETO's Rock better then MED's it takes only a few minutes work to build a frankinstine set.


So you're saying it would be easy to just reorder the existing European set into a different order to try to reduce banding when using GlobCover data?  I'll have to ask you how to do that if my analysis shows that a reordering would reduce banding enough to be worthwhile.

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10884
Re: makeahmap Alpha for AH3 terrain editor
« Reply #17 on: May 08, 2016, 01:55:36 PM »
I fear I have forgotten to check on the speedtree objects. Although the textures can be reassigned easily, it might be necessary to build your own object files until htc releases the final versions. I haven't checked to see if the object files are available in the latest release.
Easy in-game again.
Since Tour 19 - 2001

Offline hitech

  • Administrator
  • Administrator
  • *****
  • Posts: 12320
      • http://www.hitechcreations.com
Re: makeahmap Alpha for AH3 terrain editor
« Reply #18 on: May 08, 2016, 06:34:27 PM »
Simply edit the atlas zero and Atlas one. Text files

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10884
Re: makeahmap Alpha for AH3 terrain editor
« Reply #19 on: May 08, 2016, 06:42:13 PM »
Will the trees and building carry over in that scenario? I've been a bit busy the last two months and I don't remember checking.
Easy in-game again.
Since Tour 19 - 2001

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: makeahmap Alpha for AH3 terrain editor
« Reply #20 on: May 08, 2016, 08:22:31 PM »
Turns out reordering the tiles doesn't really help much; reducing banding in one area increases it in another.  Best I could do is reduce it from 2.7% to about 2%.  (That number is the percentage of neighbors of texture pixels that differ from the center one by more than 1 in the index, and would therefore cause some amount of banding.)  I might still try it to try reduce banding in the Alps.

Of course I didn't use a very sophisticated optimization routine; I just looked for the pair with the most likelihood and swapped it with the index-1 and then just kept iterating.  Someone with more clever mathematics might be able to get a larger decrease.

Offline hitech

  • Administrator
  • Administrator
  • *****
  • Posts: 12320
      • http://www.hitechcreations.com
Re: makeahmap Alpha for AH3 terrain editor
« Reply #21 on: May 09, 2016, 08:27:18 AM »
715: I assume you also know how to deband by going small tile ,big tile x2, then back to small tile?

HiTech

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: makeahmap Alpha for AH3 terrain editor
« Reply #22 on: May 09, 2016, 10:16:01 AM »
715: I assume you also know how to deband by going small tile ,big tile x2, then back to small tile?

HiTech
.

Yes, but that isn't a good solution for mountains.  All the big tiles are farmland with roads which won't look good on mountainsides. I suppose I could make one custom generic mountain like big tile for that use.  Or perhaps reorder the top tiles to better match Globcover in the mountains and use the big tile trick at lower elevations. However, the big tile trick will significantly reduce resolution as a one pixel transition gets turned into three.

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10884
Re: makeahmap Alpha for AH3 terrain editor
« Reply #23 on: May 09, 2016, 01:03:27 PM »
From the manual:

Quote
The Keep Current Merge Type Check Box:
This tool can force a blend that eliminates the texture banding clash between two textures that are placed "out of the type sequence."

Study the image on the left to see the tool's resulting application.

The Red Type is Atlas 0 Type 0 and the other is Atlas 0 Type 15. Without adjustment, there are normally 14 intervening bands of texture between these two types.

By using the Merge tool and selecting Atlas 1 Type 16, you'll achieve the best blend by painting over the two banding rows. However, if you choose Atlas 1 Type 19, the three Atlas 1 bands, 15 to 18 will show.
(The RGB values are provided for Splat Maps.) 

...


Yes, I agree Atlas 1 Type 16 might be more useful if it were a neutral tile rather then the Farm Mosaic.
Easy in-game again.
Since Tour 19 - 2001

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: makeahmap Alpha for AH3 terrain editor
« Reply #24 on: May 09, 2016, 02:57:44 PM »
Does it have to be two big tiles between two small ones or will one do the trick?

Offline hitech

  • Administrator
  • Administrator
  • *****
  • Posts: 12320
      • http://www.hitechcreations.com
Re: makeahmap Alpha for AH3 terrain editor
« Reply #25 on: May 09, 2016, 03:30:05 PM »
Does it have to be two big tiles between two small ones or will one do the trick?

Two,  because the remissive small type needs to change under the domination big type.
B is big S is small

so you will have S1  BS1 BS2 S2

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: makeahmap Alpha for AH3 terrain editor
« Reply #26 on: May 09, 2016, 06:56:10 PM »
OK, I didn't understand that, so there's a good chance I don't know what I'm doing.  When I export the SplatType.bmp if the pixel uses a big tile (Green channel) then I just set the Red channel to zero and Blue channel to 255.  Is the Red channel supposed to have something there in that case, say the last used small tile value? 

Offline hitech

  • Administrator
  • Administrator
  • *****
  • Posts: 12320
      • http://www.hitechcreations.com
Re: makeahmap Alpha for AH3 terrain editor
« Reply #27 on: May 10, 2016, 09:44:02 AM »
OK, I didn't understand that, so there's a good chance I don't know what I'm doing.  When I export the SplatType.bmp if the pixel uses a big tile (Green channel) then I just set the Red channel to zero and Blue channel to 255.  Is the Red channel supposed to have something there in that case, say the last used small tile value?

as the shaders sample the splat texture the system does a linear interplate between the samples based on the pixel position it is drawing.

Consider the following 2 pixels and all the pixels in between.
Left side is on vertex 0 right side is on vertex 1
R is small type
G is big type
B is the blend factor


0            0.25      0.5    0.75       1.0
R 255     255        255    255      255
G 0         64         128    192      255
B 255     192        128     64       0

With these 2 pixels at 0.25 it would be mixing 75% of small type 15 with big type 25% big type  2 (small 0 - 15 & big 0 - 3)
so if you want a clean transition you need it set up with both big an small the same on both pixels and only the G channel changing

R 255     255         255    255      255
G 0         64          128    192      255
B 255     255         255    255       255

Now it will always be mixing small type 15 and big type 3 and the transition will be smooth.

This is not something I specifically do , it is how shaders work when sampling between pixels.

HiTech

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: makeahmap Alpha for AH3 terrain editor
« Reply #28 on: May 10, 2016, 12:20:54 PM »
OK, thanks.  I don't have a clue how I'm going to program that, especially in 2D, but I'll think of something (that'll probably be wrong ;) )

Offline artik

  • Silver Member
  • ****
  • Posts: 1907
      • Blog
Re: makeahmap Alpha for AH3 terrain editor
« Reply #29 on: May 16, 2016, 07:54:29 AM »
OK,  of discovered a major issue with elevation map building and shoreline integration

I need to redesign this part otherwise all shores will look badly

Back to keyboard, the globcober will wait (also initial globcober model is working)
Artik, 101 "Red" Squadron, Israel