All Projects → Nadrin → Quartz

Nadrin / Quartz

Licence: lgpl-3.0
Vulkan RTX path tracer with a declarative ES7-like scene description language.

Projects that are alternatives of or similar to Quartz

Pbr
An implementation of physically based shading & image based lighting in D3D11, D3D12, Vulkan, and OpenGL 4.
Stars: ✭ 722 (+96.73%)
Mutual labels:  graphics, vulkan, pbr, physically-based-rendering
Vk raytrace
Ray tracing glTF scene with Vulkan
Stars: ✭ 91 (-75.2%)
Mutual labels:  vulkan, raytracing, pbr
Wickedengine
3D engine focusing on modern rendering techniques and performance.
Stars: ✭ 3,148 (+757.77%)
Mutual labels:  vulkan, raytracing, pbr
Diligentcore
Core functionality of Diligent Engine
Stars: ✭ 263 (-28.34%)
Mutual labels:  graphics, vulkan, raytracing
Vxr
General purpose engine written in C++ with emphasis on materials rendering (PBR, clear coat, anisotropy, iridescence)
Stars: ✭ 181 (-50.68%)
Mutual labels:  graphics, pbr, physically-based-rendering
Filament
Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
Stars: ✭ 13,215 (+3500.82%)
Mutual labels:  graphics, vulkan, pbr
Diligentengine
A modern cross-platform low-level graphics library and rendering framework
Stars: ✭ 2,142 (+483.65%)
Mutual labels:  vulkan, raytracing, pbr
Flycube
Graphics API wrapper is written in C++ on top of Directx 12 and Vulkan. Provides main features including ray tracing.
Stars: ✭ 78 (-78.75%)
Mutual labels:  graphics, vulkan, raytracing
Cluster
Clustered shading implementation with bgfx
Stars: ✭ 180 (-50.95%)
Mutual labels:  graphics, pbr, physically-based-rendering
Nabla
OpenGL/OpenGL ES/Vulkan/CUDA/OptiX Modular Rendering Framework for PC/Linux/Android
Stars: ✭ 235 (-35.97%)
Mutual labels:  vulkan, raytracing, pbr
QDashBoard
Sample dashboard developed with QML. Login, plots and several screens.
Stars: ✭ 34 (-90.74%)
Mutual labels:  qt, qml
MoravaEngine
2D/3D graphics engine written in C++ language. It currently supports the following graphics APIs: OpenGL 3.3+, Vulkan 1.2, DirectX 11. Its current purpose is to experiment with various CG concepts and techniques.
Stars: ✭ 129 (-64.85%)
Mutual labels:  vulkan, pbr
vaktisalah
a Qt-Based Prayer Times application for Win/Linux/Mac
Stars: ✭ 26 (-92.92%)
Mutual labels:  qt, qml
appcenter
🚀 App Center for Liri OS
Stars: ✭ 26 (-92.92%)
Mutual labels:  qt, qml
CLUSEK-RT
Vulkan based C++ ray-tracing game engine.
Stars: ✭ 24 (-93.46%)
Mutual labels:  vulkan, raytracing
QmlControls
Qt / Qml 控件
Stars: ✭ 65 (-82.29%)
Mutual labels:  qt, qml
Mirage
A fancy, customizable, keyboard-operable Qt/QML & Python Matrix chat client for encrypted and decentralized communication.
Stars: ✭ 257 (-29.97%)
Mutual labels:  qt, qml
qtlottie
QtLottie is a tiny C++ library that can render Adobe® After Effects™ animations exported as JSON with Bodymovin.
Stars: ✭ 23 (-93.73%)
Mutual labels:  qt, qml
Edxray
A physically based renderer which implements many state of the art techniques in light transport simulation, material modeling, sampling and reconstruction.
Stars: ✭ 270 (-26.43%)
Mutual labels:  graphics, raytracing
Liblava
🌋 A modern and easy-to-use library for the Vulkan API
Stars: ✭ 275 (-25.07%)
Mutual labels:  graphics, vulkan

Quartz

© 2018 - 2019 Michał Siejak (@Nadrin)

A physically based GPU path tracing renderer with a declarative scene description language based on ES7.

Powered by Qt 3D, NVIDIA RTX & Vulkan.

Images rendered by Quartz

Current release

Overview

Quartz consists of several components:

  • At its core is a raytracing aspect for Qt 3D implemented by the Qt3DRaytrace module. It provides both C++ and QML APIs for use in Qt 3D based applications and is a drop-in replacement for Qt3DRender (rasterization-based rendering aspect). While not (yet) on par with Qt3DRender feature set, many Qt3DRaytrace types are named the same and provide similar functionality, thus making the two aspects somewhat analogous.
  • A standalone renderer application that can load and render arbitrary scenes in Qt 3D QML format. It provides live, progressive preview and can save to many LDR and HDR image formats.
  • An "extras" module (Qt3DRaytraceExtras) providing a set of prebuilt elements and various auxiliary utilities.
  • A command-line tool for assisting in conversion of complex 3D scenes to QML-defined hierarchies (scene2qml).

Features

This project is still a work in progress. Items without a check mark are planned but not yet implemented at this time.

  • [x] Unidirectional path tracing
  • [x] Multiple importance sampling (MIS)
  • [x] Next event estimation
  • [x] Russian Roulette path termination
  • [x] Physically based BRDF with metalness workflow (based on Unreal Engine 4 material model)
  • [x] Triangle mesh geometry
  • [x] Texture mapping (albedo, roughness & metalness maps)
  • [x] Instancing
  • [x] Distant (directional) lights
  • [x] Area lights (emissive triangle meshes)
  • [x] IBL environment probes
  • [x] Thin lens model with depth of field
  • [x] Reinhard tone-mapping operator
  • [x] Interactive camera controller
  • [ ] Wavefront based rendering architecture
  • [ ] Normal mapping
  • [ ] Texture LOD selection via ray differentials
  • [ ] Transmission (non-opaque BSDF)
  • [ ] Stratified and low-discrepancy sampling
  • [ ] Denoising
  • [ ] Importance sampling of IBL probes
  • [ ] Gaussian reconstruction filter
  • [ ] Bloom

System requirements

Quartz requires a NVIDIA GPU with support for the following Vulkan extensions:

  • VK_KHR_swapchain
  • VK_NV_ray_tracing
  • VK_EXT_descriptor_indexing

Usage

To use the standalone renderer run Quartz.exe (or ./quartz, on Linux) and select a QML scene file in the open file dialog. Alternatively you can use the command line:

Quartz.exe [-x <viewport_width>] [-y <viewport_height>] [path_to_qml_file]

If the opened QML file contains an instance of FirstPersonCameraController the camera can be controlled interactively. Press and hold either left or right mouse button and drag the mouse around to rotate the view. Use the usual W, S, A, and D for movement. Q and E move up and down respectively.

Press F2 to save an output image file. Saving to HDR (Radiance) format writes a raw floating-point image in linear space. Saving to any other format writes a tone-mapped, gamma corrected image.

QML scene description language

QML is a declarative language based on ES7, used by Qt 3D (and thus Quartz) to describe scene hierarchy and all required resources like textures and triangle meshes.

Each QML file consists of a root Entity and any number of child nodes, which themselves can also contain child nodes (thus forming a DAG). In most cases a Node is either an Entity or a Component. Entities can contain a number of components (but no more than one component of each type). Examples of components include: Transform, Material, and Mesh.

Every node type exposes some number of properties. A property can be bound to a simple value like 42, a node instance, or to an arbitrary JavaScript expression. The id property is special and uniquely identifies an instance of a node.

Qt 3D & QML documentation:

"Hello, World" in Quartz QML

Proper documentation of Quartz QML types is still in the oven. In the meantime here's a simple QML scene to serve as an example:

import QtQuick 2.0
import Qt3D.Core 2.0
import Qt3D.Raytrace 1.0

Entity {
    id: root
    components: [
        RenderSettings {
            camera: camera
            skyColor: "#00C5FF"
            skyIntensity: 1
        }
    ]
    Camera {
        id: camera
        position: Qt.vector3d(0, 0, 2.6)
        exposure: 1.0
        fieldOfView: 60
    }
    Entity {
        Transform {
            id: sunTransform
            rotationX: 60
            rotationY: -15
            rotationZ: 35
        }
        DistantLight {
            id: sunLight
            color: Qt3DRaytrace.lrgba(1.0, 0.9, 0.8)
            intensity: 5
        }
        components: [ sunTransform, sunLight ]
    }
    Entity {
        Transform {
            id: monkeyTransform
            translation: Qt.vector3d(-0.1, 0, 0)
            rotationY: -30
        }
        Material {
            id: monkeyMaterial
            albedo: "crimson"
            roughness: 0.5
        }
        Mesh {
            id: monkeyMesh
            source: "monkey.obj"
        }
        components: [ monkeyTransform, monkeyMaterial, monkeyMesh ]
    }
}

Image rendered with the above QML code

Note on colors

Since Qt has no notion of color spaces, all color values are assumed to be in sRGB by default. To specify linear color use the Qt3DRaytrace.lrgba() function.

For symmetry there's also Qt3DRaytrace.srgba() which is equivalent to Qt.rgba().

Loading 3D models

Quartz uses Assimp for importing 3D models and thus supports many common file formats, including: Wavefront (OBJ), Autodesk FBX, Collada (DAE), glTF, and others.

Note that Mesh component treats its source file as if containing a single 3D object. Multiple objects are pre-transformed and joined into one during import.

To work with complex 3D scenes use the scene2qml tool. It converts an input scene file into QML-defined Entity hierarchy and extracts individual meshes, and textures into separate files. The resulting QML file can then be imported by using the EntityLoader node.

Conversion quality depends on the input file format and complexity of a particular scene. The resulting QML file can be further edited by hand to supplement certain information, like some Material attributes.

Building

Prerequisites

Environment setup

Variable Description Example value
QTDIR Path to Qt 5.12 headers & libraries C:\Qt\5.12.0\msvc2017_64
VULKAN_SDK Path to Khronos Vulkan SDK (Windows only) C:\VulkanSDK\1.1.97.0
ASSIMP_ROOT_DIR Path to Assimp SDK (Windows only) C:\Program Files\Assimp

Steps to build

  1. Compile GLSL shaders to SPIR-V by running: src\raytrace\renderers\vulkan\shaders\compile.py.
  2. Configure & build the project using the top level CMakeLists.txt file.

Note for Linux: Make sure that the version of Qt being used ships with Vulkan support enabled at compile time. Official Qt binaries for Linux support Vulkan since version 5.13.

Running development builds

Before you run anything make sure that QML2_IMPORT_PATH is configured to look for Quartz QML plugin binaries.

On Windows, also make sure that respective directories containing Qt53DRaytrace.dll and Qt53DRaytraceExtras.dll are both in PATH.

Project structure

Path Description
/3rdparty Third party libraries
/apps/quartz Standalone renderer application
/apps/scene2qml 3D scene to QML conversion tool
/cmake Local CMake modules
/doc Documentation (WIP)
/examples/assets Assets used by example projects
/examples/raytrace-cpp C++ API usage example
/examples/raytrace-qml QML API usage example
/include Public C++ API include files
/src/extras Extras library (Qt3DRaytraceExtras)
/src/qml QML plugins
/src/raytrace Raytracing aspect library (Qt3DRaytrace)
/src/raytrace/renderers/vulkan Raytracing aspect Vulkan renderer

Third party libraries

This project makes use of the following open source libraries:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].