66
p.1 Qt3D In Depth Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch

What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.1

Qt3DInDepth

QtDeveloperDays,Berlin,7thOctober2014

PresentedbySeanHarmer&PaulLemire

BasedonQt3Dwip/newapiBranch

Page 2: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.2

Topics

Topics

Topics

Page 3: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.3

Topics

WhatisQt3D?

WhatisQt3D?

Page 4: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.4

Backtobasics

WhatshouldQt3Ddo?WhatshouldQt3Ddo?

WhatisQt3D?

Page 5: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.5

IdeasforQt3D

Graphics

3D/2D

Meshes

Materials

Shaders

Shadows

Ambientocclusion

Highdynamicrange

Deferredrendering

ThatcooltechniqueIreadabout...

WhatisQt3D?

Page 6: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.6

Whatdoesthatmean?

Whatdoesthatmeanforus?

Manytechniquesinpopularuse

Applicationdependent

Newtechniquesbeingdeveloped

Weneedtobeflexibleandextensible

WhatisQt3D?

Page 7: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.7

Requirement

Flexiblerenderer

EventuallybecametheFrameGraph

Data-drivenrendererconfguration

Moreonthislater

WhatisQt3D?

Page 8: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.8

Whatelse?

Beyondgraphics?

3Dpositionalaudio

Physicssimulation

Collisiondetection

Particles

Animation

Skeletal

Morphtargets

Pathfinding

Artificalintelligence

Fluidsimulation(liquids,smoke,etc)

Picking

Objectspawning

...

WhatisQt3D?

Page 9: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.9

What?Youwantmore?

...andifit'snottoomuchtrouble...

MakeitscalableacrossNCPUs/cores

Makeiteasytoextendandintegrate

WhatisQt3D?

Page 10: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.10

Topics

Designchallengesandmotivations

Designchallengesandmotivations

Page 11: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.11

Howtoproceed?

HowdowecomeupwithanHowdowecomeupwithanarchitecturetosatisfythatarchitecturetosatisfythatlot?lot?

Designchallengesandmotivations

Page 12: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.12

Analysis

Let'strytoanalyseasimpleandfamiliarexample

SpaceInvaders!

Designchallengesandmotivations

Page 13: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.13

ObjectModel

Designchallengesandmotivations

Page 14: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.14

Youwanttodowhat?

Designchallengesandmotivations

Page 15: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.15

Bubbleup

Designchallengesandmotivations

Page 16: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.16

Bubbleupsomemore

Designchallengesandmotivations

Page 17: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.17

Thedreadeddiamondofdeath

Designchallengesandmotivations

Page 18: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.18

Mixinclasses

Designchallengesandmotivations

Page 19: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.19

Allmixedup

Designchallengesandmotivations

Page 20: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.20

Problemswithinheritance

Inheritance:

Deepandwidehierarchies

Difficulttocomprehend

Difficulttomaintain

Deeperclasseshardertomodify

Onedimensionaltaxonomies

Eachlevelinhierarchyclassifiesbasedonasinglecriteria

Taxonomyissetinstone

Oftenhackedaroundleadingtomoreconfusion

Designchallengesandmotivations

Page 21: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.21

Problemswithinheritancecont'd

Inheritance:

Sharedcharacteristicstendtobubbleup

Leadstolargebaseclasses

Subclassesusingonlysomefeatures

Lotsofbloat

Multipleinheritance

Dreadeddiamondpattern

VerydifficulttodesignaMIscheme...

...thatworksandisunderstandable

Mix-inclasses

LimitedformofMI

Stepintherightdirection

Stillstatic

Designchallengesandmotivations

Page 22: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.22

Wheretothen?

Ifinheritanceisnogood,howabout...

AggregationorComposition

Has-aHas-aratherthanis-ais-a

Dynamicatruntime

Noneedtopreempteverypossiblecombination

Extensiblevianewaggregatedtypes

Objectsaresimplybagsofbuildingblocks

Designchallengesandmotivations

Page 23: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.23

EntityComponentSystem

Anentityentityisanemptyobject

Gaindatabyaggregatingcomponentscomponents

AspectsAspectsoperateonentitiestogivebehaviour

Designchallengesandmotivations

Page 24: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.24

EntityComponentSystemcont'd

Designchallengesandmotivations

Page 25: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.25

Qt3D'sECS

QObjectneedsextending

QNode

Communicateswithaspects

UniqueIDs

QEntity

QComponent

Mesh

Material

Transform

Collider

Yourcomponenttypehere...

QAbstractAspect

RendererAspect

PhysicsAspect

...

Designchallengesandmotivations

Page 26: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.26

ObjectModel

Designchallengesandmotivations

Page 27: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.27

Done?

Sowe'realldone,right?

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

Weneedafewmorepieces...

Designchallengesandmotivations

Page 28: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.28

Qt3DAchitecture

Designchallengesandmotivations

Page 29: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.29

Topics

HowQt3Dworks

HowQt3Dworks

Page 30: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.30

Qt3DAchitecture-Howitworks

Let'sseehowsometypicalinteractionsoccur...

HowQt3Dworks

Page 31: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.31

Jobs

HowQt3Dworks

Page 32: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.32

Jobs

HowQt3Dworks

Page 33: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.33

Jobs

HowQt3Dworks

Page 34: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.34

Jobs

HowQt3Dworks

Page 35: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.35

Jobs

HowQt3Dworks

Page 36: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.36

PropertyChange

HowQt3Dworks

Page 37: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.37

PropertyChange

HowQt3Dworks

Page 38: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.38

PropertyChange

HowQt3Dworks

Page 39: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.39

PropertyChange

HowQt3Dworks

Page 40: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.40

AspectPropertyChange

HowQt3Dworks

Page 41: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.41

AspectPropertyChange

HowQt3Dworks

Page 42: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.42

AspectPropertyChange

HowQt3Dworks

Page 43: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.43

AspectPropertyChange

HowQt3Dworks

Page 44: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.44

AspectPropertyChange

HowQt3Dworks

Page 45: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.45

Sub-TreeAdded

HowQt3Dworks

Page 46: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.46

Sub-TreeAdded

HowQt3Dworks

Page 47: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.47

Sub-TreeAdded

HowQt3Dworks

Page 48: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.48

Sub-TreeAdded

HowQt3Dworks

Page 49: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.49

Sub-TreeAdded

HowQt3Dworks

Page 50: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.50

Sub-TreeAdded

HowQt3Dworks

Page 51: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.51

AspectAddsaSub-Tree

HowQt3Dworks

Page 52: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.52

Sub-TreeAdded

HowQt3Dworks

Page 53: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.53

Sub-TreeAdded

HowQt3Dworks

Page 54: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.54

Sub-TreeAdded

HowQt3Dworks

Page 55: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.55

Sub-TreeAdded

HowQt3Dworks

Page 56: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.56

Topics

Whatdoesthismakepossible?

Whatdoesthismakepossible?

Page 57: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.57

Whatcanwedo?

Qt3DwillprovideadefaultRendereraspectandInputaspect

Futurereleaseshaveplanned

Physicsaspect

Skeletalanimationaspect

OpenAL3DAudioaspect

Userscanextendwiththeirowncustomaspects

Whatdoesthismakepossible?

Page 58: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.58

Giveussomeexamples

Data-drivenRenderer-TheFrameGraph

C++rendererimplementationisgeneric

ConvertsfromRenderCommandstoOpenGLcalls

GenerationofRenderCommandsiscontrolledbydata

FrameGraphcomponent

TreeofFrameGraphItemscontrolsstateandEntityfiltering

SceneGraphofEntitiestorender

Whatdoesthismakepossible?

Page 59: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.59

RendertoTextureFramegraph

Whatdoesthismakepossible?

Page 60: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.60

RendertoTextureFramegraph

Whatdoesthismakepossible?

Page 61: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.61

RendertoTextureFramegraph

Whatdoesthismakepossible?

Page 62: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.62

Topics

Thefuture

Thefuture

Page 63: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.63

Whatnext?

LotsofAPIpolishing

Testing

Examples

Documentation

???

Profit

Thefuture

Page 64: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.64

Doesitwork?

Lot'smorestuffwehaven'tdiscussedtoday

Let'sseesomeactualexamples

Thefuture

Page 65: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.65

That'scool!Canwehelp?

Canwehelp?

Pleasedo!

Qt3Dwip/newapibranch

#qt-3donirc

Developmenteffort,ideas,sponsorshipallverywelcome

Thefuture

Page 66: What is Qt3D? - KDAB · Qt Developer Days, Berlin, 7th October 2014 Presented by Sean Harmer & Paul Lemire Based on Qt3D wip/newapi Branch. p.2 Topics Topics Topics. p.3 Topics What

p.66

Thankyou!

Questions?Questions?

Thefuture