CoalitionArma / Coalition-Squad-Interface

A custom UI mod for Coalitions Reforger Server.
https://discord.gg/the-coalition
5 stars 2 forks source link

Scale visibility based on time #44

Open tanaaKa opened 4 months ago

tanaaKa commented 4 months ago

Name tags should have max brightness based on world illumination values. Visibility distance should also be capped at a lower value when dark.

Quailsnap commented 4 months ago

Is this meant to make nametags present but hard-to-see when it's dark out? I don't think it's great UX to make things UI elements half-visible, and you'll also face moments where someone is standing under a lamppost but you still can't read their dim nametag just because it's night-time. I tried something similar with WH nametags, ages ago, and it varied between ugly and unreadable.

Regarding the second part, visibility distance in general -- ACE3 has an old implementation here that measures ambient light if you want to find it for each unit in FoV. Not sure how viable in terms of functions available and performance. It's in SQF, but may provide some process insight: https://github.com/acemod/ACE3/blob/41cfed9bd28cd4f8c368007207a1f52c6b3ff2d1/addons/map/functions/fnc_determineMapLight.sqf#L57

tanaaKa commented 4 months ago

This is the only answer to this problem: image

Nametags should not show players before players are visible.

Quailsnap commented 4 months ago

Totally true, and that would be fixed by nametag range being shorter at night (for those without NODs). That said, be careful making them more transparent/darker at night, because they may be hard to read when directly illuminated by a flashlight or other light source.

Njpatman commented 4 months ago

I wonder if there's a way to check the base character's specular level so we can check that level locally and see if the player can actually see another player before displaying the nametag.

Quailsnap commented 4 months ago

Do you already do FoV culling?

tanaaKa commented 4 months ago

We're using BI logic, so yes.

Njpatman commented 3 months ago

I have looked into this and don't believe something like this is possible. I will contact some arma devs to see what kind of input they can give.

Njpatman commented 1 month ago

There's some visibility values saved in clothing components in 1.2, will look into it after experimental comes to the main game