Show/hide unit icons based on camera height, not distance

Show/hide unit icons based on camera height, not distance

Requests for features in the spring code.

Moderator: Moderators

User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Show/hide unit icons based on camera height, not distance

Post by Caydr »

Looks kind of silly IMO when you move the camera around and stuff in an obviously circular pattern de-iconizes. I think it should be based on the camera's distance from the ground rather than units' distance to the camera.

It would increase system requirements slightly but only a tiny fraction of the people here have computers that can't handle an astronomical number of units at the level of detail that is most common.

Maybe just as an option, so that both the people who don't use one of the TA-like modes aren't left behind.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Show/hide unit icons based on camera height, not distance

Post by hoijui »

+1

its not just silly but also unintuitive/impractical, when you see your army as a big block of giant icons, and the enemies army as harldy visible tiny pixel blocks.

i would do it, if there are no big concerns against it.

what if instead of making it configurable, it woudl depend on the camera mode used, or on the angle, wether to use distance to unit or distance to ground?
ie, when using first person view, or a flat angel, use distance to unit, and with top-down view, or generally with a steep angle, use distance to ground.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: Show/hide unit icons based on camera height, not distance

Post by Caydr »

What you said.

Also, currently I use about 80-120 for my icon distance, I'm still getting used to the concept TBH. Based on screenshots I've seen, other people use a similar value.

For the default, in TA view, rotatable overhead, smooth, and whatever other "ta-like" modes there are, 100 or thereabouts would be a pretty good value for switching to all icons mode. Similarly, in FPS, total war, etc modes, a distance of about 100 or so is a pretty good value for having units switch to icons.

So... the point of all this is that there wouldn't need to be any extra customization options. Simple is best. There's already 600 inadequately described, little-known console commands, and the control panel has so many options there's like 10 tabs - despite a bunch of important ones not even being listed. So, please don't add to it.

edit: alternatively you could say, if the camera angle is greater than 45 degrees then switch to the "old" method. Some experimentation could find a more ideal value.
Last edited by Caydr on 23 Aug 2009, 15:29, edited 2 times in total.
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Show/hide unit icons based on camera height, not distance

Post by Jazcash »

I'd like this a lot.
User avatar
JohannesH
Posts: 1793
Joined: 07 Apr 2009, 12:43

Re: Show/hide unit icons based on camera height, not distance

Post by JohannesH »

Caydr wrote:only a tiny fraction of the people here have computers that can't handle an astronomical number of units at the level of detail that is most common.
I dont think this is true at all.

But this wouldnt be a too bad change anyhow, the icondistance can be lowered to compensate
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Show/hide unit icons based on camera height, not distance

Post by hoijui »

i start working on it
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: Show/hide unit icons based on camera height, not distance

Post by zwzsg »

I dunno, it's kinda neat when the camera is angled to have far away unit iconised even if the camera is near the ground. Make sure it's optional I'd say.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Show/hide unit icons based on camera height, not distance

Post by Auswaschbar »

That would suck. I use icons because units become to small at a certain distance to see / click. This is not related to camera height.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: Show/hide unit icons based on camera height, not distance

Post by BrainDamage »

Auswaschbar wrote:That would suck. I use icons because units become to small at a certain distance to see / click. This is not related to camera height.
this

if you add it, please make it optional

also, you're assuming that one has always a vertical top view of the ground which is not true in quite a few cases
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Show/hide unit icons based on camera height, not distance

Post by CarRepairer »

-1, I play and spec at an angle. Camera distance is relevant, not height.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Show/hide unit icons based on camera height, not distance

Post by smoth »

height is only relevant if we all only used ta cam.

-9001
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Show/hide unit icons based on camera height, not distance

Post by imbaczek »

not even then; ctrl+mousewheel tilts the TA cam. what could work is distance to the camera plane and not just the camera position.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Show/hide unit icons based on camera height, not distance

Post by Argh »

Yeah, I can't really support this one either.

It'd be easy enough to write a Widget that simply reset the IconDistance to 10 if camera > X, otherwise IconDistance == 10000 or something, though, which would be pretty much the behavior Caydr asked for.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Show/hide unit icons based on camera height, not distance

Post by hoijui »

i did nto really get what each one of you was against or for...
i implemented and pushed it. it can still be adjusted or.. in the worst case reverted, but i like it as it works now.

see commit: aca1f71edd90dad249b95352c16a86fe14d4ea2d
commit description:

Code: Select all

icon distance: use distance to camera for steep angles
When looking at the map from a steep angle (like Overhead camera),
use the distance of the camera to the average ground level of the map,
to determine whether to draw icons or not.
For flat angles, it works as know, with distance to the individual units.
Each CameraController can define individually the method it wants to be used,
by overriding the following method, which has a default implementation as described above.
bool GetUseDistToGroundForIcons()
the default implementiaton uses abs(camDir.dot(UpVector)) = 0.8 as the switch between unitDistance and ground distance inconification.
i recommend testing it for some time, and if someone really feels like it is bad, adjust it later.
of course the value 0.8 can be adjusted any time, if wanted.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Show/hide unit icons based on camera height, not distance

Post by Argh »

i did nto really get what each one of you was against or for...
Spring has multiple camera types.

Your change makes non-OTA POV behave very differently, which has some rather serious performance implications. This is what the objections are about.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: Show/hide unit icons based on camera height, not distance

Post by BrainDamage »

hoijui wrote:i did nto really get what each one of you was against or for..
everyone (except you and caydr) want the old behaviour
Argh wrote: Your change makes non-OTA POV behave very differently, which has some rather serious performance implications. This is what the objections are about.
no, won't make any performance difference
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Show/hide unit icons based on camera height, not distance

Post by Argh »

If it's height, not distance, than a low-flying POV will see full Unit geometry at long distances, not icons.

Which is why it's distance, not height, and probably should not be changed.

Again... the desired behavior is quite easy to achieve with a Widget.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: Show/hide unit icons based on camera height, not distance

Post by zwzsg »

hoijui wrote:For flat angles, it works as now, with distance to the individual units.
hoijui wrote:0.8 as the switch between unitDistance and ground distance inconification.
hoijui wrote:of course the value 0.8 can be adjusted any time, if wanted.
So:
1) low flying POV still use distance, like previously
2) can be disabled if you don't like it
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Show/hide unit icons based on camera height, not distance

Post by Argh »

<shrugs>

If it is turned off when using free cam, etc., that's fine with me. The problem is when it's turned on by default for all cameras.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Show/hide unit icons based on camera height, not distance

Post by Beherith »

zwzsg wrote: 2) can be disabled if you don't like it
Imo this is the wrong approach, and stuff like this is why most games need to play catch up for a few weeks after the engine changes are released. (see emg bug, new reclaim system, etc)

Just keep the damned old behaviour and make the new one optional for those who want to use it.
Post Reply

Return to “Feature Requests”