Terrain Textures

Improving the artwork in Warzone2100 - not for mod discussions
User avatar
MaNGusT
Art contributor
Posts: 1154
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Terrain Textures

Post by MaNGusT »

Image
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland

Re: Terrain Textures

Post by Emdek »

MaNGusT, now find someone to volunteer to write OpenGL 4 renderer (or at least someone to make rendering more abstract). ;-)
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
Flail13
Code contributor
Code contributor
Posts: 263
Joined: 16 May 2008, 12:00

Re: Terrain Textures

Post by Flail13 »

how difficult would it be to use per-tile alpha masks on the texture blending?

for example this:
normal.png
could be something like this:
mask.png
You do not have the required permissions to view the files attached to this post.
User avatar
MaNGusT
Art contributor
Posts: 1154
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Terrain Textures

Post by MaNGusT »

Flail13 wrote:how difficult would it be to use per-tile alpha masks on the texture blending?
mask itself is not too difficult to make. dk about code.
But as far as I understand, you are talking about textures transition, currently it is too wide. I suggested a long time ago to decrease it, but as always no one listened me.
Image
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Terrain Textures

Post by NoQ »

per-tile alpha masks
Doesn't it bring us back to the old renderer? We would need to either automatically set up all these transitions, which is impossible for an arbitrary mess of colors, or rely on the map tile hints, which will be the same as 2.3 with better textures.
User avatar
Flail13
Code contributor
Code contributor
Posts: 263
Joined: 16 May 2008, 12:00

Re: Terrain Textures

Post by Flail13 »

NoQ, like you said, it's impossible to create all the possible transitions, which also rules out 2.3-like fixed tilesets for this.

Trying to think of an acutal method myself:
- leave the 512x512 texture files as they are.
- create different types of 128x128 alpha masks for different tiles and appearances eg: straight/corners & straight-narrow-transition/wide-jagged-transition
- specify them for each tile with an orientation in the map file
Upon starting a game:
- split the 512x512 textures into 128x128 tiles (no alternate orientations)
- scan the map for each combination of mask-orientation and terrain textures that is *actually used*
- pre-combine only those tile transitions in the graphics card (dont know how consuming this is)
- draw the pre-combined textures onto each tile
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland

Re: Terrain Textures

Post by Emdek »

I like possibility to use such things (would be best for blending for my terrain models idea for cliffs), but personally I like look of current transitions better, as it doesn't create sharp edges between colors (which looks unnatural).
BTW, we already have tiles that needs to be blended (craters, roads etc.), alpha channel use would make it look better.
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
Flail13
Code contributor
Code contributor
Posts: 263
Joined: 16 May 2008, 12:00

Re: Terrain Textures

Post by Flail13 »

I understand my example doesn't look like anything in particular. It could be made to look like bushes or a straight edge for concrete, for example. I looked on Google Maps satellite and Arizona doesn't seem blurry.
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland

Re: Terrain Textures

Post by Emdek »

Flail13, sure, but this is not simulation. ;-)
And previous textures compared to current look weak (at least on some maps).
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Terrain Textures

Post by NoQ »

Emdek wrote:I like possibility to use such things (would be best for blending for my terrain models idea for cliffs), but personally I like look of current transitions better, as it doesn't create sharp edges between colors (which looks unnatural).
But the whole talk is about the fact that we do need sharp edges!
Maybe not between different ground colors, but we need sharp edges at least for separating cliffs from ground, because it's often hard to say where you can go and where you can't go.
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland

Re: Terrain Textures

Post by Emdek »

NoQ, yes, for things like tiles or cliffs we need, and we have (ale least sharp enough for me).
For cliffs (including marking as not passable) check my topic in Ideas and Suggestions. ;-)
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Terrain Textures

Post by Jorzi »

Per-tile alpha masks is not a bad idea imo. All that would be needed is a few straight and a few L-shaped masks. These could then be inverted or rotated as suitable. We would of course need a way to choose random gradients to prevent ugly tiling, as well as automated detection of a number of cases.
ImageImage
-insert deep philosophical statement here-
User avatar
effigy
Regular
Regular
Posts: 1217
Joined: 22 Jan 2010, 03:21

Re: Terrain Textures

Post by effigy »

NoQ wrote:
Emdek wrote:I like possibility to use such things (would be best for blending for my terrain models idea for cliffs), but personally I like look of current transitions better, as it doesn't create sharp edges between colors (which looks unnatural).
But the whole talk is about the fact that we do need sharp edges!
Maybe not between different ground colors, but we need sharp edges at least for separating cliffs from ground, because it's often hard to say where you can go and where you can't go.
+1

Also, I miss the way 2.3 transitioned to water.
This is why some features aren't implemented: http://forums.wz2100.net/viewtopic.php?f=30&t=7490&view=unread#p87241
User avatar
MaNGusT
Art contributor
Posts: 1154
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Terrain Textures

Post by MaNGusT »

a possible solution for cliffs transition is to convert a map into mesh(in gpu?!) then allocate cliffs by angle and make hard edges via smooth groups
Image
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland

Re: Terrain Textures

Post by Emdek »

MaNGusT, yeah, seems like technical implementation of what I've posted elsewhere. :-)
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.