The way smoke vision is calculated is this:
Each tile of smoke has a thickness value. The sight line from your unit to the enemy unit is checked, and all smoke tiles along that path are added up. It determines if the smoke is or is not thick enough to obscure the vision.
Smoke created by explosives is much thinner than smoke creates by smoke blasts. Smoke spreads and thins out over time.
It is not uncommon for the game to get a different result on whether or not unit A can see unit B vs. whether or not unit B can see unit A. That means sometimes the alien will spot you first, sometimes you will spot them first, but usually you will both spot each other at the same time.
In openXcom Extended (OXCE), there is an attribute called heatVision which reduces the effective amount of smoke as far as that unit's vision is concerned, and another called psiVision which entirely ignores line of sight concerns for spotting units. The vanilla game does not use these attributes (so all aliens have the same capacity to see through smoke as player soldiers do), but mods may take advantage of these either for player units or for aliens.
Night vision also works unintuitively. Depending on the light level of the battlescape, it is determined to either be "day" or "night. On some tilesets it can look as dark as night yet still count as "day" in which units can always see out to their maximum vision range (default: 20 tiles). But if it is "night", then things work differently:
- In the original game, the player and AI units all had exactly the same vision. However since player units emitted light and aliens did not, it meant that the aliens could see player units as though it were day.
- OpenXcom preserves this alien night vision in the vanilla game, to the extent that even if you turn your soldiers' lights off, the aliens can still see you just fine.
- OXCE provides lots of options for mods to tweak exactly how unit vision behaves in the day or night. Some units may even have camouflage which makes it harder for other units to spot them in the day, night, or both.