Jump to content

Selection circle colours


Recommended Posts

I changed the colour of selection circles to match the player colour (instead of always being white) and also changed them to 2 pixels wide, like this, in an attempt to make them easier to see and easier to distinguish from other players' units. I don't know whether this is the best design - do people have experience/examples/opinions of what would look good and help players the most?

Link to comment
Share on other sites

Sounds reasonable. Here's a few screenshots of AoE3 where they do something similar.

The ships have ovals colored by player color.

The Indians (American) have fancy outlines.

In this shot, they show a star under a hero. (In vanillla AoE3, I believe that there was a circle around the star)

I think regular units just have circles (which are thicker than those in AoK), but I don't know if there are colored or not. I know the health bars above the units heads are colored by player color. (They use black for the background fill color rather than red.) Regular health bars in the panel are green and red respectively.

[edit]

After trying your changes, I don't know if changing the color is a good idea. It will only work well if the thickness of the circle is also increased. (The thickness might be hard to change since it's just a circle drawn and not a proper decal.) Brighter colors would help too.

Edited by WhiteTreePaladin
Link to comment
Share on other sites

I like the thickness of the circles, Philip. Any way we can have them anti-aliased though?
It should be possible, but not trivial. There is a trivial way to antialias OpenGL lines but it often has absurdly terrible performance so we can't use that. What we probably need is the circle shape in a texture underneath the unit (fitted to the terrain appropriately), which'll allow more control over the rendering. If this is the behaviour we want, I can add a task to Trac and hope somebody (not me) implements it soon.
After trying your changes, I don't know if changing the color is a good idea. It will only work well if the thickness of the circle is also increased.
The thickness of the circle is increased (if you compiled from SVN), like in the image I linked - do you mean it should be increased more, or do you not see the thickness at all? (I guess it's possible some old OpenGL drivers might not support it.)
Link to comment
Share on other sites

A quick note before heading to work: the 'proper' way to do antialiasing is to convolve the continuous signal with a lowpass kernel. It turns out that (in the case of lines), the pixel intensity/blend factor is merely a function of its distance from the line and can be precomputed. Here's a nice description of how to implement this on a GPU: http://http.developer.nvidia.com/GPUGems2/..._chapter22.html

I figure this could be easily adapted towards circles. If anyone is interested, I can provide the optimal (in the sense of minimizing aliasing energy) cubic polynomial filter kernel and help derive the term for convolution with the circle.

Then again, this is probably overkill and a simple texture with a halfway decently rendered circle may also suffice :)

Link to comment
Share on other sites

Maybe something in between Michael's picture and the current thickness? Split the difference perhaps?
This can be changed in simulation2/components/CCmpSelectable.cpp ("m_Overlay.m_Thickness = 2;") - could you try experimenting with that to see what you think works best?
If anyone is interested, I can provide the optimal (in the sense of minimizing aliasing energy) cubic polynomial filter kernel and help derive the term for convolution with the circle.

Then again, this is probably overkill

Yeah, I think it probably is :). We don't want to require fragment shaders for this, and any textures can just be generated offline.
Link to comment
Share on other sites

Yeah, I think it probably is . We don't want to require fragment shaders for this, and any textures can just be generated offline.

Roger that.

It stays at the same thickness regardless of distance. A thickness of 4 looks very good at one point but terrible when zoomed out.

Just to clarify: I meant a pixel's intensity depends on its own distance to the circle, not the circle's distance from the camera.

BTW, looking terrible at low zoom factors is to be expected due to cheap downsampling filters. I've attached an image showing the difference between box, cone and the abovementioned optimal polynomial filter.post-25-1281378408_thumb.jpg

Link to comment
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.

 Share

×
×
  • Create New...