Nescio Posted December 20, 2019 Report Share Posted December 20, 2019 On 8/24/2019 at 1:52 PM, Nescio said: 1:2 shapes, for cavalry, elephants, and traders: Reveal hidden contents 1:3 shapes, for completeness: Reveal hidden contents 1:4 shapes, for warships: Reveal hidden contents Some polygons I already added earlier: Reveal hidden contents Some polygrams in circles, perhaps useful for a magic mod: Reveal hidden contents @Alexandermb, @Stan`, @wowgetoffyourcellphone, are these selection overlays something you'd like to have available in the svn version? 256x256 circle (left) vs 128x512 ellipse (right), for comparison: Spoiler As you can see the current marker (left) is thin at the sides and thick at the front and end, whereas the new one (right) has an equal line thickness everywhere. 1 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted December 21, 2019 Report Share Posted December 21, 2019 Yep, throw them in. Quote Link to comment Share on other sites More sharing options...
Stan` Posted December 21, 2019 Report Share Posted December 21, 2019 @Nescio yep sounds good to me too We should use most of them, those we don't won't get in for now Quote Link to comment Share on other sites More sharing options...
Nescio Posted December 21, 2019 Author Report Share Posted December 21, 2019 14 minutes ago, Stan` said: @Nescio yep sounds good to me too We should use most of them, those we don't won't get in for now So which ones do you want specifically? I could create a patch on phabricator later or upload a zip here, whichever is easier for you. The source files are at https://github.com/0abc/0abc-a23/tree/master/art/textures/selection/svg_source Quote Link to comment Share on other sites More sharing options...
Stan` Posted December 21, 2019 Report Share Posted December 21, 2019 Well actually those it takes to remove the stretching And for the rest I'm open to ideas Quote Link to comment Share on other sites More sharing options...
Nescio Posted January 27, 2020 Author Report Share Posted January 27, 2020 Which selection shape do you think looks best for battering rams? Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 27, 2020 Report Share Posted January 27, 2020 I like the the third from the left 2 Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted May 10, 2020 Report Share Posted May 10, 2020 (edited) On 12/21/2019 at 7:45 PM, Nescio said: The source files are at https://github.com/0abc/0abc-a23/tree/master/art/textures/selection/svg_source Could you specify the parameter you used? And did you use some script or graphic programming language to make them? I would be interested by that, especially for the "non classic" shapes (not the circles and squares). Edited May 10, 2020 by fatherbushido Quote Link to comment Share on other sites More sharing options...
Nescio Posted May 10, 2020 Author Report Share Posted May 10, 2020 3 hours ago, fatherbushido said: Could you specify the parameter you used? And did you use some script or graphic programming language to make them? I would be interested by that, especially for the "non classic" shapes (not the circles and squares). No, graphical software is too difficult for me – I'm very much a text-based person – just open those files in a text editor. svg is basically xml, so it should be fairly self-explanatory. If you have further questions, feel free to ask. Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted May 10, 2020 Report Share Posted May 10, 2020 (edited) 20 minutes ago, Nescio said: No, graphical software is too difficult for me – I'm very much a text-based person – just open those files in a text editor. svg is basically xml, so it should be fairly self-explanatory. If you have further questions, feel free to ask. Oh I mean graphic programming language like TikZ, asymptote or things like that. But then I just noticed that svg is actually close to what I need. EDIT: yes that's what I needed Edited May 10, 2020 by fatherbushido Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted May 11, 2020 Report Share Posted May 11, 2020 (edited) 18 hours ago, fatherbushido said: Could you specify the parameter you used? Could you specify the outer stroke and inner stroke policy you used, I tried to figure that out from the svg files but I am not sure I deduced the right thing. (As the old ones were picked among the script generated ones many years ago, I could have a consistent way of doing that) Edited May 11, 2020 by fatherbushido too much "ed" Quote Link to comment Share on other sites More sharing options...
Nescio Posted May 11, 2020 Author Report Share Posted May 11, 2020 (edited) 9 hours ago, fatherbushido said: Could you specify the outer stroke and inner stroke policy you used, I tried to figure that out from the svg files but I am not sure I deduced the right thing. The <polygon> points lie on a circle with radius 1000 (or actually, they fit in a 2000×2000 square). For the inner line (the one that will show up in player colour) I used a stroke-width of 100; to make it look good on all terrains, it needs to be surrounded by white; for this I used a stroke-width of 150; this results in a 1:4:1 white:colour:white line. <g transform="translate(128 128) scale(0.1 0.1)"> The translate because svg positions are by default relative to the top left corner, and I find it easier to visualize them calculating from the centre (all selection textures are symmetrical). The scale is necessary to fit everything within 256×256. I suppose I could have used a circle with radius 1, stroke-wirdth of 0.1, and scale(100, 100) instead. I didn't, because I slightly prefer integers over decimals, and because in my experience things look better scaled down than scaled up. Now, the above applies to generating the 256×256 png; for the 128×128 png output, double the line thicknesses. For the *_mask.png, comment the first <g> and uncomment the last <g>. [EDIT] The <rect> (rectangle, rounded rectangle, cartouche) and <ellipse> shapes are not scaled and use a stroke-width of 10, which is the same as 100 scaled by 0.1, or 200 by 0.05. Edited May 11, 2020 by Nescio <rect> 1 Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted May 14, 2020 Report Share Posted May 14, 2020 (edited) Thanks for the detailed explanations! I don't know if there was a specific 0 A. D. Empires Ascendant topic about those textures, in that case, my post should be moved in that place. Quote 1:4:1 white:colour:white line. If I remember correctly it was planed to use 1:2:1, which has probably changed meanwhile. Anyway what matters is to have a consistent numbers with pleasant visual, that's why I refer to you (and others). Just to understand, I looked at WFG svn (I looked only at the easy case, circles). r11623 introduced the scripted generated textures 32x32 64x64 128x128 (Ideally we should have one quad overlay texture by footprint shape and size) r11628 replaced the 128x128 and introduced the 256x256 r13759 introduced the 512x512 r23636 replaced the 128x128 and 256x256 I will post the images in the next post as the forum is (or I am) bugged. Edited May 14, 2020 by fatherbushido 1 Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted May 14, 2020 Report Share Posted May 14, 2020 1 Quote Link to comment Share on other sites More sharing options...
Nescio Posted May 14, 2020 Author Report Share Posted May 14, 2020 10 hours ago, fatherbushido said: Just to understand, I looked at WFG svn (I looked only at the easy case, circles). r11623 introduced the scripted generated textures 32x32 64x64 128x128 (Ideally we should have one quad overlay texture by footprint shape and size) r11628 replaced the 128x128 and introduced the 256x256 r13759 introduced the 512x512 r23636 replaced the 128x128 and 256x256 rP23636 (redid existing shapes to ensure uniform line thickness) and rP23638 (new 128x256 and 128x512 shapes for units with oblong footprints) are split off from D2503, you might want to have a look at that. Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted May 15, 2020 Report Share Posted May 15, 2020 Thanks for the refs! So not all D2503 had been commited in WFG svn? Back to the circle, the current WFG svn state is messy, isn't it? Also I still don't understand what is the desired scaling for inner stroke and outer stroke (just for the circle). Also do you know what is the game unit proper equivalent in pixel? I asked all that because I just printed a table with a lot of numbers and I would like how to include your new textures in a well thought way. Quote Link to comment Share on other sites More sharing options...
Nescio Posted May 15, 2020 Author Report Share Posted May 15, 2020 56 minutes ago, fatherbushido said: Thanks for the refs! So not all D2503 had been commited in WFG svn? No, not yet; it probably will when @Stan` has sufficient time to finish the review. 23636 and 23638 were split off in order to preserve the file history and because phabricator sometimes has trouble with png files. 53 minutes ago, fatherbushido said: Back to the circle, the current WFG svn state is messy, isn't it? Yes, it is. Currently the 32x32 and 64x64 are unused, the 128x128 is used for infantry etc., the 256x256 for units with larger footprints, and the 512x512 for the whale. The problem is that most units have oblong footprints. It's especially notable for animals, where about half use the 128x128 circle and half 256x256. With D2503 the situation will be much simpler: selection textures grouped as {size}/{shape} instead of {shape}/{size}, because many more shapes are conceivable, but more sizes are unnecessary 256x256 used by units with a large circular or approximately 1:1 footprint (e.g. war elephant, siege tower) 128x512 used by units with an approximately 1:4 footprint (e.g. warships, whales) 128x256 used by units with an approximately 1:2 footprint (e.g. animals, cavalry, traders) 128x128 used by units with a small circular footprint (e.g. infantry, healers) 1 hour ago, fatherbushido said: Also do you know what is the game unit proper equivalent in pixel? No, I don't, nor do I think it's worth knowing. What matters is that the selection texture has a sufficiently high resolution so one wouldn't be able to identify individual pixels when maximally zooming in. I believe 128 is sufficiently wide for all units. The line thickness of the 128x128 is relatively twice as wide as that of the 256x256, to make the selection marker for units with small footprints stand out more. The 128x256 and 128x512 shapes are added to ensure footprints are no longer much narrower at the left and right than at the front and back: On 12/20/2019 at 10:17 PM, Nescio said: 256x256 circle (left) vs 128x512 ellipse (right), for comparison: Reveal hidden contents As you can see the current marker (left) is thin at the sides and thick at the front and end, whereas the new one (right) has an equal line thickness everywhere. Smaller and larger sizes (e.g. 64x64, 512x512) don't really serve a purpose. No units have oblong footprints beyond 1:4, so adding even narrower textures (e.g. 128x1024) is unnecessary as well. Image dimensions have to be powers of 2, that's why no sizes in between (e.g. 128x384) are added. 1 Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted May 17, 2020 Report Share Posted May 17, 2020 I didn't take the time to respond because I am a bit busy, but I still would like your input (later). Meanwhile, I don't know if you had the numbers for the quad textures, here are some (animals are missing). Column1: radius, Column2: width, Column3: depth, Column4: texture 1.5 NaN NaN arrow/128x128.png 2.5 NaN NaN arrow/256x256.png 3.0 NaN NaN arrow/256x256.png 3.5 NaN NaN arrow/256x256.png NaN 10.0 5.50 arrow/256x256.png NaN 10.0 10.00 arrow/256x256.png NaN 15.0 7.50 arrow/256x256.png NaN 16.0 8.00 arrow/256x256.png 1.5 NaN NaN circle/128x128.png 2.0 NaN NaN circle/128x128.png 4.0 NaN NaN circle/128x128.png NaN 6.0 4.00 circle/128x128.png NaN 8.0 4.00 circle/128x128.png NaN 12.0 5.00 circle/128x128.png NaN 12.0 8.00 circle/128x128.png NaN 9.0 6.75 circle/128x128.png NaN 15.0 7.00 circle/128x128.png NaN 10.0 6.75 circle/128x128.png NaN 20.0 6.00 circle/128x128.png 3.5 NaN NaN circle/256x256.png 4.0 NaN NaN circle/256x256.png NaN 48.0 12.00 circle/256x256.png NaN 12.0 5.00 circle/256x256.png NaN 40.0 10.00 circle/256x256.png NaN 24.0 8.00 circle/256x256.png NaN 10.0 4.00 circle/256x256.png NaN 33.0 8.00 circle/256x256.png NaN 37.0 7.00 circle/256x256.png NaN 42.0 9.00 circle/256x256.png NaN 31.0 8.00 circle/256x256.png NaN 17.0 7.00 circle/256x256.png NaN 5.0 5.00 circle/256x256.png NaN 24.0 12.00 circle/256x256.png NaN 15.0 15.00 circle/256x256.png NaN 43.0 10.00 circle/256x256.png NaN 28.0 12.00 circle/256x256.png NaN 45.0 17.00 circle/256x256.png NaN 36.0 12.00 circle/256x256.png NaN 28.0 8.00 circle/256x256.png NaN 25.0 6.00 circle/256x256.png 1.5 NaN NaN plus/128x128.png NaN 10.0 10.00 square/256x256.png NaN 15.0 6.00 square/256x256.png NaN 15.0 9.00 square/256x256.png 1.5 NaN NaN star/256x256.png 2.5 NaN NaN star/256x256.png 3.0 NaN NaN star/256x256.png NaN 9.0 4.50 star/256x256.png NaN 12.0 6.00 star/256x256.png Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted May 18, 2020 Report Share Posted May 18, 2020 (edited) from left to right footprint: 1.5, texture: arrow_128x128 footprint: 1.5, texture: arrow_256x256 footprint: 2.5, texture: arrow_128x128 footprint: 2.5, texture: arrow_256x256 from left to right footprint: 2.5, texture: arrow_256x256 footprint: 1.5, texture: arrow_128x128 Edited May 18, 2020 by fatherbushido strangely it's hard to delete the last image Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted May 18, 2020 Report Share Posted May 18, 2020 arrow 256x256 for both: Quote Link to comment Share on other sites More sharing options...
Nescio Posted May 18, 2020 Author Report Share Posted May 18, 2020 (edited) @fatherbushido, to clarify, the purpose of rP23636 is to ensure uniform line thickness given the same size. So for a unit with e.g. a footprint of r=1.5 (e.g. infantry), it doesn't matter whether they use the 128x128 arrow, circle, cross, square, star, etc., all (should) now have then same line thickness. And as stated before, the 128x128 shapes have relatively double the line thickness of the 256x256 shapes, so units with small footprints stand out more. The champion cavalry templates are odd in that they have r=2.5 circular footprints, whereas citizen cavalry have 4×6 rectangular footprints. (I think 3×6 would be better, see D2496, and they should use the 128x256 shape, see D2503.) [EDIT]: infantry using 128x128 and cavalry using 128x256 footprint: Spoiler Edited May 18, 2020 by Nescio image Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted May 18, 2020 Report Share Posted May 18, 2020 (edited) Quote uniform line thickness given the same size Yes I understand that, you mean using proper texture to avoid stretching (for rectangular footprints). (That's it?) And indeed, I (we) mix in the discussion different meaning for uniform. The first (circular and rectangular) footprints were script-generated. The goal was to have a (close) shape to avoid thickness issue when resizing. Also at that time, I guess rectangular overlay were for rectangular footprints and circle overlay were for circle footprints. (So there was not yet that other issue you adressed). A restricted set of size could also do the job (one can consider the weight of loaded textures). I would like to fit your new textures in that schema. Also as we both agree, the current footprint are still to be checked and fixed (see the numbers), in shape or in dimensions. There are more width depth ratio than one can expect! In my opinion, that's the first step. Then, and you have a good input about that, the what texture to which shape and which unit has to be done. I almost wonder if ellipsis are actually needed (moving to the rounded square or the stadium/capsule/cartouche is perhaps better? or something even fancier?) for the rectangular shape (it's far better than stretched circle but still not optimal?), but I don't have the eye fitted for that. That's imo the second step. Then I had a third step but it's too shiny outside. Edited May 20, 2020 by fatherbushido 1 Quote Link to comment Share on other sites More sharing options...
Nescio Posted May 21, 2020 Author Report Share Posted May 21, 2020 (edited) @feneur, could you split off this selection shape discussion into a new thread, starting with this post to this post (Dec 21), then adding this question and answer (Jan 27), and continuing with this point (May 10) onwards? Edited May 23, 2020 by Nescio Thank you! Quote Link to comment Share on other sites More sharing options...
Nescio Posted May 21, 2020 Author Report Share Posted May 21, 2020 On 5/18/2020 at 2:20 PM, fatherbushido said: Yes I understand that, you mean using proper texture to avoid stretching (for rectangular footprints). (That's it?) Yes, that's why I wrote the 128x256 and 128x512 selection textures: stretching 128x128 or 256x256 to an oblong (e.g. 1:2, 1:4) shape looks quite bad. On 5/11/2020 at 9:23 PM, Nescio said: for the 128×128 png output, double the line thicknesses. On 5/14/2020 at 10:58 AM, fatherbushido said: r23636 replaced the 128x128 and 256x256 On 5/18/2020 at 12:51 PM, Nescio said: @fatherbushido, to clarify, the purpose of rP23636 is to ensure uniform line thickness given the same size. So for a unit with e.g. a footprint of r=1.5 (e.g. infantry), it doesn't matter whether they use the 128x128 arrow, circle, cross, square, star, etc., all (should) now have then same line thickness. And as stated before, the 128x128 shapes have relatively double the line thickness of the 256x256 shapes, so units with small footprints stand out more. As a consquence all png output files have the same absolute line thickness. You can open any of the current selection textures, zoom in, and observe the black line is 10 pixels wide, regardless of shape or size. This was not the case prior to rP23636. In game this means the following are equivalent: selection | footprint | example texture | size | 128x128 | r = 1.5 | infantry 128x256 | 3 × 6 | D2496 citizen cavalry 128x512 | 3 × 12 | D2721 crocodile 256x256 | 6 × 6 | However, I don't think it's important that the line thickness is constant for units with different footprints. What matters to me is that the aspect ratio is about right, and that the line thickness is uniform with units with the same footprint; e.g. healers (plus), citizen infantry (circle), champion infantry (arrow), and hero infantry (star) all have a r=1.5 footprint. On 5/18/2020 at 2:20 PM, fatherbushido said: Also as we both agree, the current footprint are still to be checked and fixed (see the numbers), in shape or in dimensions. There are more width depth ratio than one can expect! In my opinion, that's the first step. I gather you're advocating constant line thicknesses for different footprints? That would be only doable if there were separate selection textures for each footprint size. Given that all animals have different footprints, as do ship, siege, and trader actors, I don't think that's a good idea. As for different width-to-depth ratios, the png dimensions have to be powers of 2, otherwise they cause errors. This means that the 128x256 textures are to be used by units with footprints between 2:3 and 1:3 and the 128x512 tectures between 1:3 and 1:6. I believe none of the units in game has a footprint narrower than 1:6 or wider than 1:1, but if those would be added at some point, it's quite easy to tweak the svg files and generate appropiate selection textures for those. On 5/18/2020 at 2:20 PM, fatherbushido said: Then, and you have a good input about that, the what texture to which shape and which unit has to be done. I almost wonder if ellipsis are actually needed (moving to the rounded square or the stadium/capsule/cartouche is perhaps better? or something even fancier?) for the rectangular shape (it's far better than stretched circle but still not optimal?), but I don't have the eye fitted for that. That's imo the second step. That's why I wrote four different oblong shapes, allowing people to choose case by case which shape looks best: On 8/24/2019 at 1:52 PM, Nescio said: Hide contents (From left to right: rectangle, rounded_rectangle, cartouche, ellipse.) On 5/18/2020 at 2:20 PM, fatherbushido said: Then I had a third step but it's too shiny outside. Getting a bit of sunshine and enjoying the nice weather is certainly important. Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted May 22, 2020 Report Share Posted May 22, 2020 On 5/21/2020 at 11:25 AM, Nescio said: Yes, that's why I wrote the 128x256 and 128x512 selection textures: stretching 128x128 or 256x256 to an oblong (e.g. 1:2, 1:4) shape looks quite bad. As a consquence all png output files have the same absolute line thickness. You can open any of the current selection textures, zoom in, and observe the black line is 10 pixels wide, regardless of shape or size. This was not the case prior to rP23636. In game this means the following are equivalent: selection | footprint | example texture | size | 128x128 | r = 1.5 | infantry 128x256 | 3 × 6 | D2496 citizen cavalry 128x512 | 3 × 12 | D2721 crocodile 256x256 | 6 × 6 | I understood, we agree about that. On 5/21/2020 at 11:25 AM, Nescio said: However, I don't think it's important that the line thickness is constant for units with different footprints. What matters to me is that the aspect ratio is about right, and that the line thickness is uniform with units with the same footprint; e.g. healers (plus), citizen infantry (circle), champion infantry (arrow), and hero infantry (star) all have a r=1.5 footprint. On 5/21/2020 at 11:25 AM, Nescio said: I gather you're advocating constant line thicknesses for different footprints? That would be only doable if there were separate selection textures for each footprint size. Given that all animals have different footprints, as do ship, siege, and trader actors, I don't think that's a good idea. It's not my subjective point of view, it's how it was planed and done: a rectangle texture and a circular texture were generated for each rectangle footprint width and depth and each circle footprint radius (rounded to the closest power of 2). Also my personal taste is more for fancier texture but plain ones work very badly with the quad thing. On 5/21/2020 at 11:25 AM, Nescio said: As for different width-to-depth ratios, the png dimensions have to be powers of 2, otherwise they cause errors. This means that the 128x256 textures are to be used by units with footprints between 2:3 and 1:3 and the 128x512 tectures between 1:3 and 1:6. I believe none of the units in game has a footprint narrower than 1:6 or wider than 1:1, but if those would be added at some point, it's quite easy to tweak the svg files and generate appropiate selection textures for those. That's also why I asked above about the pixel - size equivalence. On 5/21/2020 at 11:25 AM, Nescio said: That's why I wrote four different oblong shapes, allowing people to choose case by case which shape looks best: (From left to right: rectangle, rounded_rectangle, cartouche, ellipse.) Nice I would appreciate you personal taste about that (by entity type and footprint type) to have a proper consistent set. On 5/21/2020 at 11:25 AM, Nescio said: Getting a bit of sunshine and enjoying the nice weather is certainly important. ;-) 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.