An open-source 3D content-creation suite built around a hybrid CPU/GPU path tracer.
Model, sculpt, paint, groom, simulate, light, animate, and render β in one application.

What it is β’ Workspaces β’ Rendering β’ Simulation β’ Quick Start β’ Architecture β’ Gallery
RayTrophi Studio began as a path-tracing renderer and has grown into a full digital-content-creation (DCC) application. It is a single desktop program where you can build a scene from scratch β polygon modeling and sculpting, texture painting, hair grooming, terrain and vegetation, fluid/gas/whitewater simulation, ocean and rivers β and render it with a physically-based path tracer that runs on three interchangeable backends (CPU, NVIDIA OptiX, and Vulkan Ray Tracing).
It is not a render farm plugin or a library. It is an interactive editor with a modern docked UI, an animation timeline, undo/redo across every tool, project save/load, and a non-destructive art-direction (Stylize) layer on top of the converged image.
- One application, full pipeline. Geometry authoring, look-dev, FX, animation, and final-frame rendering live in the same scene, the same
.rtp/.rtsproject, the same undo stack. - Three render backends, one feature set. Switch between CPU (Embree), OptiX, and Vulkan RT without changing the scene. The Vulkan path is the recommended interactive backend; OptiX and CPU remain first-class.
- Physically-based, but art-directable. Principled BSDF + spectral hair + volumetrics + DCC-grade fluids, with a Stylize layer that can repaint the result into oil/ink/toon looks without touching the underlying physics.
- Honest about its state. This is an active solo project. Where a subsystem is experimental or in progress, it says so.
Status: active development. There is no versioned release yet; the
mainbranch is the current build.
| Metric | Value |
|---|---|
| Project code / shader lines | ~259,000 |
| Project code / shader files | 360+ |
| GPU kernel & shader files | 56 (CUDA, OptiX PTX, Vulkan GLSL/RT, compute) |
| UI control points | 1,278+ |
| Render backends | CPU (Embree) Β· NVIDIA OptiX Β· Vulkan RT |
| Node systems | Terrain (36+), Animation (14+), Material (11+) |
| Last verified | 2026-06-02 |
Counts cover raytrac_sdl2/source and exclude vendored single-file libraries (simdjson, stb, json.hpp, tinyexr).
Full technical report: ARCHITECTURE.md Β· TΓΌrkΓ§e: README_TR.md
RayTrophi Studio is organized into task-focused workspaces that all operate on the same live scene:
| Workspace | What you do there |
|---|---|
| Layout / Scene | Import assets, place and transform objects/lights/cameras, build hierarchy, box-select, gizmo-edit |
| Modeling | Polygon editing (extrude, inset, bevel, loop cut, weld, merge, UV unwrap), modifier stack |
| Sculpt | Brush-based surface sculpting on meshes and terrain (PBVH-accelerated) |
| Paint | Layered PBR texture painting directly on the mesh (multi-channel, blend modes) |
| Terrain | Sculpt + node-graph terrain, hydraulic/thermal erosion, heightmap I/O |
| Foliage / Scatter | Rule-based and hand-painted instancing of grass, trees, rocks |
| Hair | Groom, comb, cut/grow, simulate, and render hair & fur |
| Simulation | Liquid (APIC/FLIP), gas/smoke/fire, whitewater, rigid + soft bodies & cloth (Jolt), mesh/primitive colliders, force fields, emitters |
| Animation | Multi-track timeline, per-channel keyframing, skeletal animation, animation graph |
| Render / Look-dev | Pick a backend, set sampling/quality, denoise, tonemap, and Stylize the result |
A single physically-based path tracer feeds three acceleration backends. The scene, materials, and lights are identical across all three β you choose the backend that fits the moment (CPU for headless/no-GPU, OptiX for NVIDIA curve hardware, Vulkan RT for fast interactive look-dev).
- Principled BSDF (Disney-style uber-shader): albedo, roughness, metallic, specular, clearcoat, sheen, anisotropy, transmission/IOR
- Lambertian, Metal, Dielectric classic models
- Subsurface scattering (SSS)
- Spectral / melanin-based hair BSDF
- Volumetric rendering with NanoVDB sparse volumes and procedural noise density
- Full texture support (albedo, roughness, metallic, normal, emission, transmission, opacity) with sRGB/linear handling
- Point, directional, spot, and mesh-based area lights; emissive materials
- HDR/EXR environment maps (equirectangular)
- Nishita physical sky with day/night cycle, procedural stars & moon (phases, horizon magnification, atmospheric dimming), sun glow, and automatic sunβdirectional-light sync
- Global volumetric clouds (Henyey-Greenstein scattering, adaptive ray marching, coverage/density/altitude/wind controls, soft horizon fade) β works over HDRI, solid color, or Nishita sky
- Soft shadows with multiple importance sampling (MIS)
- Progressive accumulative path tracing with adaptive sampling (focuses samples on noisy regions)
- Depth of field, motion blur
- Intel Open Image Denoise (OIDN) β CPU and CUDA-accelerated paths, viewport and final
- Tone mapping and post-processing
β‘ Feature parity: OptiX vs Vulkan RT (expand)
| Feature | OptiX | Vulkan RT | Notes |
|---|---|---|---|
| Principled BSDF | β | β | Full parity |
| Lambertian / Metal / Dielectric | β | β | Full parity |
| Subsurface Scattering (SSS) | β | β | Minor colour tint difference |
| Clearcoat & Anisotropic | β | β | Full parity |
| Volumetric rendering (NanoVDB) | β | β | Persistent leaf-cache accessor; equal or faster than OptiX interactively |
| Hair system | β | β | Analytical LSS intersection + LSS-tight AABBs; outperforms OptiX hardware curves here |
| HDR / EXR environment | β | β | Full parity |
| Nishita sky & day/night | β | β | Full parity |
| Volumetric clouds | β | π§ͺ | Minor scattering differences |
| Water / Ocean (FFT) | β | π§ͺ | Wave reflection differences |
| Skeletal animation (GPU skinning) | β | β | Vulkan compute shader |
| Depth of field / motion blur | β | β | Full parity |
| Soft shadows (MIS) / area lights | β | β | Full parity |
| Tone mapping & post-FX | β | β | GPU compute tonemap on Vulkan, fused into the trace command buffer |
| OIDN denoising | β | β | OptiX has the tighter CUDA-interop path |
| Adaptive / progressive render | β | β | Vulkan converges faster (lower per-frame overhead) |
| Stylize layer | β | β | CPU / Vulkan / OptiX produce matched output |
Legend: β full support Β |Β π§ͺ supported, minor output differences possible
π Interactive benchmarks (measured) (expand)
Same scene, same settings, same hardware, camera in motion. These are interactive-viewport frame rates, not final-frame numbers. On static scenes adaptive sampling pushes both backends well past 500 fps as pixels converge.
| Scene | Vulkan RT | OptiX | Ratio |
|---|---|---|---|
| Mesh-heavy + Nishita atmosphere | 600 fps | 50 fps | 12.0Γ |
| Hair-heavy (cubic B-spline strands, LSS intersection) | 300 fps | 70 fps | 4.3Γ |
| Volume / VDB cloud (Fast preset) | 300 fps | 200 fps | 1.5Γ |
| Volume / VDB cloud (Balanced preset) | comparable | comparable | β1.0Γ |
| Volume / VDB cloud (Exact preset, camera moving) | 16 fps | 23 fps | 0.7Γ |
Why Vulkan leads interactively: async fence-based ping-pong frame pipeline (no per-frame vkQueueWaitIdle), GPU compute tonemap into small RGBA8 staging, analytical Linear-Swept-Sphere hair intersection, persistent NanoVDB read-accessor across march steps, and a lean kernel without per-pixel accumulation atomics in the hot path.
Where OptiX still wins: the Exact volume preset during camera motion (hardware CUDA NanoVDB texture path), CUDA-native zero-copy OIDN interop, and final stills that specifically need NVIDIA's curve hardware primitives.
A multi-threaded grid- and particle-based FX suite with CUDA and CPU backends, integrated directly into the path-traced render pipeline. Multiple simulation domains, emitters, colliders, rigid bodies, and force fields coexist in one workspace and are saved with the project.
- Hybrid APIC/FLIP solver with adjustable blending, preserving angular momentum and minimizing numerical dissipation
- MAC staggered grid with PCG + MIC(0) preconditioned pressure solve (CPU) and a Jacobi-PCG / multigrid (MGPCG) pressure solve on the GPU
- Variational (cut-cell) solid coupling (Batty/Bridson): fractional MAC-face weights give sub-grid-accurate collisions against analytic primitives, and moving colliders impart real momentum/splash through the pressure solve
- Ghost-fluid 2nd-order free surface (Gibou/Enright): sub-cell level set removes the voxel "staircase" on the liquid surface
- Keyframe-animated colliders are re-posed per sub-step so the fluid tracks moving geometry
- Adaptive resolution, open/closed boundary modes, dynamic particle reseeding to prevent leaks, fluid material presets (Water, Oil, Custom)
- Multi-threaded dense-grid solver for temperature, soot, and fuel density
- Combustion dynamics (ignition, heat release, flame dissipation) with procedural FBM curl-noise turbulence
- Sparse-VDB active-voxel Poisson solve for efficient large domains
Secondary spray (airborne), foam (surface), and bubbles (submerged) generated from trapped-air and wave-crest potentials, and advected through the solver with full collider response:
- Dynamic PBR material routing β transmissive droplets for spray, scattering rough-white PBR for foam, silvery semi-transmissive bubbles β with a Custom Material Override to bind any scene material
- Underwater bubble TIR correction to reduce total-internal-reflection dark-circle artifacts
- Newton-Raphson wave snapping projects surface foam onto the smoothed level-set water mesh, eliminating floating foam on wavy water
- Deterministic hash-based size variation and smooth dissolve near end-of-life
- Adjustable icosphere subdivision (0β3) for close-up detail
- Jolt Physics-backed body solver on the shared simulation timeline: tag any scene object Static, Dynamic, or Kinematic, with box / sphere / capsule / oriented-box primitives fitted to its bounds, or a mesh collider that uses the object's real geometry β an exact triangle mesh for static bodies and a convex hull for moving ones, so a collider driven by an SDF/mesh source collides against the true shape instead of an OBB
- Soft bodies & cloth. Tag a mesh as a deformable soft body or cloth (Jolt soft-body solver): per-body stiffness/compliance, pressure (closed-volume inflation), damping, iterations, vertex collision thickness, and vertex pinning (hold rest vertices fixed to hang cloth from corners/edges); the deformed mesh is written straight back for rendering
- Per-body mass or auto-mass-from-density, linear & angular damping, friction, restitution, gravity scale, initial linear/angular velocity, sleep, and per-axis translation/rotation locks
- Force fields drive every body kind β rigid (force at the COM), soft & cloth (per-vertex velocity push, pinned vertices excluded)
- Two-way fluid coupling. A body is voxelized into the liquid/gas grid as a moving solid through the variational cut-cell path, so it pushes and splashes the fluid; in return, buoyancy and linear/angular drag sampled from the fluid level set act back on the body β float, sink, and bob driven by the same field the renderer reads
- Kinematic bodies are keyframe-driven (animated colliders that stir the fluid); Dynamic bodies are owned by the solver, so the timeline never fights the simulated pose
- Selective re-bake. Editing or moving a body only drops the (expensive) fluid bake when that body actually couples to a fluid domain β an unrelated static prop re-simulates on its own (cheap) while the liquid cache is preserved
- Yu-Turk anisotropic surface reconstruction with Laplacian smoothing for the render-time liquid mesh; surface resolution decoupled from the sim grid
- SimCache disk baking β bake heavy liquid/foam/gas frames to binary
.simcachefiles next to the project and scrub the timeline in real time without re-simulating - Full serialization of simulation state, domain settings, custom materials, timeline caches, and presets into
.rtp/.rts
The GPU MGPCG pressure path is live; the GPU port of variational solids + ghost-fluid (Stage 2) is in progress, as are surface tension, implicit viscosity, and narrow-band/sparse performance work for full DCC parity.
- Real-time sculpting brushes (raise, lower, smooth, flatten, stamp)
- Hydraulic & thermal erosion (GPU kernels) for natural riverbeds, valleys, and sediment transport
- Node-based, non-destructive workflow (36+ terrain nodes) combining noise, filters, and masks
- 16-bit heightmap import/export (World Machine / Gaea workflows)
- GPU-instanced grass, trees, and rocks at scale via hardware acceleration
- Rule-based placement (slope, height, texture mask) with collision avoidance
- Paint mode for hand-placed detail
- Global dynamic wind (strength, direction, gust)
- GPU simulated and rendered; analytical LSS intersection on Vulkan
- Grooming brushes: comb, cut/grow, smooth
- Physics: strands collide with meshes and respond to gravity/forces
- Melanin-based hair BSDF
- FFT ocean with foam generation, caustics, and depth-based underwater volumetrics
- Spline/bezier rivers with auto-carving into terrain, flow mapping, and flow-driven object drift
- Edit Mesh mode β extrude, inset, bevel, loop cut, delete/merge/weld/split, flip normal, smart re-triangulation, UV auto-unwrap/smart packer
- Sculpt mode β Grab, Draw, Inflate, Layer, Clay, Clay Strips, Pinch, Smooth, Flatten, Scrape, Crease; ShiftβSmooth, Ctrlβinvert; X/Y/Z mirror; PBVH pruning for dense meshes; modifier-stack subdivision; shared mesh/terrain sculpt path
- Mesh Paint β layered PBR painting (Base Color, Normal, Roughness, Metallic, Emission, Mask, Transmission, Opacity); paint/erase/soften/stamp/fill/clone/spray brushes; per-layer stack with Normal/Add/Multiply/Screen/Overlay blend modes; height-to-normal baking; dirty-region GPU updates; serialized into the project as PNG blobs
- Full undo/redo across all edit modes with optional step grouping; mesh edits propagate to CPU/GPU buffers and export as GLB with modifiers applied
A post-convergence layer that reads the path-traced result + AOV buffers and restyles the image without changing scene geometry, materials, or lights. Domain-masked compositing keeps sky, material, outline, and world effects separate.
- Sky layer β view-ray-locked stylized gradients, cloud banks, and sun (Painterly Clouds, Cartoon Cel, Sunset Bands, Ink Wash, Clear Gradient)
- Painterly material layer β surface-locked stroke fields (no screen-space swimming), palette influence, edge respect, pigment thickness, and a Wet Oil model (Body/Load/Pickup/Deposit/Buildup)
- Outline layer β depth/normal/material-discontinuity edges with Ink, Oil, Pencil, Dry Brush, and Pressure line types
- Profiles β Painterly Oil, Gouache, Ink + Wash, Graphic Toon, Clay/Maquette, Dreamy Sunset
- Backend parity β CPU, Vulkan compute (
stylize.comp), and OptiX CUDA (StylizeKernel.cu) produce matched output; re-applies without resetting accumulation
- Vulkan raster Solid + Matcap mode for fast sculpt/paint feedback (drop matcaps in
raytrac_sdl2/assets/matcaps/) - Ray-traced interactive preview on any backend, with idle-preview during gizmo manipulation
- Multi-track timeline & Graph Editor with group hierarchy (Objects / Lights / Cameras / World), independent Bezier curve channel animation (Position, Rotation, Scale, Light settings, Camera parameters, and PBR Material properties), resizable splitter panel, collapsible group headers with bulk visibility toggles, and shortcut-driven keyframe editing (drag handles, delete/fit shortcuts).
- Skeletal animation with quaternion interpolation and GPU compute skinning; animation graph (14+ nodes) for state machines and IK blend spaces
- Batch / sequence rendering β export animation to image sequences (with material keyframes), cancellable mid-render, simulation-driven per frame
- Modern ImGui docked dark UI, render quality presets (Low/Medium/High/Ultra), dynamic resolution scaling, scene hierarchy, material editor, performance metrics
- Selection β box select (right-drag), mixed light+object selection, Ctrl+click add/remove, select all/none, multi-object transform
- Undo/redo for transforms, deletion, duplication, lights β Ctrl+Z / Ctrl+Y
- Metadata-driven discovery for
model,anim_clip,vdb, andvdb_sequence - Built-in project
assetsroot plus user-added local libraries - Asset cards with preview/thumbnail cache, favorites, tags, saved collections and smart folders
- Drag-and-drop placement with viewport ghost preview and auto-selection
- Project-scoped UI persistence for layout, library list, and filters
Required
- Visual Studio 2022 (MSVC v143) β recommended build system
- Windows 10/11 (x64)
- CMake 3.20+ (optional; VS2022 preferred)
Optional (GPU rendering)
- NVIDIA GPU (SM 5.0+): GTX 9xx/10xx/16xx or RTX series
- CUDA Toolkit 12.0+, OptiX 7.x/8.x SDK
- Vulkan SDK 1.3+ (for the Vulkan RT path)
| GPU Series | Architecture | Mode | Performance |
|---|---|---|---|
| RTX 40xx | Ada Lovelace | Hardware RT | β‘ Fastest |
| RTX 30xx | Ampere | Hardware RT | β‘ Very fast |
| RTX 20xx | Turing | Hardware RT | β‘ Fast |
| GTX 16xx | Turing | Compute | πΆ Good |
| GTX 10xx | Pascal | Compute | πΆ Moderate |
| GTX 9xx | Maxwell | Compute | πΆ Slower |
The project resolves dependencies via system environment variables. Set these to your local install paths before building:
| Variable | Description | Example |
|---|---|---|
SDL2_ROOT |
SDL2 root | E:\...\SDL2-2.30.4 |
OPTIX_ROOT |
OptiX SDK | C:\ProgramData\NVIDIA Corporation\OptiX SDK 8.0.0 |
EMBREE_ROOT |
Embree root | E:\...\embree-4.4.0.x64.windows |
OIDN_ROOT |
Intel OIDN root | E:\...\oidn-2.3.0.x64.windows |
ASSIMP_ROOT |
Assimp root | E:\...\Assimp |
CUDA_PATH |
CUDA Toolkit | C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.x (usually auto-set) |
VULKAN_SDK |
Vulkan SDK | C:\VulkanSDK\1.3.xxx.0 |
Managed dependencies: SDL2, Embree 4.x, Assimp 5.x, ImGui, OpenMP, stb_image, TinyEXR, Intel OIDN, NanoVDB, and CUDA/OptiX (optional).
Visual Studio 2022 (recommended)
git clone https://github.com/maxkemal/RayTrophi.git
cd RayTrophi/raytrac_sdl2
# Open raytrac_sdl2.vcxproj in Visual Studio 2022
# Set Release | x64, then Build > Build Solution (Ctrl+Shift+B)
# Output: x64/Release/raytracing_render_code.exeAll dependencies (DLLs, PTX, shaders, resources) are copied to the output directory automatically.
CMake
cmake -S raytrac_sdl2 -B raytrac_sdl2/build -G "Visual Studio 17 2022" -A x64
cmake --build raytrac_sdl2/build --config Release -j 12
# Output: raytrac_sdl2/build/bin/RELEASE/"RayTrophi Studio.exe"CMake keeps its executable, PTX, Vulkan shaders, and runtime DLLs isolated under build/bin/<CONFIG> so it never overwrites the VS2022 x64 output.
Launch the executable; the docked UI appears. Use File β Load Scene to import a model (GLTF recommended; 40+ formats via Assimp).
RayTrophi/
βββ raytrac_sdl2/
βββ source/
βββ src/
β βββ Core/ # Entry point (Main.cpp), project management
β βββ Render/ # Renderer, OptiX wrapper, Embree/Parallel BVH, camera, textures
β βββ Backend/ # Vulkan RT, OptiX, viewport backends, scene texture manager
β βββ Scene/ # Objects, lights, materials, instancing, mesh, BSDFs
β βββ Physics/ # Fluid (APIC/FLIP), gas, whitewater, terrain, ocean, river, sim world
β βββ Device/ # CUDA kernels (.cu/.cuh), OptiX device code, Vulkan compute
β βββ Hair/ # Hair system, strands, skinning, hair BSDF
β βββ Paint/ # Mesh & terrain paint adapters, layer stack
β βββ Stylize/ # Stylize CPU/CUDA kernels and state
β βββ Animation/ # Animation controller, nodes, Ozz runtime
β βββ Viewport/ # Viewport scene sync
β βββ Math/ # Vec/Matrix/Quaternion
β βββ UI/ # ImGui panels, timeline, gizmos, editors
β βββ Utils/ # Loaders, serialization, helpers
βββ include/ # Headers (Backend, Core, Fluid, Hair, NodeSystem, Paint, Stylize, Viewport, Utils)
Render backends
- EmbreeBVH (
Render/EmbreeBVH.cpp) β Intel CPU kernels - ParallelBVHNode (
Render/ParallelBVHNode.cpp) β custom SAH BVH, OpenMP-parallel build - OptixWrapper (
Render/OptixWrapper.cpp,Device/*.cu) β CUDA/OptiX, SBT + texture-object caching - VulkanBackend (
Backend/VulkanBackend.cpp) βVK_KHR_ray_tracing_pipeline, TLAS/BLAS refit, compute skinning, async ping-pong frame pipeline, GPU tonemap
Node systems (include/NodeSystem/) β graph core shared by the Terrain, Animation, and Material editors.


Complex architectural scene β 3.3M triangles, Embree BVH

Interior with volumetric lighting and subsurface scattering

Stylized render via the non-destructive Stylize layer
Recently shipped
- β Vulkan RT backend (interactive primary) with GPU skinning, async ping-pong pipeline, analytical LSS hair
- β Physics & particle simulation suite (APIC/FLIP liquid, gas/fire, whitewater)
- β Rigid, soft-body & cloth dynamics (Jolt Physics) β primitive/mesh colliders, vertex pinning, force-field coupling, two-way fluid coupling (solid voxelization + buoyancy/drag), selective fluid re-bake
- β GPU MGPCG fluid pressure solve (CUDA)
- β Variational cut-cell solid coupling + ghost-fluid 2nd-order free surface (CPU)
- β Multi-material whitewater PBR routing + Newton-Raphson wave snapping
- β SimCache on-disk frame baking + full simulation serialization
- β Stylize layer with CPU / Vulkan / OptiX parity
- β Sculpt mode (mesh + terrain) and layered mesh paint
Planned / in progress
- GPU port of variational solids + ghost-fluid surface (Stage 2)
- Fluid surface tension, implicit viscosity, narrow-band/sparse performance
- Binned SAH / index-based BVH / SBVH spatial splits
- USD format support
- Network / distributed rendering
- Light-path visualization & debugging
- Linux / macOS support (currently Windows-only: SDL2 + Windows dependencies)
- Windows-only today (SDL2 + Windows dependencies); Linux/macOS would require porting.
- OptiX needs an NVIDIA GPU (SM 5.0+); RTX uses hardware RT cores, GTX uses compute (slower).
- Very large scenes (>10M triangles) can stress memory.
- CMake and VS2022 use separate output folders β keep them separate to avoid mixing stale PTX/DLLs.
- Vulkan volumetric clouds and FFT ocean show minor output differences vs OptiX (see parity table).
- GPU fluid pressure is live, but variational solids + ghost-fluid surface are CPU-only for now.
Contributions are welcome β performance work, new material/FX models, format support, bug fixes, and docs.
- Fork the repo
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes
- Push and open a Pull Request
MIT License β see LICENSE.txt.
Third-party libraries and SDKs remain under their own licenses. See the Third-party components section in LICENSE.txt for Jolt Physics, Assimp, Dear ImGui, ozz-animation, Intel OIDN, Embree, OptiX/CUDA, Vulkan, SDL2, JSON libraries, stb, TinyEXR, NanoVDB/OpenVDB, miniz, and related notices.
Embree (Intel CPU ray tracing) Β· OptiX (NVIDIA GPU ray tracing) Β· Vulkan Β· Jolt Physics (rigid-body physics) Β· Assimp (asset import) Β· ImGui (UI) Β· SDL2 Β· Intel OIDN (denoising) Β· NanoVDB (sparse volumes) Β· Ozz-animation (skeletal animation) Β· stb Β· TinyEXR
Kemal DemirtaΕ β @maxkemal
- Issues: GitHub Issues
- Discussions: GitHub Discussions
β Star the repo if RayTrophi Studio is useful to you.
Made with β€οΈ and lots of β


