aspect

Qt3D 2.0
Sean Harmer
James Turner
Giuseppe D’Angelo
Paul Lemire
Qt3D History
• Produced by the Brisbane office
• Various odd restrictions and assumptions
• Multithreading, multi-pass rendering
• Unsuitable for serious use
• User base : mostly students and academics
• Unmaintained
Qt3D 2.0 - Goals
• Easy creation of interactive 3D scenes
• Solid QML and C++ APIs
• Extensible with arbitrary rendering techniques or
vertex data by users
• Reduce repeated work delivering 3D to clients
• Make efficient use of multi-core CPUs and modern
GPUs
Qt3D 2.0 - Non-Goals
• Compete with Unity or Unreal
• Provide a huge library of shaders
• Reimplement every visualisation in VTK
Qt3D 2.0 - Feature Set
• Scene defined by C++, QML or 3D scene files
• Configurable rendering pipeline from C++ or QML
• Integration with QtQuick UIs
• Hierarchical bounding volume culling
• 3D object picking
Important Design Choices
• Independent of QtQuick
• Qt3D and Quick3D (Qt3D QML independent)
• Promote a subsystem architecture (Aspects)
• Generic renderer taking advantage of the available
OpenGL version
• Design inspired from high performance game engines
Aspects
• A subsystem within Qt3D
• Has access to the SceneGraph tree
• Can send jobs to the Jobs Manager
• Allow to add features over time :
• 3D Audio/OpenAL aspect
• SkeletalAnimation aspect
• Picking aspect
Component based design
•
•
•
•
Avoid multiple inheritance
Easier to maintain and extend
Data-driven architecture
Each Aspect can define its components
Qt3D Core
• Aspects Manager
• Nodes (Node, Entity, Component)
• Abstracts and Interfaces (QAbstractMesh,
QAbstractMaterial …)
• Resources Management classes
• Jobs Manager
• QChangeArbiter : observers of observables
Qt3D Core – The Render Loop
while (true)
{
waitForNextTick();
foreach (Aspect *aspect, aspects)
jobManager->enqueueJobs(aspect->jobs());
changeArbiter->syncChanges();
}
Qt3D Renderer
• Rendering Aspect
• Define the Rendering pipeline using a FrameGraph
• QGraphicContext : OpenGL helpers (3 / 2 / ES2)
• 3D Scene file loaders (Assimp, GLTF, Collada)
• Uses jobs to parallelize matrices computations and
creation of OpenGL commands
Quick3D
• C++ classes registered to QML
• Use of extension classes when needed to
avoid dependencies to the QML module
• qmlRegisterExtendedType
Qt improvements
• Make Qt types independent of QtQuick
(Qt.vector3d …)
• Could Animations be moved out of QtQuick as
well ?
• Public API for QQmlCustomParser
What remains to be done
• 3D Picking
• QtQuick 2 integration
• Fix rendering on Windows and OpenGL ES 2
• Develop a set of shaders / techniques