The End Of The Corridor - Final Render

The End Of The Corridor

by Melih Aksoy

Abstract

A Sith Probe droid hovers menacingly in a dimly lit Venator-class Star Destroyer corridor while an eight-legged walker robot lurks in the shadows at the far end. Rows of glowing computer screens line the walls, casting an eerie cyan glow across the metallic surfaces. The scene captures a moment frozen in time—machines patrolling a space designed for war.

Motivation: Inspired by the Star Wars universe, this scene explores the interplay between harsh industrial lighting and deep shadows that define the aesthetic of the Galactic Republic's capital ships.

Artistic Intention: The composition draws the viewer's eye down the corridor, creating a sense of depth and mystery. The cyan glow from the computer screens contrasts with the warm point lights, evoking the cold efficiency of military vessel interiors. The droids add a sense of surveillance and tension to the otherwise sterile environment.

Hidden Details: Look closely at the screens on the walls—each emits a subtle glow that bleeds into the surrounding panels through our bloom effect. The depth of field gently blurs the eight-legged robot at the back, drawing focus to the Sith Probe while maintaining the sense of an expansive space.

Technical Specifications

3,946s
Render Time
1920×1080
Resolution
546,545
Triangles
512
Samples/Pixel

Hardware

12th Gen Intel® Core™ i7-12700H (12 threads used)

Implemented Features

Feature Points Implementation
Q - MIS Path Tracer 40 pathtracer.cpp
H - Image Denoising (Intel OIDN) 25 denoise.cpp
E - Normal Mapping 20 instance.cpp
M.1 - Basic Area Light Sampling 20 area.cpp
O.1 - Thin Lens Camera (DoF) 20 thinlens.cpp
M.2 - Improved Area Light Sampling 15 sphere.cpp, rectangle.cpp
D - Post Processing (Bloom) 15 bloom.cpp, tonemap.cpp
P.1 - Homogeneous Volumes (Partial) ~15-18 volume.cpp
MIS Path Tracer Demo
Q - MIS Path Tracer 40 pts

Full implementation of Multiple Importance Sampling combining Next-Event Estimation (NEE) with BSDF sampling using the power heuristic for optimal variance reduction.

Implementation

File: src/integrators/pathtracer.cpp

Modifications: Extended the path tracer to support both NEE and BSDF sampling strategies. Added power heuristic weighting (β=2) for combining PDF contributions.

Biggest Challenge

The most time-consuming bug was correctly handling the PDF conversion between area measure and solid angle measure when a BSDF-sampled ray hits an area light. The geometry term (distance² / cos θ) must be applied consistently on both sampling strategies to avoid energy loss or fireflies.

Denoised Result
H - Image Denoising 25 pts

Integration of Intel Open Image Denoise (OIDN) with support for auxiliary buffers (albedo and normal AOVs) for superior denoising quality.

Implementation

File: src/postprocesses/denoise.cpp

Modifications: Created a new post-process that interfaces with OIDN. Also implemented fallback bilateral and NL-means filters for systems without OIDN.

Biggest Challenge

Getting the normal buffer format correct was tricky—OIDN expects normals in [-1,1] range, but our AOV stores them as colors in [0,1]. Additionally, ensuring HDR mode was enabled to preserve bright highlights took some debugging.

Normal Mapping Demo
E - Normal Mapping 20 pts

Tangent-space normal map support that transforms encoded normals from texture space to world space for detailed surface shading without additional geometry.

Implementation

File: src/core/instance.cpp (lines 24-47)

Modifications: Extended transformFrame() to sample the normal texture, decode from [0,1] to [-1,1], and transform using the TBN matrix (tangent, bitangent, normal).

Biggest Challenge

Ensuring the tangent vectors were correctly computed and orthonormalized was crucial. Initial attempts produced shading artifacts because the bitangent direction was flipped on some faces, requiring careful handling of handedness.

Area Light Demo
M.1 - Basic Area Light Sampling 20 pts

Area lights that wrap emissive instances, allowing arbitrary shapes with emission to be sampled as light sources with proper PDF conversion.

Implementation

File: src/lights/area.cpp

Modifications: Created AreaLight class that samples points on emissive geometry, evaluates emission, and converts area PDF to solid angle PDF using the geometry term.

Biggest Challenge

The backface culling logic needed careful consideration—sampling a point on the back of an area light should return invalid, but this must be checked using the sampled normal and direction to the shading point, not just a simple dot product.

Depth of Field Demo
O.1 - Thin Lens Camera 20 pts

Thin lens camera model simulating realistic depth of field effects with configurable aperture radius and focal distance.

Implementation

File: src/cameras/thinlens.cpp

Modifications: Implemented the thin lens model: compute focal point on the focal plane, sample point on lens disk using concentric disk mapping, then create ray from lens point through focal point.

Biggest Challenge

Understanding the geometric relationship between aperture, focal distance, and blur radius was initially confusing. The key insight was that rays should converge at the focal plane, not diverge from it—getting this backwards produced inverted blur.

Area Sampling Shapes
M.2 - Improved Area Light Sampling 15 pts

Direct area sampling for primitive shapes (rectangles, spheres) with analytically computed PDFs for more efficient light sampling.

Implementation

Files: src/shapes/sphere.cpp, src/shapes/rectangle.cpp

Modifications: Added sampleArea() methods that uniformly sample points on the shape surface and return proper area PDFs.

Biggest Challenge

For spheres, ensuring uniform distribution on the surface required using proper spherical coordinates with cos(θ) sampling. Initial uniform θ sampling produced visible banding near the poles.

Bloom Effect
D - Post Processing (Bloom) 15 pts

Multi-pass Gaussian bloom effect that extracts bright areas above a threshold and applies multiple blur passes at different scales for realistic light bleeding.

Implementation

File: src/postprocesses/bloom.cpp

Modifications: Implemented separable Gaussian blur (horizontal + vertical passes), threshold-based bright pixel extraction, and multi-scale bloom combining layers at 1×, 2×, and 4× blur radius.

Biggest Challenge

Performance optimization was critical—the naive implementation was extremely slow. Using separable filters (O(n) instead of O(n²)) and pre-computing kernel weights made the bloom practical for high-resolution images.

Volumetric Rendering
P.1 - Homogeneous Volumes ~15-18 pts

Partial implementation of homogeneous participating media with colored scattering using the Henyey-Greenstein phase function and bounded volume support.

Implementation

File: src/shapes/volume.cpp

Status: Has colored scattering (HG albedo) and bounded volumes, but emission within the volume is not yet supported.

Biggest Challenge

The transmittance calculation through participating media required careful integration with the existing shadow ray infrastructure. Ensuring consistency between surface and volume sampling was the main difficulty.

Post-Processing Pipeline

The final image goes through a multi-stage post-processing pipeline to achieve the cinematic look:

Before Denoising

Raw path-traced output (512 spp)

After Bloom

After bloom effect

Albedo AOV

Albedo AOV (for denoising)

Normals AOV

Normals AOV (for denoising)

Pipeline Stages

  1. Path Tracing: MIS path tracer with NEE (512 samples, depth 10)
  2. AOV Generation: Separate passes for albedo and normals
  3. Bloom: Threshold 1.5, intensity 0.1, multi-scale Gaussian blur
  4. Denoising: Intel OIDN with albedo/normal guidance
  5. Tone Mapping: Reinhard operator for HDR to LDR conversion

Creative Process

Concept and References

The scene was inspired by the Star Wars universe, specifically the interior corridors of Venator-class Star Destroyers from The Clone Wars era. Key reference points included:

Lighting Design

The scene uses a combination of light sources to create atmosphere:

Camera Setup

The thin lens camera is positioned to look down the corridor, with:

Third-Party Assets

All models were converted to PLY format and textures were processed for use with the renderer.