Page 2 of 3

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

Posted: 24 Aug 2009, 01:36
by Auswaschbar
zwzsg wrote:2) can be disabled if you don't like it
By editing the source. How many people you know will do that?

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

Posted: 24 Aug 2009, 02:50
by Caydr
If I'm understanding correctly, if your camera is not in one of the TA-ish modes, it doesn't apply at all. So FPS cam is not affected, total war is not affected, retarded-orbit-cam-that-can't-be-disabled is not affected.

And it only comes into effect if you are at a very steep camera angle.

So:
zwzsg wrote: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.
This is how it is.
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.
Explain please, units being far away are hard to see because the camera is far away. You can't see a large distance in the map unless your camera is tilted upward, in which case the old behavior will still apply, so everything is exactly as you want it.
Brain Damage wrote:
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
No he's not, please read.
CarRepairer wrote:-1, I play and spec at an angle. Camera distance is relevant, not height.
Angle? As in, not almost straight down? Then you need to read.
smoth wrote:height is only relevant if we all only used ta cam.

-9001
That's why it's only being applied to TA cam. Read please.
imbaczek wrote:not even then; ctrl+mousewheel tilts the TA cam. what could work is distance to the camera plane and not just the camera position.
Which is why it won't apply in those cases, read please.
Argh wrote:
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.
Which nicely explains why it's not applying in those situations. Read please.
Argh wrote:If it's height, not distance, than a low-flying POV will see full Unit geometry at long distances, not icons.
More read, less not read.
Argh wrote:<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.
It's not, fail less please.
Beherith wrote:
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.
Less fail, more read.

What a clusterfail.

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

Posted: 24 Aug 2009, 03:26
by FLOZi
Beherith wrote:
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.
Not always possible or sensible. Do you think we should keep the old map LODing system default and make the new one you are working on optional? :P

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

Posted: 24 Aug 2009, 03:40
by BrainDamage
FYI i still prefer the old behaviour despite the new is only applied for high vertical angles because simply even on top view i can have units on hills that i can reckognize better with 3d model and units on depressions where icon makes an improvement over 3d render, therefore i prefer mixed states, less assumptions please and option to get back the old behaviour.

also, i don't remember reading this part:
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.
when i first read the thread (there were only 2 posts), was it edit-added before caydr's reply (because it shows no edit stamp) or is my memory failing on me? (i did not read again the first 2 posts until recently )

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

Posted: 24 Aug 2009, 08:12
by hoijui
BD, your memory fails you, i wrote it this way back then, it was the second post, and it did not change.

in general.. it really seems most ppl got it wrong (did not understand as it is working) as cadyr "explained" :D
though there is one thing where he seems to be a bit wrong too:
as it is now, this applies to all camera modes, BUT the way it is implemented, you can simply overwrite the following function (as i described it in the GIT comment, and quoted in here), eg in FPSCamera:

Code: Select all

bool GetUseDistToGroundForIcons() {
   return false;
}
which leads to FPS only using the old behaviour. I did not do this, cause it is totally useless in my eyes. Btw, the new behaviour would rather be faster then slower, as it needs calculations only once a frame, instead of once per frame and unit, though i am pretty sure this will never be noticeable.

Short, i am even more convinced now that some testing of it before changing it would be best, for ppl to understand how it works.
if it is ocnfigurable, it should stay default, but this is one of the rare cases where it realy makes little sense.

The only valid argument i read was BD's, that he wants to see the 3D view of a unit on a hill, but the icon of a unit in a valley.
I think this is rather confusing and should be non-default, but i agree one should be able to configure it this way.
Even if you want to make it default, rather leave it at an intermediate value like 0.8 for some time.

Suggestion: making the switch value configurable. Setting it to 1+ would imply old behaviour.

If anyone wants the behaviour overridden for one of the cameras (using a different switch value, have it to always true or always false), post here with a good description/reason why, and it will be done.

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

Posted: 24 Aug 2009, 10:55
by Auswaschbar
hoijui wrote:as it is now, this applies to all camera modes, BUT the way it is implemented, you can simply overwrite the following function (as i described it in the GIT comment, and quoted in here), eg in FPSCamera:

Code: Select all

bool GetUseDistToGroundForIcons() {
   return false;
}
So if I don't like the new settings, I recompile my own spring?
hoijui wrote:If anyone wants the behaviour overridden for one of the cameras (using a different switch value, have it to always true or always false), post here with a good description/reason why, and it will be done.
I would like it for all. Wut nao?


Edit: bug: when tilting the camera (strg+wheel), from top-down, units de-iconize at a certain angle, and some of them re-iconize on the next tilt

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

Posted: 24 Aug 2009, 11:16
by SeanHeron
I'm really suprised at how many people read (or rather - skimmed) this, assumed the worst, and demanded nothing be done. Good on you Hoijui to press on anyhow (making it optional as you had stated from the beginning).

I also agree with Hoijui, it's more natural (ie it's the behaviour I'd expect) to be showing all or non of the units as icons at that steep an angle (so I'd support it being on as default).
Auswaschbar wrote:So if I don't like the new settings, I recompile my own spring?
That can be turned around: So if I don't like the old settings, I recompile my own spring?

But really, it's beyond the point, as Hoijui already said he'd make it a config value (if I understood correctly) - so for all you "old behaviour" addicts, you can fix it back the way it was :P.

Almost forgot: Thanks Hoijui for implementing this idea!

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

Posted: 24 Aug 2009, 11:41
by Auswaschbar
This bug:
cambug.png
(4.47 KiB) Downloaded 24 times
In position A, all units are Icons
In B, all units deiconize
In C, units in 1 become Icons again

Also: why isn't it allowed to attach svg images?

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

Posted: 24 Aug 2009, 11:50
by Tobi
Auswaschbar wrote:Also: why isn't it allowed to attach svg images?
No one requested it before. Now it is allowed.

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

Posted: 24 Aug 2009, 11:54
by Auswaschbar
I think the bug is because A and B use the steep angle method. A is above the icon distance threshold, while B is below it. In C, the Low angle method kicks in, and some units get iconized again.

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

Posted: 24 Aug 2009, 12:16
by hoijui
you are welcome, SeanHeron :-)
don't worry, Aus is just having fun with me ;-)

made it configurable. config var and default is:

Code: Select all

UseDistToGroundForIcons=0.8
Setting it to 1.0 results in old behaviour, while setting it to 0.0 results in always using distance to ground.
you can set it in your config file or ingame like this:

Code: Select all

/set UseDistToGroundForIcons 0.8
yeah Auswaschbar, thats it (i had it all explained already, much more complicated though :D). best thing is to experimenting with different values for the setting.

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

Posted: 24 Aug 2009, 12:20
by hoijui
..or we could use the distance from the cam to the point where its dir meets the ground.

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

Posted: 24 Aug 2009, 12:40
by Auswaschbar
hoijui wrote:..or we could use the distance from the cam to the point where its dir meets the ground.
So when I look at sea, all units iconize, and will deiconize when I look back at land?
Also, this would look weirdwhen you look down, and then rotate the camera a bit, and suddenly all units become icons.

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

Posted: 24 Aug 2009, 12:49
by imbaczek
suggestion would be in attached svg, but: It was not possible to determine the dimensions of the image.
cameramode.png
cameramode.png (8.76 KiB) Viewed 1496 times

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

Posted: 24 Aug 2009, 12:50
by Otherside
Do not want.

not everyone plays in OTA view >_>

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

Posted: 24 Aug 2009, 13:03
by Auswaschbar
Distance to plane do not want
planebug.png
(6.09 KiB) Downloaded 27 times

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

Posted: 24 Aug 2009, 13:08
by imbaczek
true, but also the problem should be less when you draw the frustum.

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

Posted: 24 Aug 2009, 13:27
by Auswaschbar
Changing the value to something 0.95-ish makes the bug go away, and also looks way better. Do you mind if I change the default?

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

Posted: 24 Aug 2009, 13:30
by hoijui
change it

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

Posted: 24 Aug 2009, 15:09
by Gnomre
Image