Sonarpulse Posted July 7, 2012 Report Share Posted July 7, 2012 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. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted July 7, 2012 Report Share Posted July 7, 2012 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: 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/ Quote Link to comment Share on other sites More sharing options...
Wijitmaker Posted July 8, 2012 Report Share Posted July 8, 2012 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#TerrainBlendsLike 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. Quote Link to comment Share on other sites More sharing options...
Sonarpulse Posted July 8, 2012 Report Share Posted July 8, 2012 Is there a technical reason why a single map-wide mask would be inferior? Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted July 8, 2012 Report Share Posted July 8, 2012 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#TerrainBlendsNot 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? Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 8, 2012 Report Share Posted July 8, 2012 (edited) This image is mostly right (the actual images were changed, but still look a lot like this):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 July 8, 2012 by wraitii Quote Link to comment Share on other sites More sharing options...
Gen.Kenobi Posted July 9, 2012 Report Share Posted July 9, 2012 Too much awesomeness going on in the TechForums, specially with graphic tweaks... We should work into updating the ADD, so the relevant and updated info can be easily found. Quote Link to comment Share on other sites More sharing options...
Wijitmaker Posted July 9, 2012 Report Share Posted July 9, 2012 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? Quote Link to comment Share on other sites More sharing options...
zoot Posted July 9, 2012 Author Report Share Posted July 9, 2012 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. Quote Link to comment Share on other sites More sharing options...
Josh Posted July 9, 2012 Report Share Posted July 9, 2012 AoE's blend textures seem to work differently; here's thumbnails of the AoE 3 blend textures along with dimensions and names: Quote Link to comment Share on other sites More sharing options...
myconid Posted July 9, 2012 Report Share Posted July 9, 2012 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. Quote Link to comment Share on other sites More sharing options...
zoot Posted July 9, 2012 Author Report Share Posted July 9, 2012 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. Quote Link to comment Share on other sites More sharing options...
myconid Posted July 9, 2012 Report Share Posted July 9, 2012 Done! Code: https://github.com/myconid/0ad/tree/terrainalphaAnyone 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. Quote Link to comment Share on other sites More sharing options...
zoot Posted July 10, 2012 Author Report Share Posted July 10, 2012 Cool! Quote Link to comment Share on other sites More sharing options...
Wijitmaker Posted July 10, 2012 Report Share Posted July 10, 2012 Cool, though I'm guessing that it hasn't made it's way to SVN yet.https://github.com/myconid/0ad/blob/terrainalpha/binaries/data/mods/public/art/textures/terrain/alphamaps/blendtex.pngDoes it work using the alpha channel or the black/white levels of the RGB on the .png file? Quote Link to comment Share on other sites More sharing options...
zoot Posted July 10, 2012 Author Report Share Posted July 10, 2012 Done! Code: https://github.com/m...ee/terrainalphaAnyone 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. Quote Link to comment Share on other sites More sharing options...
myconid Posted July 10, 2012 Report Share Posted July 10, 2012 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. Quote Link to comment Share on other sites More sharing options...
zoot Posted July 10, 2012 Author Report Share Posted July 10, 2012 That would be a PITA for the programmers, though. PITA as in boring and trivial to implement or PITA as in bad programming? Quote Link to comment Share on other sites More sharing options...
myconid Posted July 10, 2012 Report Share Posted July 10, 2012 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. Quote Link to comment Share on other sites More sharing options...
zoot Posted July 10, 2012 Author Report Share Posted July 10, 2012 I see. Quote Link to comment Share on other sites More sharing options...
myconid Posted July 10, 2012 Report Share Posted July 10, 2012 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. Quote Link to comment Share on other sites More sharing options...
Sonarpulse Posted July 12, 2012 Report Share Posted July 12, 2012 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. Quote Link to comment Share on other sites More sharing options...
Wijitmaker Posted July 12, 2012 Report Share Posted July 12, 2012 I'm not certain how it works right now, but I think you can get 4 textures blended into one tile right now. See this pic. Quote Link to comment Share on other sites More sharing options...
Sonarpulse Posted July 13, 2012 Report Share Posted July 13, 2012 So at the point where multiple materials meet, are multiple tiles overlayed? Quote Link to comment Share on other sites More sharing options...
Wijitmaker Posted July 13, 2012 Report Share Posted July 13, 2012 I would assume so, but couldn't tell you for sure. Philip could tell you for sure, he was just making some improvements to the system 6 months ago. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.