Terrain Textures
-
effigy
- Regular

- Posts: 1217
- Joined: 22 Jan 2010, 03:21
Re: Terrain Textures
Can we not just detect a cliff and add a rule to disable terrain blending when a cliff and normal ground share a least 2 verticies (or something like that)?
This is why some features aren't implemented: http://forums.wz2100.net/viewtopic.php?f=30&t=7490&view=unread#p87241
-
Jorzi
- Regular

- Posts: 2063
- Joined: 11 Apr 2010, 00:14
Re: Terrain Textures
I don't really think you would want sharp edges. Really it looks about as bad as non-tiling textures. What we want is simply a steeper gradient for cliffs. Part of the problem is of course that textures are assigned to the upper left vertex of the face instead of the face itself. Otherwise it probably wouldn't be too hard to add something like this:
You do not have the required permissions to view the files attached to this post.


-insert deep philosophical statement here-
-
i-NoD
- Code contributor

- Posts: 318
- Joined: 30 Nov 2008, 00:42
- Location: In the middle of nowhere
Re: Terrain Textures
That would require separating blended tiles into distinct terrain renderer path. Like drawing all single layered tiles as is with current renderer, and then draw with blend all mixed tiles with additional mask texture. One would need an algorithm to map all blending combinations to maps and masks, thus giving tile mid-tile shape a correct texture coordinates to mask texture.Flail13 wrote:how difficult would it be to use per-tile alpha masks on the texture blending?
If my math didn't rot completely, given 4 blend controlling vertices in a mid-tile shape we'd get 16 possible combinations, dropping 2 dead cases like all filled or none all that left are 4* types of: straight cases(two adjacent corners filled in fact), single filled corner cases, triple corner filled cases (invert of previous one) and two opposite filled corners, so with tex coords rotations algorithm you'll need 4 mask per layer (and there are 7 layers on Arizona tilset and 10 on other two). All masks for a single layer (at least) should reside on a single texture for speed consideration. Depending on maximum texture size allowed on gpu, this might end in not so smooth transitions as in current interpolation system...
PS
Obviously there will be no variations on mask for a single layer, and they must be tileable.
-
effigy
- Regular

- Posts: 1217
- Joined: 22 Jan 2010, 03:21
Re: Terrain Textures
I was discussing this with Berg earlier in IRC, and arrived to the same conclusion (blending needs to be reduced at cliffs, not removed)Jorzi wrote:I don't really think you would want sharp edges. Really it looks about as bad as non-tiling textures. What we want is simply a steeper gradient for cliffs. Part of the problem is of course that textures are assigned to the upper left vertex of the face instead of the face itself. Otherwise it probably wouldn't be too hard to add something like this:
We chatted a bit further about a solution, but it seems we were making assumptions. The appearance is that cliff tiles get blended over normal terrain. Could that be changed to do the opposite?
This is why some features aren't implemented: http://forums.wz2100.net/viewtopic.php?f=30&t=7490&view=unread#p87241
-
Jorzi
- Regular

- Posts: 2063
- Joined: 11 Apr 2010, 00:14
Re: Terrain Textures
By saying "blended over" I assume you mean it fills the whole tile and produces gradients on neighbouring tiles. This is not the case, however. In fact, the current mapping is quite wrong and not good for cliffs at all:

See http://developer.wz2100.net/wiki/MappingTips for more information.
As you can see, the texture isn't really assigned to the tile but to its upper left vertex. This can be easily accounted for when painting ground textures but isn't suitable at all for one-tile-wide cliffs.

See http://developer.wz2100.net/wiki/MappingTips for more information.
As you can see, the texture isn't really assigned to the tile but to its upper left vertex. This can be easily accounted for when painting ground textures but isn't suitable at all for one-tile-wide cliffs.


-insert deep philosophical statement here-
-
effigy
- Regular

- Posts: 1217
- Joined: 22 Jan 2010, 03:21
Re: Terrain Textures
I thought that the problem with cliffs was that it was impossible to have 1 tile wide passages that don't look like cliffs (eg, any passageway is narrower than it should be).
This is why some features aren't implemented: http://forums.wz2100.net/viewtopic.php?f=30&t=7490&view=unread#p87241
-
Jorzi
- Regular

- Posts: 2063
- Joined: 11 Apr 2010, 00:14
Re: Terrain Textures
Ok, in that case, it probably is as you say (i.e. cliffs have been programmed to cover one extra tile of width to compensate for mentioned problem). However, if you would make it the other way, 1-tile wide cliffs wouldn't be visible instead...


-insert deep philosophical statement here-
-
i-NoD
- Code contributor

- Posts: 318
- Joined: 30 Nov 2008, 00:42
- Location: In the middle of nowhere
Re: Terrain Textures
That passage about exact bound cliffs is a mystery to me...
Usually one can consult directly with code. I can see water vs terrain, but terrain case doesn't directly distinguish cliff vs anything other, its just a blended layer as anything else.
If you compare 2.3 vs 3.1/master you can see that cliffs are blended with flat ground in 3.1/master and mountains with one terrain tile between two cliffs are totally blended to cliffs. But it doesnt have to represent actual impassibility state due to such blending. Even if there is a buried deep enough logic for cliffs it will not hinder to use masks on this abstraction level.
Usually one can consult directly with code. I can see water vs terrain, but terrain case doesn't directly distinguish cliff vs anything other, its just a blended layer as anything else.
If you compare 2.3 vs 3.1/master you can see that cliffs are blended with flat ground in 3.1/master and mountains with one terrain tile between two cliffs are totally blended to cliffs. But it doesnt have to represent actual impassibility state due to such blending. Even if there is a buried deep enough logic for cliffs it will not hinder to use masks on this abstraction level.
You do not have the required permissions to view the files attached to this post.
-
effigy
- Regular

- Posts: 1217
- Joined: 22 Jan 2010, 03:21
Re: Terrain Textures
I don't see anything wrong with sample 1, but in sample 2 you've captured a place where plateaus are ambiguous.
This is why some features aren't implemented: http://forums.wz2100.net/viewtopic.php?f=30&t=7490&view=unread#p87241
-
Berg
- Regular

- Posts: 2204
- Joined: 02 Sep 2007, 23:25
- Location: Australia
Re: Terrain Textures
viewtopic.php?f=6&t=2379&hilit=terrain+blending#p23075
cliff seem to have a sharper edge here download/file.php?id=2656&mode=view
cliff seem to have a sharper edge here download/file.php?id=2656&mode=view
-
aubergine
- Professional

- Posts: 3462
- Joined: 10 Oct 2010, 00:58
Re: Terrain Textures
zOMG! The screenies in that topic look amazing!! (ok, some of the cliff textures are a bit weird, but overall it looks better than current 3.1 releases IMHO)Berg wrote:viewtopic.php?f=6&t=2379&hilit=terrain+blending#p23075
cliff seem to have a sharper edge here download/file.php?id=2656&mode=view
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
-
Berg
- Regular

- Posts: 2204
- Joined: 02 Sep 2007, 23:25
- Location: Australia
Re: Terrain Textures
That was the beginning of the terrain blending so read on and see what was done.
The tiles get lots better I think the best was done in trunk 3.0 but thats just my opinion.
The tiles get lots better I think the best was done in trunk 3.0 but thats just my opinion.
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
Re: Terrain Textures
They were changed to what we have now because 1. they seem to go too far from the original game's atmosphere and 2. arizona was too undeveloped in that texture set (just a uniform red sand instead of red/yellow/brown sand etc). There was a vote, and current textures had something around 60:30 win. P.S. Not sure if you noticed, but you see these textures all the time in this website's header (:aubergine wrote:zOMG! The screenies in that topic look amazing!! (ok, some of the cliff textures are a bit weird, but overall it looks better than current 3.1 releases IMHO)Berg wrote:viewtopic.php?f=6&t=2379&hilit=terrain+blending#p23075
cliff seem to have a sharper edge here download/file.php?id=2656&mode=view
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
-
JDW
- Regular

- Posts: 1669
- Joined: 18 May 2010, 20:44
Re: Terrain Textures
I had voted for Gerards textures. Too bad we could not have them both somehow.
"Speak when you are angry and you will make the best speech you will ever regret."
-- Ambrose Bierce
-- Ambrose Bierce
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
Re: Terrain Textures
I think it's not hard to substitute them locally.
It won't even affect multiplayer compatibility.
It won't even affect multiplayer compatibility.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam