Slide 1

Slide 1 text

ARKitͷͨΊͷ 3Dࢉ਺ KBOY@ے೑ΤϯδχΞ 2018.8.30@iOSDC 2018

Slide 2

Slide 2 text

ࣗݾ঺հ ૣҴా͕฼ߍͰ͢

Slide 3

Slide 3 text

ے೑ΤϯδχΞͷܦྺ

Slide 4

Slide 4 text

೥݄ ݄ ݄ ೥݄ ೥݄ Spajam༏ल৆ ϕετϘσΟδϟύϯग़৔ ے೑.swift։࠵ స৬υϥϑτग़ԋ ॱ෩ຬൕʂʁ

Slide 5

Slide 5 text

͔ͦ͠͠͏؁͘͸ͳ͍

Slide 6

Slide 6 text

ے೑ΤϯδχΞͷ୆಄

Slide 7

Slide 7 text

ے೑ΤϯδχΞ ઓࠃ࣌୅

Slide 8

Slide 8 text

ͦ͏ͩʂARͩʂ

Slide 9

Slide 9 text

೥݄ ݄ ݄ ೥݄ ೥݄ Spajam༏ल৆ ϕετϘσΟδϟύϯग़৔ స৬υϥϑτग़ԋ ے೑.swift։࠵

Slide 10

Slide 10 text

৐Δ͔͠ͳ͍ ͜ͷϏοά΢Σʔϒʹ

Slide 11

Slide 11 text

ͱ͍͏͜ͱͰ

Slide 12

Slide 12 text

ࠓ೥1݄ʹ ARελʔτΞοϓ΁JOIN

Slide 13

Slide 13 text

Graffity Inc. Ϧʔμʔ

Slide 14

Slide 14 text

͜ΜͳΞϓϦ࡞ͬͯ·͢

Slide 15

Slide 15 text

ͱ͍͏͜ͱͰARKitΛ ؤுͬͯษڧ͠·ͨ͠

Slide 16

Slide 16 text

͔͠͠ ͦ͏؁͘͸ͳ͍

Slide 17

Slide 17 text

͜͏͍͏ྫΛ ߟ͑ͯΈ·͠ΐ͏

Slide 18

Slide 18 text

εΫϦʔϯ্ͷλοϓͨ͠෦෼ͷ 30cmલʹ ඈߦػΛஔ͘

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

༨༟ͬ͠ΐʂ

Slide 21

Slide 21 text

λοϓδΣενϟʔ͔Β x, yΛऔಘ, z͸0.3mΛೖΕΕ͹׬੒ʂ

Slide 22

Slide 22 text

݁Ռ

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

શવग़ͯ͜ͳ͍…

Slide 25

Slide 25 text

ཧ૝

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

ݱ࣮

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

΍ͬͺΓ ͦ͏؁͘͸ͳ͍

Slide 30

Slide 30 text

ͦΜͳ࣌ɺϦʔμʔ͕ खΛࠩ͠৳΂ͯ͘Εͨ

Slide 31

Slide 31 text

3DϓϩάϥϛϯάΛ ษڧ͢Ε͹༨༟ͩΑ

Slide 32

Slide 32 text

Ϧʔμʔʂʂ

Slide 33

Slide 33 text

ͦͯ͠๻͸

Slide 34

Slide 34 text

3Dϓϩάϥϛϯά Λษڧͨ͠ɻ

Slide 35

Slide 35 text

ษڧʹ࢖ͬͨຊ IUUQTBN[OUP.4V.F( IUUQTBN[OUP1,'Z5

Slide 36

Slide 36 text

ͱ͍͏͜ͱͰ

Slide 37

Slide 37 text

ࠓ೔͸օ͞Μʹ Θ͔Γ΍͘͢ 3DϓϩάϥϛϯάΛ આ໌͠·͢

Slide 38

Slide 38 text

ARKitͷͨΊͷ 3Dࢉ਺ KBOY@ے೑ΤϯδχΞ 2018.8.30@iOSDC 2018

Slide 39

Slide 39 text

ࠓ೔ͷΰʔϧ

Slide 40

Slide 40 text

εΫϦʔϯ্ͷλοϓͨ͠෦෼ͷ 30cmલʹ ඈߦػΛஔ͘

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

ษڧ͢Δ͜ͱ •࠲ඪܥΛ஌Δ •࠲ඪม׵ͷϝιουΛ஌Δ

Slide 43

Slide 43 text

ARKitͰ࢖͏࠲ඪܥ

Slide 44

Slide 44 text

࠲ඪ·ͱΊ ϫʔϧυ࠲ඪܥ ΦϒδΣΫτ࠲ඪܥ Χϝϥ࠲ඪܥ εΫϦʔϯ࠲ඪܥ iPad ProͰॻ͖·ͨ͠ɻ

Slide 45

Slide 45 text

ϫʔϧυ࠲ඪܥ ͜ΕΑΓେ͖ͳ֎ଆͷ ࠲ඪۭؒͰදݱͰ͖ͳ͍

Slide 46

Slide 46 text

ΦϒδΣΫτ࠲ඪܥ ඈߦػࣗ਎ͷϩʔΧϧ࠲ඪʂ

Slide 47

Slide 47 text

Χϝϥ࠲ඪܥ ΧϝϥͷϩʔΧϧ࠲ඪ

Slide 48

Slide 48 text

Χϝϥ࠲ඪܥ

Slide 49

Slide 49 text

εΫϦʔϯ࠲ඪܥ

Slide 50

Slide 50 text

εΫϦʔϯ࠲ඪܥ

Slide 51

Slide 51 text

࠲ඪ·ͱΊ ϫʔϧυ࠲ඪܥ ΦϒδΣΫτ࠲ඪܥ Χϝϥ࠲ඪܥ εΫϦʔϯ࠲ඪܥ iPad ProͰॻ͖·ͨ͠ɻ

Slide 52

Slide 52 text

ΰʔϧͷ֬ೝ

Slide 53

Slide 53 text

εΫϦʔϯ্ͷλοϓͨ͠෦෼ͷ 30cmલʹ ඈߦػΛஔ͘

Slide 54

Slide 54 text

30cm εΫϦʔϯλοϓͷ xy࠲ඪऔಘ ϫʔϧυ࠲ඪʹม׵ͯ͠ ͦ͜ʹஔ͘ʂ Χϝϥͷ30cmલʹஔ͘ ϫʔϧυ࠲ඪʹม׵ ᶃ ᶄ ᶅ εΫϦʔϯ࠲ඪʹม׵ ᶆ ᶄ’ εΫϦʔϯ࠲ඪʹม׵

Slide 55

Slide 55 text

ᶃΧϝϥ࠲ඪͰ30cmલʹஔ͘ ϚΠφε 30cm

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

ᶄϫʔϧυ࠲ඪʹม׵

Slide 58

Slide 58 text

͋Δ࠲ඪܥ͔Β ͋Δ࠲ඪܥ΁ ม׵Ͱ͖Δ

Slide 59

Slide 59 text

ᶄ’εΫϦʔϯ࠲ඪʹม׵

Slide 60

Slide 60 text

ϫʔϧυ࠲ඪܥ→εΫϦʔϯ࠲ඪܥ

Slide 61

Slide 61 text

ᶅεΫϦʔϯλοϓͷxy࠲ඪऔಘ

Slide 62

Slide 62 text

ᶆϫʔϧυ࠲ඪʹม׵ͯ͠ஔ͘

Slide 63

Slide 63 text

εΫϦʔϯ࠲ඪܥ→ϫʔϧυ࠲ඪܥ

Slide 64

Slide 64 text

30cmલ λοϓͨ͠Ґஔ ม׵ ม׵

Slide 65

Slide 65 text

ͦΕͧΕɺ౎߹ͷ͍͍ ࠲ඪܥͰܭࢉ͢Δ

Slide 66

Slide 66 text

ͪͳΈʹ

Slide 67

Slide 67 text

εΫϦʔϯ࠲ඪܥ͚ͩ Ͱ΋શͯΛදݱͰ͖Δ

Slide 68

Slide 68 text

εΫϦʔϯλοϓͷ xy࠲ඪऔಘ ϫʔϧυ࠲ඪʹม׵ͯ͠ ͦ͜ʹஔ͘ʂ Χϝϥͷ30cmલʹஔ͘ ϫʔϧυ࠲ඪʹม׵ ᶃ ᶄ ᶅ εΫϦʔϯ࠲ඪʹม׵ ᶆ ᶄ’ εΫϦʔϯ࠲ඪʹม׵ ͜͜ল͚Δ 30cm

Slide 69

Slide 69 text

͜͜ল͚Δ

Slide 70

Slide 70 text

ͬͪ͜ͷํָ͕͡ΌΜʂ

Slide 71

Slide 71 text

͔ͨ͠ʹ

Slide 72

Slide 72 text

͜ͷ୹͍ίʔυͰߦ͚Δ

Slide 73

Slide 73 text

No content

Slide 74

Slide 74 text

Ͱ΋

Slide 75

Slide 75 text

Slide 76

Slide 76 text

࣮͸

Slide 77

Slide 77 text

͜ͷ0.996͸ Χϝϥ࠲ඪܥͷ0.3mͱ ಉ͡ҙຯ

Slide 78

Slide 78 text

0.996ͱ͸

Slide 79

Slide 79 text

͜͜Ͱ࠲ඪܥͷ෮श

Slide 80

Slide 80 text

0.0 1.0 εΫϦʔϯ࠲ඪܥͷ z 0.001m 1000m Χϝϥ࠲ඪܥͷ z

Slide 81

Slide 81 text

εΫϦʔϯ࠲ඪܥͷz

Slide 82

Slide 82 text

https://developer.apple.com/documentation/scenekit/scnscenerenderer/1522631-unprojectpoint εΫϦʔϯ࠲ඪܥͷ z͸0.0~1.0

Slide 83

Slide 83 text

Χϝϥ࠲ඪܥͷz͸ʁ

Slide 84

Slide 84 text

No content

Slide 85

Slide 85 text

No content

Slide 86

Slide 86 text

No content

Slide 87

Slide 87 text

debugͯ͠ΈΔͱ

Slide 88

Slide 88 text

No content

Slide 89

Slide 89 text

zNearΛ มԽͤͯ͞ΈΑ͏

Slide 90

Slide 90 text

No content

Slide 91

Slide 91 text

0.0 1.0 εΫϦʔϯ࠲ඪܥͷ z 0.001m 1000m Χϝϥ࠲ඪܥͷ z

Slide 92

Slide 92 text

εΫϦʔϯ࠲ඪͷz vs Χϝϥ࠲ඪͷz

Slide 93

Slide 93 text

http://www.alecjacobson.com/weblog/?p=3835 -0.001 -1000 0.996 screenZ = f(n + cameraZ)/((f − n)cameraZ) -0.3 screenZ cameraZ

Slide 94

Slide 94 text

screenZ = f(n + cameraZ)/((f − n)cameraZ) screenZ = 1000(0.001 + (−0.3))/((1000 − 0.002)(−0.3)) f = 1000 n = 0.001 cameraZ = − 0.3 screenZ = 0.9966...

Slide 95

Slide 95 text

࣮ʹ໘౗͍͘͞

Slide 96

Slide 96 text

͜͜ল͚Δʂʁ

Slide 97

Slide 97 text

ඞཁʂ

Slide 98

Slide 98 text

ͱ͍͏͜ͱͰ

Slide 99

Slide 99 text

࠲ඪม׵Λۦ࢖ͯ͠

Slide 100

Slide 100 text

No content

Slide 101

Slide 101 text

׬੒ʂ

Slide 102

Slide 102 text

΋͏ͪΐ͍΍ͬͯΈ·͠ΐ͏ʂ

Slide 103

Slide 103 text

ඈߦػΛ֦େͨ͠Γɺ ճసͤ͞Α͏ʂ

Slide 104

Slide 104 text

֦େɾॖখ

Slide 105

Slide 105 text

ճస (SCNVector4) ࣠ ֯౓

Slide 106

Slide 106 text

ճస(Euler angle)

Slide 107

Slide 107 text

ճస (Euler angle) x

Slide 108

Slide 108 text

ճస (Euler angle) Y

Slide 109

Slide 109 text

ճస (Euler angle) Z

Slide 110

Slide 110 text

x Y Z

Slide 111

Slide 111 text

Ҏ্

Slide 112

Slide 112 text

͜͜·Ͱ͕ࢉ਺

Slide 113

Slide 113 text

·ͩ਺ֶ͕͋Γ·͢ɻ

Slide 114

Slide 114 text

Ͱ΋

Slide 115

Slide 115 text

࠲ඪͷ֓೦Λཧղͯ͠ SceneKit΍ARKitΛ ࢖͍͜ͳͤΕ͹ྑ͍ɻ

Slide 116

Slide 116 text

਺ֶʹ͍ͭͯ͸QiitaͰɻ

Slide 117

Slide 117 text

ARKitͷͨΊͷ 3D ਺ֶ

Slide 118

Slide 118 text

ࠂ஌

Slide 119

Slide 119 text

Graffity Inc. ΤϯδχΞืूதʂ

Slide 120

Slide 120 text

࠷ޙʹ

Slide 121

Slide 121 text

ݸਓͰARKitͷಈըڭࡐ࡞੒த

Slide 122

Slide 122 text

One More Thing

Slide 123

Slide 123 text

ࠓ೥΋΍Γ·͢ .kt

Slide 124

Slide 124 text

ے೑.kt w :BIPP-PEHF w ೥݄೔

Slide 125

Slide 125 text

͓ΘΓ