Home▸Articles▸Build & Play

The Science Behind Night City: A Virtual Reality Exploration

Discover the principles that bring a digital city to life at night.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

Creating the Night Sky

The simulation creates a realistic night sky by rendering stars, planets, and the moon based on their positions relative to Earth. The brightness of these celestial bodies is calculated using photometric formulas that take into account their distance from the observer and their intrinsic luminosity.

Additionally, atmospheric effects such as light scattering are simulated to create the familiar twinkle of stars and the blue-to-black color gradient in the sky.

Rendering Rain and Flying Vehicles

Rain is rendered using particle systems where each droplet is a small, animated object that follows predefined paths. The movement and interaction of these particles create realistic rain effects, such as splashing on surfaces and the way light refracts through water droplets.

Flying vehicles are modeled with 3D geometry and textured surfaces to give them a lifelike appearance. Their motion is calculated using physics engines that simulate aerodynamics and engine thrust, ensuring they behave realistically in flight.

live demo · related simulation● LIVE

Panoramic View and Interaction

The panoramic view from above allows for an immersive experience by providing a 360-degree perspective of the city. This is achieved through the use of spherical or cylindrical projections that map the 2D screen to a 3D space, giving the illusion of looking around in any direction.

Interaction with the environment, such as zooming and rotating the view, is handled by input devices like mice or touchscreens. These inputs are translated into camera movements within the virtual world, providing users with a sense of control over their exploration.

Real-World Applications

The techniques used in Night City have real-world applications in fields such as video game development and architectural visualization. They also play a crucial role in training simulations for pilots, astronauts, and military personnel.

Moreover, these technologies can be adapted to create realistic virtual environments for educational purposes, helping students understand complex concepts through interactive experiences.

Frequently asked questions

How is the night sky realistically rendered?

The night sky is rendered using photometric formulas and atmospheric scattering effects to simulate starlight and moonlight. Celestial bodies are positioned based on their real-world coordinates, ensuring accurate representation.

What technology is used for rendering rain and flying vehicles?

Rain is created with particle systems, while flying vehicles use 3D modeling and physics engines to simulate realistic movement and behavior. Both techniques are fundamental in creating immersive virtual environments.

How does the panoramic view work in Night City?

The panoramic view uses spherical or cylindrical projections to map a 2D screen onto a 3D space, allowing users to explore the environment from any angle. This is achieved through camera movements controlled by user input.

What are some real-world applications of these techniques?

These techniques are used in video game development, architectural visualization, and training simulations for various professions. They also enhance educational experiences by providing interactive and realistic environments.

Try it live

Everything above runs in your browser — open Night City and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Night City simulation

What did you find?

Add reproduction steps (optional)