Jump to content

Recommended Posts

Oh, OK. I assumed the game had a single large mask for the entire map, not a "patchwork quilt" as evidently is the case. My dithering idea was a way to get more natural looking transitions out of the same resolution blending texture, were the map to use one single mask.

Link to post
Share on other sites
  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Here is an interesting article about texture blending : http://www.gamasutra.com/blogs/AndreyMishkinis/20130716/196339/Advanced_Terrain_Texture_Splatting.php The algorithm needs a dept map for each te

Posted Images

I don't think that is the right solution, unless we are talking about different things. What I am talking about are the jagged, zig-zagging artifacts that readily span more than 2x2 tiles:

OaANus.jpg BgjA0s.jpg

There's a ticket and few comments about it: http://trac.wildfire...et/45#comment:5 - If Philip says it can be improved, I'm inclined to believe him, since he implemented it ;)

That said, I don't see anyone lining up to create a new set of interlocking blend textures let alone modify the existing ones, and it's not exactly an intuitive process :) So I'd be happy if we find a better alternative. Anyone care to play around with the blend textures? binaries/data/mods/public/art/textures/terrain/alphamaps/standard/

Link to post
Share on other sites

There's a ticket and few comments about it: http://trac.wildfire...et/45#comment:5 - If Philip says it can be improved, I'm inclined to believe him, since he implemented it ;)

That said, I don't see anyone lining up to create a new set of interlocking blend textures let alone modify the existing ones, and it's not exactly an intuitive process :) So I'd be happy if we find a better alternative. Anyone care to play around with the blend textures? binaries/data/mods/public/art/textures/terrain/alphamaps/standard/

I think this is an art issue, not a programming one. If someone has the means - they should grab the terrain blends from AOM and throw them in the game to see if the issue is as noticeable. See here for a method on making another set of blends from scratch. http://trac.wildfire...t#TerrainBlends

Like Philip mentioned in the trac ticket, it would be good to have blends for different purposes, roads, sands, grasses, rocks... etc. That would also improve the look.

Atlas used to have the ability to turn on the grid lines on the map which would make it easier to pick out which blends need some improvement.

Link to post
Share on other sites

I think this is an art issue, not a programming one. If someone has the means - they should grab the terrain blends from AOM and throw them in the game to see if the issue is as noticeable. See here for a method on making another set of blends from scratch. http://trac.wildfire...t#TerrainBlends

Not sure how helpful that link is, since the info is outdated (it's mostly right on theory I guess).

Atlas used to have the ability to turn on the grid lines on the map which would make it easier to pick out which blends need some improvement.

Would Misc Hacks > Wireframe be enough?

Link to post
Share on other sites

This image is mostly right (the actual images were changed, but still look a lot like this):

image047.gif

The transition probably could be smoother. But I'm unsure they'll ever be perfect.

Edit: ah, actually, there's a few more now. But still, the problem remains: the gradient could be smoother for some textures.

Edited by wraitii
Link to post
Share on other sites

Playing around in Atlas, you can paint with the left mouse button or the right mouse button and get different results. You can make block like patches and more organic shaped patches, depending on how you paint. You should be able to smooth out some of those zig-zags in the beach screenshots, but I'm guessing that was from a random map?

post-3-0-70171100-1341859383_thumb.jpg

Link to post
Share on other sites

Playing around in Atlas, you can paint with the left mouse button or the right mouse button and get different results. You can make block like patches and more organic shaped patches, depending on how you paint. You should be able to smooth out some of those zig-zags in the beach screenshots, but I'm guessing that was from a random map?

No, it is from the 'Tropical Island' map.

Link to post
Share on other sites

If we store all the small alpha textures into a single, larger texture (with a predetermined x/y location for each blend type), each terrain xml could have an entry for a texture called "blendTex" that tells it what kind of blending to use. Basically, each terrain type could have its own blend textures. Really easy to implement, too.

Link to post
Share on other sites

If we store all the small alpha textures into a single, larger texture (with a predetermined x/y location for each blend type), each terrain xml could have an entry for a texture called "blendTex" that tells it what kind of blending to use. Basically, each terrain type could have its own blend textures. Really easy to implement, too.

Yeah, I think that would probably be the cleanest solution for the foreseeable future.

Link to post
Share on other sites

Done! Code: https://github.com/m...ee/terrainalpha

Anyone who wants to experiment can add new alpha maps using the UV layout of the default map (art/textures/terrain/alphamaps/blendtex.png) and then modifying the terrain xml and changing the "blendTex" entry.

Perhaps we can refactor it so instead a set of blend textures are specified per terrain XML and then the engine bakes the final blend map at runtime? That would make it less of a PITA for artists to add new blendings and would minimize the memory footprint of the blend map.

Link to post
Share on other sites

Perhaps we can refactor it so instead a set of blend textures are specified per terrain XML and then the engine bakes the final blend map at runtime? That would make it less of a PITA for artists to add new blendings and would minimize the memory footprint of the blend map.

That would be a PITA for the programmers, though. ;)

It doesn't save any memory (when many things use the same texture, it's automatically loaded only once).

Maybe we could have an external tool to combine the alphamaps to a texture.

Link to post
Share on other sites

PITA as in boring and trivial to implement or PITA as in bad programming?

From a coding perspective it's easy to add as we already have most of the code for it, but it feels messy to create a special case for something that doesn't really need it.

Link to post
Share on other sites

Of course that's just my opinion. I do see the usefulness of what you're suggesting and it's certainly an improvement from a usability point of view. You know what, I'll do it in a separate branch just to see how messy/not it turns out.

Link to post
Share on other sites

On a whole other note, I thought of another long-term/theoretical issue with terrain blending: multi-terrain blending. With the tile system, I believe only two materials/ground-types can be blended at a time. This probably isn't something many map makers have been dying for, but it seems still worth considering.

Hypothetically you could do 4 with RGBA each corresponding to a material. I'm not sure that would be the best approach though, for a four channel bitmap has lot of redundancy, for only the ratio between the various materials matters. For example (RGBA) 128,32,64,256 represents the same state as 4,1,2,8. "luminosity" doesn't matter. A simple solution would be to subtract the sum of all channels to get a 5th channel, but I don't know of what algorithms exist for blending stuff (in atlas or an image editor) with the assumption that all channels should add up to a fixed sum.

I feel kind of like a raving madman writing about such an odd missing feature, but hopefully that makes some sense.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...