What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer &...

Preview:

Citation preview

p.1

Qt3DInDepth

QtDeveloperDays,Berlin,7thOctober2014

PresentedbySeanHarmer&PaulLemire

BasedonQt3Dwip/newapiBranch

p.2

Topics

Topics

Topics

p.3

Topics

WhatisQt3D?

WhatisQt3D?

p.4

Backtobasics

WhatshouldQt3Ddo?WhatshouldQt3Ddo?

WhatisQt3D?

p.5

IdeasforQt3D

Graphics

3D/2D

Meshes

Materials

Shaders

Shadows

Ambientocclusion

Highdynamicrange

Deferredrendering

ThatcooltechniqueIreadabout...

WhatisQt3D?

p.6

Whatdoesthatmean?

Whatdoesthatmeanforus?

Manytechniquesinpopularuse

Applicationdependent

Newtechniquesbeingdeveloped

Weneedtobeflexibleandextensible

WhatisQt3D?

p.7

Requirement

Flexiblerenderer

EventuallybecametheFrameGraph

Data-drivenrendererconfguration

Moreonthislater

WhatisQt3D?

p.8

Whatelse?

Beyondgraphics?

3Dpositionalaudio

Physicssimulation

Collisiondetection

Particles

Animation

Skeletal

Morphtargets

Pathfinding

Artificalintelligence

Fluidsimulation(liquids,smoke,etc)

Picking

Objectspawning

...

WhatisQt3D?

p.9

What?Youwantmore?

...andifit'snottoomuchtrouble...

MakeitscalableacrossNCPUs/cores

Makeiteasytoextendandintegrate

WhatisQt3D?

p.10

Topics

Designchallengesandmotivations

Designchallengesandmotivations

p.11

Howtoproceed?

HowdowecomeupwithanHowdowecomeupwithanarchitecturetosatisfythatarchitecturetosatisfythatlot?lot?

Designchallengesandmotivations

p.12

Analysis

Let'strytoanalyseasimpleandfamiliarexample

SpaceInvaders!

Designchallengesandmotivations

p.13

ObjectModel

Designchallengesandmotivations

p.14

Youwanttodowhat?

Designchallengesandmotivations

p.15

Bubbleup

Designchallengesandmotivations

p.16

Bubbleupsomemore

Designchallengesandmotivations

p.17

Thedreadeddiamondofdeath

Designchallengesandmotivations

p.18

Mixinclasses

Designchallengesandmotivations

p.19

Allmixedup

Designchallengesandmotivations

p.20

Problemswithinheritance

Inheritance:

Deepandwidehierarchies

Difficulttocomprehend

Difficulttomaintain

Deeperclasseshardertomodify

Onedimensionaltaxonomies

Eachlevelinhierarchyclassifiesbasedonasinglecriteria

Taxonomyissetinstone

Oftenhackedaroundleadingtomoreconfusion

Designchallengesandmotivations

p.21

Problemswithinheritancecont'd

Inheritance:

Sharedcharacteristicstendtobubbleup

Leadstolargebaseclasses

Subclassesusingonlysomefeatures

Lotsofbloat

Multipleinheritance

Dreadeddiamondpattern

VerydifficulttodesignaMIscheme...

...thatworksandisunderstandable

Mix-inclasses

LimitedformofMI

Stepintherightdirection

Stillstatic

Designchallengesandmotivations

p.22

Wheretothen?

Ifinheritanceisnogood,howabout...

AggregationorComposition

Has-aHas-aratherthanis-ais-a

Dynamicatruntime

Noneedtopreempteverypossiblecombination

Extensiblevianewaggregatedtypes

Objectsaresimplybagsofbuildingblocks

Designchallengesandmotivations

p.23

EntityComponentSystem

Anentityentityisanemptyobject

Gaindatabyaggregatingcomponentscomponents

AspectsAspectsoperateonentitiestogivebehaviour

Designchallengesandmotivations

p.24

EntityComponentSystemcont'd

Designchallengesandmotivations

p.25

Qt3D'sECS

QObjectneedsextending

QNode

Communicateswithaspects

UniqueIDs

QEntity

QComponent

Mesh

Material

Transform

Collider

Yourcomponenttypehere...

QAbstractAspect

RendererAspect

PhysicsAspect

...

Designchallengesandmotivations

p.26

ObjectModel

Designchallengesandmotivations

p.27

Done?

Sowe'realldone,right?

Ha-ha-ha-ha-ha.No.

Weneedafewmorepieces...

Designchallengesandmotivations

p.28

Qt3DAchitecture

Designchallengesandmotivations

p.29

Topics

HowQt3Dworks

HowQt3Dworks

p.30

Qt3DAchitecture-Howitworks

Let'sseehowsometypicalinteractionsoccur...

HowQt3Dworks

p.31

Jobs

HowQt3Dworks

p.32

Jobs

HowQt3Dworks

p.33

Jobs

HowQt3Dworks

p.34

Jobs

HowQt3Dworks

p.35

Jobs

HowQt3Dworks

p.36

PropertyChange

HowQt3Dworks

p.37

PropertyChange

HowQt3Dworks

p.38

PropertyChange

HowQt3Dworks

p.39

PropertyChange

HowQt3Dworks

p.40

AspectPropertyChange

HowQt3Dworks

p.41

AspectPropertyChange

HowQt3Dworks

p.42

AspectPropertyChange

HowQt3Dworks

p.43

AspectPropertyChange

HowQt3Dworks

p.44

AspectPropertyChange

HowQt3Dworks

p.45

Sub-TreeAdded

HowQt3Dworks

p.46

Sub-TreeAdded

HowQt3Dworks

p.47

Sub-TreeAdded

HowQt3Dworks

p.48

Sub-TreeAdded

HowQt3Dworks

p.49

Sub-TreeAdded

HowQt3Dworks

p.50

Sub-TreeAdded

HowQt3Dworks

p.51

AspectAddsaSub-Tree

HowQt3Dworks

p.52

Sub-TreeAdded

HowQt3Dworks

p.53

Sub-TreeAdded

HowQt3Dworks

p.54

Sub-TreeAdded

HowQt3Dworks

p.55

Sub-TreeAdded

HowQt3Dworks

p.56

Topics

Whatdoesthismakepossible?

Whatdoesthismakepossible?

p.57

Whatcanwedo?

Qt3DwillprovideadefaultRendereraspectandInputaspect

Futurereleaseshaveplanned

Physicsaspect

Skeletalanimationaspect

OpenAL3DAudioaspect

Userscanextendwiththeirowncustomaspects

Whatdoesthismakepossible?

p.58

Giveussomeexamples

Data-drivenRenderer-TheFrameGraph

C++rendererimplementationisgeneric

ConvertsfromRenderCommandstoOpenGLcalls

GenerationofRenderCommandsiscontrolledbydata

FrameGraphcomponent

TreeofFrameGraphItemscontrolsstateandEntityfiltering

SceneGraphofEntitiestorender

Whatdoesthismakepossible?

p.59

RendertoTextureFramegraph

Whatdoesthismakepossible?

p.60

RendertoTextureFramegraph

Whatdoesthismakepossible?

p.61

RendertoTextureFramegraph

Whatdoesthismakepossible?

p.62

Topics

Thefuture

Thefuture

p.63

Whatnext?

LotsofAPIpolishing

Testing

Examples

Documentation

???

Profit

Thefuture

p.64

Doesitwork?

Lot'smorestuffwehaven'tdiscussedtoday

Let'sseesomeactualexamples

Thefuture

p.65

That'scool!Canwehelp?

Canwehelp?

Pleasedo!

Qt3Dwip/newapibranch

#qt-3donirc

Developmenteffort,ideas,sponsorshipallverywelcome

Thefuture

p.66

Thankyou!

Questions?Questions?

Thefuture

Recommended