Qt Quick 3D Reference Documentation

qt_add_lightprobe_images

qt6_add_lightprobe_images

Synopsis

Description

Example

Caveats

qt_add_materials

qt6_add_materials

Synopsis

Description

Example

Caveats

Qt Quick 3D Xr

Introduction

Difference between Qt Quick 3D and Qt Quick 3D Xr applications

The entry point

Additional CMake functions

Where to go from here?

Quick Links

Qt Quick 3D Xr Examples

Running the Example

Multiview Rendering

Low-Level Overview

Multiview support in 3D APIs

Multiview support in Qt's rendering hardware interface (RHI)

Multiview Support in the Qt Quick - Quick 3D - Quick 3D XR Stack

Multiview support in Qt Quick

Multiview support in Qt Quick 3D

Multiview support in Qt Quick 3D Xr

PCVR

Overview

Further considerations

Choosing the OpenXR Implementation

Wireless streaming solutions for the Meta Quest 3

Tables of Tested Configurations

Further reading

Getting Started With Meta Quest 3

Introduction

Prerequisites

Setting up the Quest

Deploying a low-immersion application

Project changes needed for XR applications to be Meta Quest ready

Getting Started With Apple Vision Pro

Introduction

Deploying a low-immersion application

Building Qt for visionOS

Configuring and building for the simulator

Configuring and building for the device

Deploying a visionOS application

Supported OpenXR Extensions

Supported Headsets

Supported Platforms

visionOS_supported_versions

Basic XR Platform Concepts

OpenXR

Devices and platforms not based on OpenXR

Tested and Verified Headsets, Tier One

Tested and Verified Headsets, Tier Two

Special Developer Environments

Additional Notes

All Topics

Qt Quick 3D Scenes with 2D Content

2D Items in a 3D World

Adding 2D Items to 3D Nodes

Coordinate Spaces in 2D and 3D

Further Considerations

Qt Quick 3D Architecture

Module Overview

QML Imports

C++ Libraries

AssetImporters Plugins

How does Qt Quick 3D fit into the Qt Graphics Stack

3D in 2D Integration

Offscreen

Underlay

Overlay

Inline

2D in 3D Integration

Direct Path

Texture Path

Scene Synchronization

Scene Manager

Frontend/Backend Synchronization

Qt Quick Spatial Scene Graph

Spatial Objects

Resource Objects

View3D and Render Layers

Scene Rendering

Set up Render Target

Prepare for Render

High level render preparation

Low Level render preparation

Scene Rendering

Post-Processing

Built-in Post-Processing

Post-Processing Effects

Temporal and Progressive Antialiasing

Super Sampling Antialiasing (SSAA)

alpha_blending.frag, version 4500c7f9cb7d569de5978094677e48722bc9133e

alpha_blending.frag

Open Asset Import Library, version 6.0.2

Intel Embree, version 3.13.3

Godot Engine: Fog

Java Native Interface for C++, version 1.0.0

JsonCpp, version 1.9.6

meshoptimizer, version 0.23

OpenXR SDK, version 1.1.49

Godot Engine: ProceduralSky

Tiny OpenEXR, version 1.0.12

HDRI Images

xatlas, version 16ace528acd2cf1f16a7c0dde99c42c486488dbe

Changes to Qt Quick 3D

RHI

Other API changes

QML import version

Lighting

Custom Materials

Post-processing Effects

Principled Material

Default Material

Predefined materials

Tessellation and displacement maps

Qt Quick Items as children of 3D Nodes

Programmable Materials, Effects, Geometry, and Texture data

Programmability for Materials

Our first vertex shader

Uniforms from QML properties

Improving the example

Adding a fragment shader

Colors

Blending

Passing data between the vertex and fragment shader

Textures

Depth and screen textures

Light processor functions

Unshaded custom materials

Programmability for Effects

A post-processing effect

Chaining multiple effects

Defining Mesh and Texture Data from C++

Custom vertex data

Custom texture data

Qt Quick 3D

Using the Module

QML API

C++ API

Building with CMake

Building with qmake

Building From Source

Module Evolution

Articles and Guides

Examples

Reference

Related Modules

Qt Academy Courses

Licenses and Attributions

Qt Quick 3D Level of Detail

Level of Detail (LoD)

Automatic Level of Detail

Explicit Level of Detail

Qt Quick 3D Graphics Requirements

Supported graphics APIs, versions, and shading languages

Choosing the graphics API

OpenGL specifics

OpenGL ES 2.0 support

Qt Quick 3D module topics

Balsam Asset Import Tool

Balsam Command Line Tool

Balsam UI

Supported 3D Asset Types

Baking for Image-Based Lighting

Supported Options

Instancer Tool

Usage

Custom Material Editor

The Material Editor tool

Usage

Shader editing

Material properties

Preview

Uniforms

Output panel

Importing shaders

Saving and loading projects.

Exporting.

Shadergen Tool

Usage

Command line arguments

Generated content

Dynamic properties

Locomotion in Qt Quick 3D Xr

Room scale

Teleportation

Continuous movement

Optimizing 3D Assets

3D Content Overview

Geometry

Animations

Materials

Lights and Cameras

Other

Exporting from Different Tools

Anti-Aliasing Best Practices

Aliasing in General

Geometry Aliasing

Texture Aliasing

Reflection Aliasing

Anti-Aliasing Techniques in Qt Quick 3D

Multisample Anti-Aliasing

Temporal Anti-Aliasing

Progressive Anti-Aliasing

Supersample Anti-Aliasing

Mipmaps

Specular Anti-Aliasing

Fast Approximate Anti-Aliasing

Artist-Employed Cheats

Silhouette Opacity Maps

Modifying Materials or Geometry

Exporting from Blender

Exporting Models

Create Material Slots

UV Unwrap Models

Triangulate

Bake Actions for Animations

Apply Location, Rotation, and Scale

Exporting Lights

Exporting Cameras

Exporting COLLADA from Blender

Exporting FBX from Blender

Exporting from 3D Studio Max

Exporting OpenCOLLADA from 3D Studio Max

Exporting from Maya

Exporting OpenCOLLADA from Maya

Exporting from Modo

Exporting COLLADA from Modo

Exporting FBX from Modo

Using Image-Based Lighting

Introduction

Scene Lighting

Material Lighting

Pre-generating IBL cubemap

Manual baking

Build time baking via CMake

Qt Quick 3D Introduction with glTF Assets

Our Skeleton Application

Importing an Asset

Importing via balsam

Importing via balsamui

Making it Look Better

More light

Light debugging

Skybox and image-based lighting

Basic Performance Investigations

Instanced Rendering

Introduction

Instancing API

Alpha-blending and instancing

Transforms and instancing

Picking and instancing

Lightmaps and Global Illumination

Introduction

Important considerations when working with lightmaps

Baking Lightmaps

Denoising

Lightmap UVs

Lightmap texture size

Using Lightmaps at Run-Time

Morphing Animation

Introduction

Physically Based Rendering

Introduction

Materials and Workflows

Metallic Roughness Workflow

PrincipledMaterial

CustomMaterial

Specular and Glossiness Workflow

SpecularGlossyMaterial

More examples

Shadow Mapping

Introduction

Directional Lights

Cascaded Shadow Maps

Point Light

Spot Light

Performance and scene tweaking

Shadow bias

Shadowmap resolution

Soft shadows quality

Shadowmap far distance

Shadowmap bit depth

Vertex Skinning

Introduction

Defining a skeleton

Connecting a skeleton to a model

Animating the skeleton

Qt Quick 3D - Antialiasing Example

The test scene

Controlling antialiasing

Qt Quick 3D - Baked Lightmap Example

Setting up the Light

Setting up the Model

Qt Quick 3D - Cascaded Shadow Maps Example

Qt Quick 3D - Custom Effect Example

Qt Quick 3D - Custom Geometry Example

Qt Quick 3D - Custom Instanced Rendering

Custom instancing table

Custom material

Using the custom table and material in QML

Qt Quick 3D - Custom Materials Example

A simple material

Custom handling of lights

Adding a vertex shader

A transparent material

Unshaded materials

Qt Quick 3D - Custom Morphing Animation

Custom geometry

QML part

Qt Quick 3D - Custom Shaders Example

Implementing a custom material

Using a custom material

Qt Quick 3D - Dynamic Model Creation Example

Setting Up

Spawner Node

Startup

Dynamic Models

Adding Models

Removing Models

Qt Quick 3D - Stencil Outline Extension Example

Qt Quick 3D - HelloCube Example

Draw 2D Items

Draw a 3D Cube

Hello Qt Quick 3D Example

Qt Quick 3D - Instanced Rendering Example

Random instancing

Qt Quick 3D - Introduction

Setting Up the Scene

Meshes

Camera

Lights

Animation

Qt Quick 3D - Lights Example

Setting the Scene Lights

Directional Light

Point Light

Spot Light

Setting the Scene Models

Qt Quick 3D - Level of Detail Helper Example

Qt Quick 3D - Morphing Example

Creating a mesh

Controlling the morph targets

Qt Quick 3D - Offline Shaders Example

Qt Quick 3D - Order Independent Transparency Example

The examples

Controlling OIT

Qt Quick 3D - Particles 3D Testbed Example

Common Features

Snowing Example

Qt Quick 3D - Picking example

Making Model Pickable

Getting Pick Results

Qt Quick 3D - Principled Material Example

Usage

SpecularGlossyMaterial

Resource Loader

Qt Quick 3D - Procedural Texture Example

Qt Quick 3D - Quick Ball Example

Qt Quick 3D - Quick Items Example

Quick Items in a Quick 3D Scene

The test scene

Qt Quick 3D - Reflection Probes Example

The scene

Settings panel

Reflection Map Settings

Reflection Probe Settings

Particles Settings

Model Settings

Qt Quick 3D - RuntimeLoader Example

Error handling

Moving the camera

Instancing

Material Overrides

Qt Quick 3D - Scene Effects Example

Qt Quick 3D - Screen Space Reflections Example

Shader Code

Helper functions

Qt Quick 3D - Simple Fog Example

Qt Quick 3D - Simple Skinning Example

Make a skinning geometry.

Set up skinned data in QML

Position data and indexes

Joints and weights data

Skeleton and Joint hierarchy

Placing models using inverseBindPoses

Animate with Joint nodes

A more complete approach to skinning

Qt Quick 3D - Sub-mesh Example

Sub-meshes and materials

Qt Quick 3D - View3D Example

Defining the Cameras

Adding the Views

Virtual Assistant

Importing 3D Model

Preparing Scene Environment

Camera Options

Animations

Skeleton Animations

Morph Target Animations

Qt Quick 3D - Volumetric Rendering Example

Introduction

Implementation

Qt Quick 3D - XR Spatial Anchors Example

Qt Quick 3D - XR Freeform Teleportation Example

Overview

Controls

Implementation

Qt Quick 3D - XR Simple Input Example

Controller Input

XrItem

Qt Quick 3D - XR 3D Interaction example

Controller input

Gadgets

Reusable components

Tying it all together

Qt Quick 3D - XR Simple Example

Qt Quick 3D - XR Simple Touch Example

XR_EXT_debug_utils

XR_EXT_hand_tracking

XR_EXT_performance_settings

XR_FB_color_space

XR_FB_display_refresh_rate

XR_FB_foveation

XR_FB_foveation_configuration

XR_FB_hand_tracking_aim

XR_FB_hand_tracking_mesh

XR_FB_passthrough

XR_FB_scene

XR_FB_scene_capture

XR_FB_spatial_entity

XR_FB_spatial_entity_container

XR_FB_spatial_entity_query

XR_FB_spatial_entity_storage

XR_FB_swapchain_update_state

XR_FB_swapchain_update_state_opengl_es

XR_FB_swapchain_update_state_vulkan

XR_FB_triangle_mesh

XR_KHR_D3D11_enable

XR_KHR_D3D12_enable

XR_KHR_android_create_instance

XR_KHR_android_thread_settings

XR_KHR_composition_layer_depth

XR_KHR_opengl_enable

XR_KHR_opengl_es_enable

XR_KHR_vulkan_enable

XR_MSFT_hand_interaction

AdditiveColorGradient

Affector3D

Attractor3D

AxisHelper

BakedLightmap

Blur

BrushStrokes

Buffer

BufferInput

Camera

CapsuleGeometry

ChromaticAberration

ColorMaster

Command

ConeGeometry

CubeMapTexture

CuboidGeometry

CustomCamera

CustomMaterial

Introduction

Two flavors of custom materials

Exposing data to the shaders

Unshaded custom materials

Shaded custom materials

Vertex shader snippets in a shaded custom material

Fragment shader snippets in a shaded custom material

Custom variables between functions

Additional special keywords

Instancing

Screen, depth, and other textures

CylinderGeometry

DebugSettings

DebugView

DefaultMaterial

Specular/Glossiness workflow

Specular

Glossiness (Roughness)

Diffuse color

DepthOfFieldHQBlur

Desaturate

Direction3D

DirectionalLight

DistortionRipple

DistortionSphere

DistortionSpiral

DynamicBurst3D

EdgeDetect

Effect

Post-processing effects

Exposing data to the shaders

Getting started with user-defined effects

Effects with vertex shaders

Special keywords in effect shaders

Building multi-pass effects

Performance considerations

VR/AR considerations

Emboss

EmitBurst3D

ExtendedSceneEnvironment

Getting Started with ExtendedSceneEnvironment

Available Effects

ExtrudedTextGeometry

FileInstancing

Flip

Fog

FrustumCamera

Fxaa

GaussianBlur

Geometry

Gravity3D

GridGeometry

HDRBloomTonemap

HeightFieldGeometry

InfiniteGrid

InstanceList

InstanceListEntry

InstanceModel

InstanceRange

InstanceRepeater

Instancing

Joint

Light

Lightmapper

LineParticle3D

Loader3D

LodManager

LookAtNode

Material

Model

Mesh format and built-in primitives

Custom geometry

Materials

Picking

ModelBlendParticle3D

ModelParticle3D

MorphTarget

MotionBlur

Node

Object3D

OrbitCameraController

OrthographicCamera

Particle3D

ParticleAbstractShape3D

ParticleCustomShape3D

ParticleEmitter3D

ParticleModelShape3D

ParticleShape3D

ParticleSystem3D

ParticleSystem3DLogging

Pass

PerspectiveCamera

PlaneGeometry

PointLight

A simple example: shading a sphere in three different ways

PointRotator3D

PrincipledMaterial

Metal/Roughness workflow

Metalness

Roughness

Base color

ProceduralMesh

ProceduralMeshSubset

ProceduralSkyTextureData

ProceduralTextureData

Quaternion

QuaternionAnimation

RandomInstancing

ReflectionProbe

RenderExtension

RenderStats

Repeater3D

Repeller3D

ResourceLoader

RuntimeLoader

SCurveTonemap

ScaleAffector3D

Scatter

SceneEnvironment

Feature Overview

SetUniformValue

Shader

Skeleton

Skin

SpecularGlossyMaterial

Specular/Glossiness workflow

Specular

Glossiness

Albedo

SphereGeometry

SpotLight

SpriteParticle3D

SpriteSequence3D

TargetDirection3D

Texture

TextureData

TextureInput

TiltShift

TorusGeometry

TrailEmitter3D

VectorDirection3D

View3D

Vignette

Wander3D

WasdController

XrCamera

XrController

XrErrorDialog

XrHandModel

Platform Notes

Apple Vision Pro

Meta devices

XrHapticEffect

XrHapticFeedback

XrInputAction

XrItem

XrOrigin

XrRuntimeInfo

XrSimpleHapticEffect

XrSpatialAnchor

Platform notes

Meta Quest Devices

XrSpatialAnchorListModel

XrView

Platform notes

Meta Quest Devices

XrVirtualMouse

bounds

pickResult

Qt Quick 3D Asset Conditioning

Optimizing Assets

Qt Quick 3D Examples and Tutorials

Qt Quick 3D C++ Classes

QtQuick3D C++ Types

Qt Quick 3D QML Types

QtQuick3D QML Types

QML Value Types

QtQuick3D.Helpers QML Types

QtQuick3D.AssetUtils QML Types

QtQuick3D.Particles3D QML Types

QtQuick3D.Xr QML Types

Obsolete QML Types

QML Types with Obsolete Properties or Methods

Qt Quick 3D Asset Utility QML Types

Qt Quick 3D Effects QML Types

Qt Quick 3D Helpers QML Types

Qt Quick 3D Particles3D QML Types

Qt Quick 3D Xr QML Types