Skip to content

McNopper/Hyperion

Repository files navigation

Hyperion

Vulkan path-tracer for OpenPBR.

Hyperion — Titan of heavenly light, father of Helios, Selene and Eos.

Hyperion is a GPU path tracer built entirely on Vulkan 1.4 KHR ray tracing.
It implements the OpenPBR Surface v1.1 material model and outputs a physically correct, linearly encoded HDR frame every render call.


Screenshots

Cornell Box Spheres Suzanne
cornell_classic cornell_spheres cornell_suzanne
Metals Dielectrics Coat
openpbr_metals openpbr_dielectrics openpbr_coat
Fuzz Specular Organics
openpbr_fuzz openpbr_specular openpbr_organics
Thin-film Meadow IBL Textured Cube
openpbr_thinfilm meadow_scene textured_cube
A Beautiful Game (IBL) Dragon & Teapot (IBL) Advanced Transmission
ABeautifulGame dragon_teapot openpbr_advanced

Features

Rendering

  • Vulkan 1.4 KHR ray tracing pipeline (raygen / closest-hit / miss / intersection shaders)
  • Unidirectional path tracing with configurable bounce depth and samples per pixel
  • Next Event Estimation (NEE) with Multiple Importance Sampling (MIS) — balance heuristic combining BSDF pdf and light pdf; eliminates black-dot noise and halves required SPP
  • Emissive mesh area lights — per-triangle direct sampling using Shirley's sqrt-folding barycentric coordinates; area-to-solid-angle PDF conversion
  • Environment map importance sampling — 2D separable CDF (256×128) built from panorama luminance × sin(θ); MIS-weighted against BSDF paths in the miss shader; eliminates fireflies from bright suns and skies
  • Analytic spheres via VK_KHR_ray_tracing_pipeline intersection shaders
  • Image-based lighting (IBL) — equirectangular HDR panorama via env_map
  • Firefly suppression (channel-average clamping with NaN guard)
  • À trous wavelet denoiser pass
  • Headless render mode with PNG + EXR output

Material model — OpenPBR Surface v1.1

All parameters follow the OpenPBR spec naming:

Layer Parameters
Base base_weight, base_color, base_diffuse_roughness, base_metalness
Specular specular_weight, specular_color, specular_ior, specular_roughness, specular_roughness_anisotropy
Coat coat_weight, coat_color, coat_ior, coat_roughness, coat_darkening
Fuzz fuzz_weight, fuzz_color, fuzz_roughness
Emission emission_luminance, emission_color
Thin-film thin_film_weight, thin_film_thickness, thin_film_ior
Transmission transmission_weight, transmission_color, transmission_depth
Subsurface subsurface_weight, subsurface_color, subsurface_radius, subsurface_scale
Geometry geometry_opacity

Conductor reflectance uses the OpenPBR generalized-Schlick F82-tint model (base_color = F0, specular_color = the 82° tint); specular/coat microfacets use GGX with the spec's anisotropy remapping.

Color pipeline

  • All internal calculations in linear Rec.2020
  • Physical camera exposure via EV100 (ev100 scene keyword)
  • Physical environment scale via env_unit_nits (cd/m² per EXR unit)
  • Tone mapping: switchable per scene — AgX (Troy Sobotka, wide DR, natural sun highlight rolloff), ACES RRT+ODT (Stephen Hill fit), Reinhard luminance, Hable / Uncharted-2 filmic
  • Display output: SDR (sRGB), HDR10 (PQ/ST2084), scRGB — runtime negotiated with the swapchain

Bindless textures

  • Descriptor set 1, binding 4: COMBINED_IMAGE_SAMPLER array (up to 1024 entries)
  • NonUniformResourceIndex for correct divergent access
  • Per-material texture maps, each converted to the render color space at load: map_base_color, map_normal, map_orm (packed occlusion/roughness/metalness, G=roughness/B=metalness), map_emission_color

Scene format

Line-based text format (.scene) inspired by — but distinct from — Wavefront OBJ/MTL. Material libraries use the companion .mtlx format (OpenPBR keyword names; not Wavefront MTL and not MaterialX XML):

mtllib cornell.mtlx         # load material library (.mtlx)

camera
  translate  278  273  -800
  look_at    278  273   279
  vfov       39.1

ev100        7.0            # physical camera exposure
spp          64             # samples per pixel
max_depth    8

instance cornell.obj        # instantiate geometry (OBJ is geometry-only — its
  material Floor     WhiteWall   # own materials are never imported; assign here)
  material LeftWall  RedWall
  material RightWall GreenWall

sphere  60.0
  usemtl Glass
  translate  430  60  200

env_map       meadow_2_4k.exr
env_unit_nits 10000
tonemapper    agx             # aces (default) | agx | reinhard | hable

OBJ files contribute only geometry — material import from OBJ/MTL is disabled by design; all material assignments are declared in the .scene file.


Building

Requirements: Vulkan SDK 1.4, CMake 3.28+, Ninja, clang-cl, vcpkg.

cmake -S . -B build -G Ninja \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_C_COMPILER=clang-cl \
      -DCMAKE_CXX_COMPILER=clang-cl \
      -DCMAKE_TOOLCHAIN_FILE="<vcpkg-root>/scripts/buildsystems/vcpkg.cmake"

cmake --build build

Running

# Headless render → PNG + EXR  (window is hidden)
build/hyperion.exe assets/cornell_classic.scene --output screenshots/cornell_classic.png

# Interactive window (default scene)
build/hyperion.exe assets/meadow_scene.scene

Command-line flags

Flag Default Description
<scene> assets/cornell_classic.scene Path to .scene file (first positional argument)
--output <file> Headless mode: accumulate and save PNG + EXR, then exit
--spp <n> scene value / 4 Override samples per pixel
--depth <n> scene value / 8 Override maximum bounce depth
--width <n> 1920 Override render width in pixels
--height <n> 1080 Override render height in pixels
--no-validation Disable Vulkan validation layers

Tests

107 tests across unit, component, module and integration suites:

cd build && ctest --output-on-failure

Dependencies

Library Purpose
Vulkan SDK Ray tracing API
volk Vulkan loader
VMA GPU memory allocation
SDL3 Window & surface
GLM Math
stb_image PNG/JPEG load
tinyexr EXR load/save
Slang Shader language
Google Test Testing

References

The following specifications, textbooks, and learning resources informed the design of Hyperion:

Rendering & Path Tracing

Resource Relevance
Physically Based Rendering: From Theory To Implementation, 4th ed. (Pharr, Jakob, Humphreys) Path tracing, BSDF sampling, MIS balance heuristic (§13.4.3), emissive area light NEE (§12.4), env map importance sampling via 2D separable CDF (§12.5)
Veach — "Robust Monte Carlo Methods for Light Transport Simulation" (1997) Multiple Importance Sampling (MIS) — balance and power heuristics (§9.2); theoretical foundation for combining BSDF and NEE pdf estimates
Shirley, Wang & Zimmerman — "Monte Carlo Techniques for Direct Lighting Calculations" (1996) Uniform area sampling of triangles via sqrt-folding barycentric coordinates; area-to-solid-angle PDF conversion
Ray Tracing Gems I & II (Haines et al., Marrs et al.) Shadow ray precision, NEE techniques, ray tracing best practices
Ray Tracing in One Weekend series (Shirley et al.) Introductory path-tracer architecture

Vulkan & Ray Tracing API

Resource Relevance
Vulkan Specification 1.4 VK_KHR_ray_tracing_pipeline, VK_KHR_acceleration_structure, descriptor indexing
Khronos — Ray Tracing in Vulkan Pipeline setup, SBT layout, shader stages
NVIDIA — Ray Tracing Learning Library Algorithm-level ray tracing techniques (implementation uses Khronos extensions only — no vendor-specific extensions)
Slang Shading Language [raypayload] semantic, TraceRay, Vulkan binding annotations

Material Model

Resource Relevance
OpenPBR Surface Specification v1.1 Material layer stack, parameter naming (base/specular/coat/fuzz/emission/transmission)
MaterialX Standard Surface Cross-reference for PBR parameter vocabulary
Blender Principled BSDF Cross-reference for PBR parameter vocabulary

Color Science

Resource Relevance
OpenColorIO Color space transforms, ACES RRT/ODT, tonemapping nomenclature
AgX by Troy Sobotka AgX tone-mapping matrices and S-curve (MIT)
ITU-R BT.2100 PQ/ST2084 and HLG OETF for HDR display output
IEC 61966-2-1 (sRGB) sRGB EOTF for SDR display output

Scene & Asset Formats

Resource Relevance
OpenUSD Naming conventions: Prim, Xform, Mesh, Material, Light, Camera, Instance
glTF 2.0 Specification PBR material and scene graph conventions
Wavefront OBJ Geometry-only OBJ import (no MTL — materials are assigned in the .scene file)

About

Vulkan path-tracer for OpenPBR

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

 
 
 

Contributors