Author Topic: Terrain Brushes  (Read 18371 times)

Offline White Claw

  • Hero Member
  • *****
  • Posts: 854
Terrain Brushes
« Reply #25 on: October 23, 2006, 08:14:07 PM »
That all makes sense. Looking at the transition sets, it almost looks like the developers had certain transitions in mind. Like several specific tiles were expected to be used at the same time. (As I believe you stated earlier.)

And the editor is very good from the little I've played with it. It's on par with the "unofficial" editor that comes with C&C.

 

Offline White Claw

  • Hero Member
  • *****
  • Posts: 854
Terrain Brushes
« Reply #26 on: October 23, 2006, 08:35:24 PM »
After looking at the tiles some more and reading your 18 Oct post about the 1/16 code, that seems like a good start, but what about divorcing the sides from eachother?

What I mean is, you'll actually end up with a 1/8 system.

Code: [Select]
--------------
|   e   f    |
|h         d |
|g         c |
|   a   b    |
--------------

So you look at each side, but only that side and not the neighboring side of that corner.

So your ambiguous sample (1/2 black and white) would look something like
black = (c, d, e, f), white = (a, b, h, g).

Again, you could use a bit code to impliment this and swap bytes to search for matches. The tile above looking for a right hand match would swap (c,d) for (g,h). Then look for a tile that has a (g, h) as well as whatever attributes already exist at the right hand tile.
« Last Edit: October 23, 2006, 08:40:18 PM by White Claw »

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Terrain Brushes
« Reply #27 on: October 23, 2006, 09:03:38 PM »
Well, not sure if I was very clear but I moved away from the 1/16ths system after I was dissatisfied with the matching quality.

I switched to a system where each tile has 2 terrains, and 4 values for each edge indicating the percentage of the first terrain to the total going from upperleft -> bottom right. (In the case that the first terrain is on the right / bottom part of the edge, you can use a negative value).

Thus the black/white example becomes (if I use terrain1, terrain2, N, S, W, E for the format):

B,W,100,0,0,100

That still doesn't give great results (because some of the tiles have to go together like we said).

So the real issue is, we need to find a way to account for this in code. Perhaps 'groups' of some sort that specify "A is a valid transition but only with B to the right of it," that sort of thing.
« Last Edit: October 23, 2006, 09:04:27 PM by op2hacker »

Offline White Claw

  • Hero Member
  • *****
  • Posts: 854
Terrain Brushes
« Reply #28 on: October 24, 2006, 07:54:38 AM »
You did explain yourself earlier. I was trying to show a slightly different approach. (edge b and c can have different values even though they are on the same corner) Either way, you accomplish the same thing with your ratios (especially when you create discrete ratios 0, 25, 50 and so on).

In any case, you will have to have a translation table containing the attributes since OP2 doesn't use fixed sets. (Which was something I didn't know before.)