Page MenuHomeWildfire Games

reorganize selection textures
ClosedPublic

Authored by Nescio on Dec 22 2019, 11:57 PM.

Details

Reviewers
Stan
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP23703: Reorganize selection textures by size instead of by shapes. Optimize templates…
Summary

rP20374 introduced some new selection shapes.
rP23636 had the existing selection shapes redrawn from svg to ensure uniform line thickness.
rP23638 introduced new oblong (1:2 and 1:4) selection shapes, as briefly discussed here on the forums.

This patch does the following:

  • because there are many more shapes than sizes, the textures are now moved from {shape/size} to {size/shape}; this is to easily accommodate future additions;
  • circle and square are renamed to ellipse and rectangle (precise language);
  • deleted unused art/textures/selection/ shapes:
actor.png
actor_mask.png
circle/32x32.png
circle/32x32_mask.png
circle/512x512.png
circle/512x512_mask.png
circle/64x64.png
circle/64x64_mask.png
hash/128x128.png
hash/128x128_mask.png
hash/256x256.png
hash/256x256_mask.png
  • updated templates accordingly;
  • removed numerous unnecessary <Selectable> entries;
  • assigned new oblong shapes to templates with footprint ratios closer to 1:2 than 1:1
  • used cartouche for catafalque, rouded rectangle for siege, octagram for territory pull

Overview of new usage per texture:

  • 128x128/
    • arrow: champion infantry
    • ellipse: birds, trees, infantry, female citizens, slaves, some traders
    • octagram: territory pull
    • plus: healer
    • rectangle: —
    • rhombus: —
    • rounded_rectangle: polybolos, scorpio
    • star: hero infantry and healer
  • 128x256/
    • cartouche: catafalque
    • elllipse: cavalry, dog, fauna, fishing boats, some traders
    • rectangle: —
    • rounded_rectangle: oxybeles, lithobolos, rams
  • 128x512/
    • cartouche: —
    • ellipse: shark, whale, ships
    • rectangle: —
    • rounded_rectangle: fireraiser
  • 256x256/
    • arrow: champion cavalry and elephant
    • ellipse: elephant archer, worker elephant
    • octagram: —
    • plus: —
    • rectangle: formation
    • rhombus: —
    • rounded_rectangle: siege tower
    • star: hero cavalry and elephant

PS No 1:3 etc sizes are introduced, because Atlas does not accept textures with dimensions that are not powers of two. As a consequence there is a small amount of stretching for some specific units, e.g. the bulky Celtic warbarge.
PPS svg source files are located here. As you can see, there are many more available there not included in this patch. These selection textures are really small and cheap (only a few kb each), so more shapes could be added as well, to have more assets for future mods, if desired.

Test Plan

Check for mistakes and omissions.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Nescio updated this revision to Diff 10753.Dec 23 2019, 12:11 AM
Nescio edited the summary of this revision. (Show Details)

forgot 256x256/rounded_rectangle

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/869/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1385/display/redirect

Nescio edited the summary of this revision. (Show Details)Dec 23 2019, 12:20 AM

Could you remind me? Why we have a selection mask as a separate texture?

Could you remind me? Why we have a selection mask as a separate texture?

Simple answer: that's how it's done. I suppose it looks bad without.
Techical answer: I don't know why.

Stan added a comment.Jan 6 2020, 10:30 PM

Can you split the cleanup from this patch?

What exactly?

Stan added inline comments.Jan 6 2020, 10:42 PM
binaries/data/mods/public/simulation/templates/gaia/fauna_camel.xml
18 ↗(On Diff #10753)

Stuff like this?

Nescio added inline comments.Jan 6 2020, 10:50 PM
binaries/data/mods/public/simulation/templates/gaia/fauna_camel.xml
18 ↗(On Diff #10753)

Currently basically all animals have a 1:2 footprint, but some use the 128x128 circle, others the 256x256 circle.
This patch introduces oblong shapes, so all animals can use the new 128x256 ellipse, which looks better.
Because of that stuff like this becomes both unnecessary and potentially problematic, which is why these lines are removed.

Stan added a comment.Jan 6 2020, 10:52 PM

I see. Okay So I just need to figure out a way to apply this patch. I'll try tomorrow.

Doesn't arc patch D2503 work for you?

Stan added a comment.Jan 6 2020, 10:57 PM

Nope, I probably need to patch arc on Windows...

Then how do you try out other patches?

Stan added a comment.Jan 6 2020, 11:31 PM

Then how do you try out other patches?

I usually download raw diffs and sometimes arc works :D

In case phabricator can't handle the images (D889#38774), here's a zip with the textures:

Nescio edited the test plan for this revision. (Show Details)Feb 15 2020, 1:54 PM
Nescio edited the test plan for this revision. (Show Details)
Stan added a comment.Feb 15 2020, 4:29 PM

I just tried. I think there is something wrong with the scorpio, maybe it needs a specific size. I used the unit_demo maps I haven't checked all the footprints yet.

Nescio updated this revision to Diff 11367.Feb 15 2020, 6:13 PM
Nescio edited the summary of this revision. (Show Details)

It turns out there are a number of units with square footprints that ought to be oblong:

  • about half of all traders
  • maur_elephant_archer_b.xml
  • maur_support_elephant.xml
  • ptol_siege_polybolos_packed.xml
  • rome_siege_ballista_packed.xml
  • rome_siege_scorpio_packed.xml

Correcting footprints belongs in a different patch. Therefore it's necessary to insert square selection textures for now.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1772/display/redirect

Stan added a comment.Feb 16 2020, 10:11 AM

Also shouldn't this patch delete other textures?

Also shouldn't this patch delete other textures?

That would break A24 mods, so I assumed it would be better to update selection textures here, then correct mods, and afterwards do another patch to delete the old textures. But if you prefer to delete them immediately, I could include that in this patch.

Stan edited reviewers, added: Restricted Owners Package; removed: Stan.Mar 7 2020, 3:50 PM
Stan requested changes to this revision.Apr 8 2020, 10:05 PM
Stan added a subscriber: Stan.

Let's do it in one go, move + rename.

This revision now requires changes to proceed.Apr 8 2020, 10:05 PM

This patch does everything that needs to be done (introduce oblong shapes, redraw existing shapes to ensure uniform line thickness, have size folders instead of shape, and adjust all occurrences in the simulation templates files).
Afterwards D2696 can delete the obsolete, old selection textures.

Stan added a comment.Apr 9 2020, 11:12 AM

This patch does everything that needs to be done (introduce oblong shapes, redraw existing shapes to ensure uniform line thickness, have size folders instead of shape, and adjust all occurrences in the simulation templates files).
Afterwards D2696 can delete the obsolete, old selection textures.

Except it does not preserve file history...

Except it does not preserve file history...

That's because the existing selection textures are redrawn and renamed. The only way I can think of to preserve the file history would be to split this patch. If that's what you think is desirable, here are the redrawn shapes in their old locations:


And the new rounded rectangle, cartouche, and oblong ellipse and rectangle:

You can commit them separately. Afterwards I'll redo this patch, moving the files and updating the templates accordingly.

@Stan, if and when you have time, it would be nice if you could continue with this eventually (see previous post).

Stan added a comment.May 7 2020, 7:25 PM

Sorry for the delay, I actually missed your reply. I committed the updated shapes :)

Nescio added a comment.May 7 2020, 7:47 PM

Sorry for the delay, I actually missed your reply. I committed the updated shapes :)

Thanks! The pre-D2503.zip?
The next step is to commit the new, oblong shapes, i.e. the D2503-new.zip.
Afterwards I'll update this diff.

Nescio updated this revision to Diff 11809.May 7 2020, 9:10 PM
  • move 128x128 shapes into the 128x128 folder
  • move 256x256 shapes into the 256x256 folder
  • rename circle to ellipse
  • rename square to rectangle
  • delete unused shapes: actor, smaller circles, hash
Nescio planned changes to this revision.May 7 2020, 9:10 PM

To do: update simulation templates accordingly.

Vulcan added a comment.May 7 2020, 9:10 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2083/display/redirect

Vulcan added a comment.May 7 2020, 9:13 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/668/display/redirect

Nescio updated this revision to Diff 11810.May 7 2020, 9:46 PM

Update simulation templates accordingly.

Owners added a subscriber: Restricted Owners Package.May 7 2020, 9:46 PM
Vulcan added a comment.May 7 2020, 9:46 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2084/display/redirect

Vulcan added a comment.May 7 2020, 9:48 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/669/display/redirect

Nescio edited the summary of this revision. (Show Details)May 7 2020, 9:59 PM
Nescio edited the test plan for this revision. (Show Details)

Updated, feel free to review again, @Stan.

Stan added a comment.May 18 2020, 11:06 AM

I'm wondering if it isn't confusing to have folders named after sizes. Other than that it's quite a significant breaking change for mods... As in it breaks every single one of them. If I commit this I will be the one to blame hence the previous question.

Is there any way we can create something to update them?

Also it seems it doesn't apply correctly

Patch deletes file

'binaries/data/mods/public/art/textures/selection/star/128x128_mask.png',

but the file does not exist in the working copy. Continue anyway? [y/N]  Exception

Can you check?

I'm wondering if it isn't confusing to have folders named after sizes.

The reason for that change is maintainability: having dozens of folders with only four images each is less practical than just four folders with dozens of images each.

Other than that it's quite a significant breaking change for mods... As in it breaks every single one of them. If I commit this I will be the one to blame hence the previous question.
Is there any way we can create something to update them?

Only mods that include some template_unit_* files would break; Terra Magna etc. don't and should be fine.

Also it seems it doesn't apply correctly
Can you check?

I just ran arc patch D2503:

OKAY  Successfully applied patch to the working copy.

No errors or warnings. I have no idea why Vulcan complains; I don't understand phabricator, though.

Stan added a comment.May 22 2020, 9:37 AM

I found these currently unused files

Unused file 'public/art/textures/selection/128x128/rectangle.png'
Unused file 'public/art/textures/selection/128x128/rectangle_mask.png'
Unused file 'public/art/textures/selection/128x128/rhombus.png'
Unused file 'public/art/textures/selection/128x128/rhombus_mask.png'
Unused file 'public/art/textures/selection/128x128/rounded_rectangle.png'
Unused file 'public/art/textures/selection/128x128/rounded_rectangle_mask.png'
Unused file 'public/art/textures/selection/128x256/rectangle.png'
Unused file 'public/art/textures/selection/128x256/rectangle_mask.png'
Unused file 'public/art/textures/selection/128x512/cartouche.png'
Unused file 'public/art/textures/selection/128x512/cartouche_mask.png'
Unused file 'public/art/textures/selection/128x512/rectangle.png'
Unused file 'public/art/textures/selection/128x512/rectangle_mask.png'
Unused file 'public/art/textures/selection/256x256/octagram.png'
Unused file 'public/art/textures/selection/256x256/octagram_mask.png'
Unused file 'public/art/textures/selection/256x256/plus.png'
Unused file 'public/art/textures/selection/256x256/plus_mask.png'
Unused file 'public/art/textures/selection/256x256/rectangle.png'
Unused file 'public/art/textures/selection/256x256/rectangle_mask.png'
Unused file 'public/art/textures/selection/256x256/rhombus.png'
Unused file 'public/art/textures/selection/256x256/rhombus_mask.png'
Unused file 'public/art/textures/selection/auras/test/1024x1024_aura.png'
Unused file 'public/art/textures/selection/auras/test/1024x1024_aura_mask.png'
Unused file 'public/art/textures/selection/star/1024x1024_aura.png'
Unused file 'public/art/textures/selection/star/1024x1024_aura_mask.png'

Is this intended ? Also why is there still a star folder?

Unused file 'public/art/textures/selection/128x128/rectangle.png'
Unused file 'public/art/textures/selection/128x128/rectangle_mask.png'
Unused file 'public/art/textures/selection/128x128/rhombus.png'
Unused file 'public/art/textures/selection/128x128/rhombus_mask.png'
Unused file 'public/art/textures/selection/128x128/rounded_rectangle.png'
Unused file 'public/art/textures/selection/128x128/rounded_rectangle_mask.png'
Unused file 'public/art/textures/selection/128x256/rectangle.png'
Unused file 'public/art/textures/selection/128x256/rectangle_mask.png'
Unused file 'public/art/textures/selection/128x512/cartouche.png'
Unused file 'public/art/textures/selection/128x512/cartouche_mask.png'
Unused file 'public/art/textures/selection/128x512/rectangle.png'
Unused file 'public/art/textures/selection/128x512/rectangle_mask.png'
Unused file 'public/art/textures/selection/256x256/octagram.png'
Unused file 'public/art/textures/selection/256x256/octagram_mask.png'
Unused file 'public/art/textures/selection/256x256/plus.png'
Unused file 'public/art/textures/selection/256x256/plus_mask.png'
Unused file 'public/art/textures/selection/256x256/rectangle.png'
Unused file 'public/art/textures/selection/256x256/rectangle_mask.png'
Unused file 'public/art/textures/selection/256x256/rhombus.png'
Unused file 'public/art/textures/selection/256x256/rhombus_mask.png'

These are intended, yes, because these shapes are used in different sizes; e.g. 256x256/plus is unused, but the healer uses the 128x128 plus. These pngs are very cheap (only a few kb each) and if at some point someone wants to use an existing shape in a different size, it's best they are already there, to save time and prevent introducing inconsistencies.
Although none of the rectangle sizes is used (the rounded_rectangle is), I think it's best to keep them nonetheless, for testing etc., because they're the closest approximation of a unit's actual footprint.

Unused file 'public/art/textures/selection/auras/test/1024x1024_aura.png'
Unused file 'public/art/textures/selection/auras/test/1024x1024_aura_mask.png'
Unused file 'public/art/textures/selection/star/1024x1024_aura.png'
Unused file 'public/art/textures/selection/star/1024x1024_aura_mask.png'

These are to be deleted. However, they're sufficiently different, so you might want to move them into an old art repository, which is why I didn't remove them in this patch.

Also why is there still a star folder?

It's better to delete the obsolete folders (arrow, circle, etc.) only after they're emptied, to be safe, because it's possible patches are implemented in a different order than expected.
When this patch is committed, I'll update D2696 to delete the then empty folders (and those 1024x1024_aura* files).

Stan added a comment.May 22 2020, 12:58 PM

Those to be deleted files are used by delenda est and probably some other mods using auras. Will need an extra pr.
I guess i should write a regex for the change to make it easier for other mods.

Those to be deleted files are used by delenda est

Deleting them won't break anything, since they're already present there: https://github.com/JustusAvramenko/delenda_est/tree/master/art/textures/selection/auras/test

and probably some other mods using auras.

Which ones specifically? The aura and attack range visualizations simply use the outline_border.png, not those 1024x1024_aura* png files.

I guess i should write a regex for the change to make it easier for other mods.

As stated earlier, aristeia, millenniumad, terra_magna, etc. are unaffected by this patch. I guess Delenda Est is the only mod that needs fixing, because it contains (partially outdated) copies of numerous template_unit* files.

Stan requested changes to this revision.May 23 2020, 3:38 PM

As reported on the forums binaries/data/mods/public/art/textures/selection/actor.png binaries/data/mods/public/art/textures/selection/actor_mask.png textures are both used and should not be deleted. They are referenced in source/ps/TemplateLoader.cpp

void CTemplateLoader::ConstructTemplateActor(const std::string& actorName, CParamNode& out)
{
	// Copy the actor template
	out = GetTemplateFileData("special/actor");

	// Initialise the actor's name and make it an Atlas selectable entity.
	std::wstring actorNameW = wstring_from_utf8(actorName);
	std::string name = utf8_from_wstring(CParamNode::EscapeXMLString(actorNameW));
	std::string xml = "<Entity>"
	                      "<VisualActor><Actor>" + name + "</Actor><ActorOnly/></VisualActor>"
						  // arbitrary-sized Footprint definition to make actors' selection outlines show up in Atlas
						  "<Footprint><Circle radius='2.0'/><Height>1.0</Height></Footprint>"
	                      "<Selectable>"
	                          "<EditorOnly/>"
	                          "<Overlay><Texture><MainTexture>actor.png</MainTexture><MainTextureMask>actor_mask.png</MainTextureMask></Texture></Overlay>"
	                      "</Selectable>"
	                  "</Entity>";

	CParamNode::LoadXMLString(out, xml.c_str(), actorNameW.c_str());
}

and source/simulation2/tests/test_CmpTemplateManager.h

void test_LoadTemplate()
{
    CSimContext context;
    CComponentManager man(context, g_ScriptRuntime);
    man.LoadComponentTypes();

    entity_id_t ent1 = 1, ent2 = 2;
    CEntityHandle hnd1 = man.LookupEntityHandle(ent1, true);
    CParamNode noParam;

    TS_ASSERT(man.AddComponent(hnd1, CID_TemplateManager, noParam));

    ICmpTemplateManager* tempMan = static_cast<ICmpTemplateManager*> (man.QueryInterface(ent1, IID_TemplateManager));
    TS_ASSERT(tempMan != NULL);

    const CParamNode* basic = tempMan->LoadTemplate(ent2, "basic");
    TS_ASSERT(basic != NULL);
    TS_ASSERT_WSTR_EQUALS(basic->ToXML(), L"<Test1A>12345</Test1A>");

    const CParamNode* inherit2 = tempMan->LoadTemplate(ent2, "inherit2");
    TS_ASSERT(inherit2 != NULL);
    TS_ASSERT_WSTR_EQUALS(inherit2->ToXML(), L"<Test1A a=\"a2\" b=\"b1\" c=\"c1\"><d>d2</d><e>e1</e><f>f1</f><g>g2</g></Test1A>");

    const CParamNode* inherit1 = tempMan->LoadTemplate(ent2, "inherit1");
    TS_ASSERT(inherit1 != NULL);
    TS_ASSERT_WSTR_EQUALS(inherit1->ToXML(), L"<Test1A a=\"a1\" b=\"b1\" c=\"c1\"><d>d1</d><e>e1</e><f>f1</f></Test1A>");

    const CParamNode* actor = tempMan->LoadTemplate(ent2, "actor|example1");
    TS_ASSERT(actor != NULL);
    TS_ASSERT_WSTR_EQUALS(actor->ToXML(),
            L"<Footprint><Circle radius=\"2.0\"></Circle><Height>1.0</Height></Footprint><Selectable><EditorOnly></EditorOnly><Overlay><Texture><MainTexture>actor.png</MainTexture><MainTextureMask>actor_mask.png</MainTextureMask></Texture></Overlay></Selectable>"
            L"<VisualActor><Actor>example1</Actor><ActorOnly></ActorOnly><SilhouetteDisplay>false</SilhouetteDisplay><SilhouetteOccluder>false</SilhouetteOccluder><VisibleInAtlasOnly>false</VisibleInAtlasOnly></VisualActor>");
}

Ideally at some point it would an actual XML file

This revision now requires changes to proceed.May 23 2020, 3:38 PM

As reported on the forums binaries/data/mods/public/art/textures/selection/actor.png binaries/data/mods/public/art/textures/selection/actor_mask.png textures are both used and should not be deleted. They are referenced in source/ps/TemplateLoader.cpp and source/simulation2/tests/test_CmpTemplateManager.h
Ideally at some point it would an actual XML file

Wouldn't it be better to simply update the lines in those two files to 128x128/ellipse.png? Or if that's unacceptable, move the actor.png to the mod mod?

Stan added a comment.May 23 2020, 4:45 PM

As reported on the forums binaries/data/mods/public/art/textures/selection/actor.png binaries/data/mods/public/art/textures/selection/actor_mask.png textures are both used and should not be deleted. They are referenced in source/ps/TemplateLoader.cpp and source/simulation2/tests/test_CmpTemplateManager.h
Ideally at some point it would an actual XML file

Wouldn't it be better to simply update the lines in those two files to 128x128/ellipse.png? Or if that's unacceptable, move the actor.png to the mod mod?

It's a possible solution yes. so is the latter. I don't mind as long as we do not break things.

circle and square are renamed to ellipse and rectangle (precise language);

Isn't square and circle more precise than ellipse and rectangle (which are more generic) ? a square being a rectangle while the converse is not true?

Nescio updated this revision to Diff 12000.May 23 2020, 5:11 PM
  • correct source files
Owners added a subscriber: Restricted Owners Package.May 23 2020, 5:11 PM

Isn't square and circle more precise than ellipse and rectangle (which are more generic) ? a square being a rectangle while the converse is not true?

Yes, which is why they are renamed: a square used by an unit with an oblong footprint is no longer a square, but is still a rectangle.

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/807/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/simulation2/tests/test_CmpTemplateManager.h
|   1| /*·Copyright·(C)·2017·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2017"

source/simulation2/tests/test_CmpTemplateManager.h
|  34| class·TestCmpTemplateManager·:·public·CxxTest::TestSuite
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classTestCmpTemplateManager:' is invalid C code. Use --std or --language to configure the language.

source/ps/TemplateLoader.cpp
|   1| /*·Copyright·(C)·2017·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2017"
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2217/display/redirect

Nescio updated this revision to Diff 12001.May 23 2020, 5:25 PM
  • make Vulcan happy (copyright year)

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/808/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/simulation2/tests/test_CmpTemplateManager.h
|  34| class·TestCmpTemplateManager·:·public·CxxTest::TestSuite
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classTestCmpTemplateManager:' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2218/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/814/display/redirect

Stan accepted this revision.May 28 2020, 8:03 PM
Stan added a subscriber: fatherbushido.

After a long thinking, and asking around, and without the oversight noticed by @fatherbushido (thanks again), I think this is a positive improvement. It's easier to look for files, and the template improvements are nice. I was a bit put off by having 128x128 as folder names, but it has to be somewhere so at least it's reduced.

I don't think we will ever have SVG support for footprint, so until that arrive we will always need multiple folders.

This revision is now accepted and ready to land.May 28 2020, 8:03 PM

Great, many thanks for reviewing this! It was a large patch, but I do believe it makes the public mod more consistent and easier to maintain. @wowgetoffyourcellphone should probably correct some files in his Delenda Est mod.
Something else, I also made 128x1024 versions of the oblong shapes, which are suitable for units with footprint ratios between 1:6 and 1:12. No such units currently exist in game, but the selection textures could be useful in case someone decides to make realistic warships at some point in the future. Both Classical Greek penteconters and triremes had a hull of 60 m × 6 m (i.e. 1:10) and at the Battle of the Denmark Strait (1941), the ships involved were (numbers taken from Wikipedia):

               ship ,          type ,  length ,   beam , approximate ratio
Bismarck            , battleship    , 251   m , 36   m , 1:7
Prinz Eugen         , heavy cruiser , 212.5 m , 21.7 m , 1:10
HMS Prince of Wales , battleship    , 227.1 m , 31.4 m , 1:7
HMS Hood            , battlecruiser , 262.3 m , 31.8 m , 1:8
HMS Norfolk         , heavy cruiser , 192.9 m , 20   m , 1:10
HMS Suffolk         , heavy cruiser , 190   m , 20.8 m , 1:9

Anyway, selection textures are cheap, so if you (or @fatherbushido) think 1:8 shapes are worth including, here are the files:

.