├── README.md
├── giphy.gif
├── iOS FaceTrack for Maya.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ │ └── mohamedhammoud.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── xcuserdata
│ └── mohamedhammoud.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── iOS FaceTrack for Maya
├── AppDelegate.swift
├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── Info.plist
├── ViewController.swift
└── art.scnassets
│ ├── ship.scn
│ └── texture.png
├── iOS FaceTrack for MayaTests
├── Info.plist
└── iOS_FaceTrack_for_MayaTests.swift
└── iOS FaceTrack for MayaUITests
├── Info.plist
└── iOS_FaceTrack_for_MayaUITests.swift
/README.md:
--------------------------------------------------------------------------------
1 | # iOS FaceTrack for Maya
2 |
3 | iOS FaceTrack for Maya allows you to use your iPhone X/XS/XS Max for facial motion capture for character animation in Autodesk's Maya.
4 |
5 | ## How does it work? ##
6 |
7 |
8 |
9 | The iPhone X introduced new camera technology to allow facial recognition for FaceID. The "TrueDepth" camera uses advanced technology to map the geometry of your face by projecting and analyzing over 30,000 invisible dots to create a depth map of your face. Apple uses this geometry analysis for their Memoji stickers, which are able to be animated to your facial expression in real time. Apple's ARKit (Augmented Reality Library) provides an API which allows you to retrieve "blend shapes", which is a dictionary of coefficients for detected facial expressions. For example, leftEyeTwitch is a blend shape that describes the amount of twitching that is occurring in an eye, with 0 having no twitch, and 1 being that the eye has completely blinked.
10 |
11 | You can read about ARFace and blendshapes at Apple's ARKit documentation [here](https://developer.apple.com/documentation/arkit/arfaceanchor/2928251-blendshapes).
12 |
13 | iOS FaceTrack for Maya is able to query the blend shapes that are geometrically mapped from the camera, and then transmit the dictionary of coefficients for each blend shape over WiFi to a computer that has Autodesk's Maya application suite. A python script will then be able to programmatically update the attributes of a 3D facial model (after rigging) to produce values at a particular keyframe. As a result, this creates an animation in Maya of the animation that was produced by the actor in front of the iPhone camera.
14 |
15 | This is a **work in progress**. At the moment, I am able to use ARKit for facial recognition to detect facial expression and compute the amount of movement of facial features by querying blend shapes. I can transfer the attributes over the iPhone using a USB and use a Python script to update the attributes of a 3D Model. The next steps are to implement a socket controller to transfer the blend shapes dictionary over WiFi (a opposed to USB), and to create a Python script that will produce a full .anim file of the blend shapes values at each keyframe for the 3D model.
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/giphy.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhammoud/iOS-FaceTrack-for-Maya/bae2ead5a57bc93011303421c2c636ea645ad27f/giphy.gif
--------------------------------------------------------------------------------
/iOS FaceTrack for Maya.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 104DAE7F235147DB007FE83D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 104DAE7E235147DB007FE83D /* AppDelegate.swift */; };
11 | 104DAE83235147DB007FE83D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 104DAE82235147DB007FE83D /* ViewController.swift */; };
12 | 104DAE86235147DB007FE83D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 104DAE84235147DB007FE83D /* Main.storyboard */; };
13 | 104DAE88235147DC007FE83D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 104DAE87235147DC007FE83D /* Assets.xcassets */; };
14 | 104DAE8B235147DC007FE83D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 104DAE89235147DC007FE83D /* LaunchScreen.storyboard */; };
15 | 104DAE96235147DC007FE83D /* iOS_FaceTrack_for_MayaTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 104DAE95235147DC007FE83D /* iOS_FaceTrack_for_MayaTests.swift */; };
16 | 104DAEA1235147DC007FE83D /* iOS_FaceTrack_for_MayaUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 104DAEA0235147DC007FE83D /* iOS_FaceTrack_for_MayaUITests.swift */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXContainerItemProxy section */
20 | 104DAE92235147DC007FE83D /* PBXContainerItemProxy */ = {
21 | isa = PBXContainerItemProxy;
22 | containerPortal = 104DAE73235147DB007FE83D /* Project object */;
23 | proxyType = 1;
24 | remoteGlobalIDString = 104DAE7A235147DB007FE83D;
25 | remoteInfo = "iOS FaceTrack for Maya";
26 | };
27 | 104DAE9D235147DC007FE83D /* PBXContainerItemProxy */ = {
28 | isa = PBXContainerItemProxy;
29 | containerPortal = 104DAE73235147DB007FE83D /* Project object */;
30 | proxyType = 1;
31 | remoteGlobalIDString = 104DAE7A235147DB007FE83D;
32 | remoteInfo = "iOS FaceTrack for Maya";
33 | };
34 | /* End PBXContainerItemProxy section */
35 |
36 | /* Begin PBXFileReference section */
37 | 104DAE7B235147DB007FE83D /* iOS FaceTrack for Maya.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS FaceTrack for Maya.app"; sourceTree = BUILT_PRODUCTS_DIR; };
38 | 104DAE7E235147DB007FE83D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
39 | 104DAE82235147DB007FE83D /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
40 | 104DAE85235147DB007FE83D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
41 | 104DAE87235147DC007FE83D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
42 | 104DAE8A235147DC007FE83D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
43 | 104DAE8C235147DC007FE83D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
44 | 104DAE91235147DC007FE83D /* iOS FaceTrack for MayaTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "iOS FaceTrack for MayaTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
45 | 104DAE95235147DC007FE83D /* iOS_FaceTrack_for_MayaTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOS_FaceTrack_for_MayaTests.swift; sourceTree = ""; };
46 | 104DAE97235147DC007FE83D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
47 | 104DAE9C235147DC007FE83D /* iOS FaceTrack for MayaUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "iOS FaceTrack for MayaUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
48 | 104DAEA0235147DC007FE83D /* iOS_FaceTrack_for_MayaUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOS_FaceTrack_for_MayaUITests.swift; sourceTree = ""; };
49 | 104DAEA2235147DC007FE83D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
50 | /* End PBXFileReference section */
51 |
52 | /* Begin PBXFrameworksBuildPhase section */
53 | 104DAE78235147DB007FE83D /* Frameworks */ = {
54 | isa = PBXFrameworksBuildPhase;
55 | buildActionMask = 2147483647;
56 | files = (
57 | );
58 | runOnlyForDeploymentPostprocessing = 0;
59 | };
60 | 104DAE8E235147DC007FE83D /* Frameworks */ = {
61 | isa = PBXFrameworksBuildPhase;
62 | buildActionMask = 2147483647;
63 | files = (
64 | );
65 | runOnlyForDeploymentPostprocessing = 0;
66 | };
67 | 104DAE99235147DC007FE83D /* Frameworks */ = {
68 | isa = PBXFrameworksBuildPhase;
69 | buildActionMask = 2147483647;
70 | files = (
71 | );
72 | runOnlyForDeploymentPostprocessing = 0;
73 | };
74 | /* End PBXFrameworksBuildPhase section */
75 |
76 | /* Begin PBXGroup section */
77 | 104DAE72235147DB007FE83D = {
78 | isa = PBXGroup;
79 | children = (
80 | 104DAE7D235147DB007FE83D /* iOS FaceTrack for Maya */,
81 | 104DAE94235147DC007FE83D /* iOS FaceTrack for MayaTests */,
82 | 104DAE9F235147DC007FE83D /* iOS FaceTrack for MayaUITests */,
83 | 104DAE7C235147DB007FE83D /* Products */,
84 | );
85 | sourceTree = "";
86 | };
87 | 104DAE7C235147DB007FE83D /* Products */ = {
88 | isa = PBXGroup;
89 | children = (
90 | 104DAE7B235147DB007FE83D /* iOS FaceTrack for Maya.app */,
91 | 104DAE91235147DC007FE83D /* iOS FaceTrack for MayaTests.xctest */,
92 | 104DAE9C235147DC007FE83D /* iOS FaceTrack for MayaUITests.xctest */,
93 | );
94 | name = Products;
95 | sourceTree = "";
96 | };
97 | 104DAE7D235147DB007FE83D /* iOS FaceTrack for Maya */ = {
98 | isa = PBXGroup;
99 | children = (
100 | 104DAE7E235147DB007FE83D /* AppDelegate.swift */,
101 | 104DAE82235147DB007FE83D /* ViewController.swift */,
102 | 104DAE84235147DB007FE83D /* Main.storyboard */,
103 | 104DAE87235147DC007FE83D /* Assets.xcassets */,
104 | 104DAE89235147DC007FE83D /* LaunchScreen.storyboard */,
105 | 104DAE8C235147DC007FE83D /* Info.plist */,
106 | );
107 | path = "iOS FaceTrack for Maya";
108 | sourceTree = "";
109 | };
110 | 104DAE94235147DC007FE83D /* iOS FaceTrack for MayaTests */ = {
111 | isa = PBXGroup;
112 | children = (
113 | 104DAE95235147DC007FE83D /* iOS_FaceTrack_for_MayaTests.swift */,
114 | 104DAE97235147DC007FE83D /* Info.plist */,
115 | );
116 | path = "iOS FaceTrack for MayaTests";
117 | sourceTree = "";
118 | };
119 | 104DAE9F235147DC007FE83D /* iOS FaceTrack for MayaUITests */ = {
120 | isa = PBXGroup;
121 | children = (
122 | 104DAEA0235147DC007FE83D /* iOS_FaceTrack_for_MayaUITests.swift */,
123 | 104DAEA2235147DC007FE83D /* Info.plist */,
124 | );
125 | path = "iOS FaceTrack for MayaUITests";
126 | sourceTree = "";
127 | };
128 | /* End PBXGroup section */
129 |
130 | /* Begin PBXNativeTarget section */
131 | 104DAE7A235147DB007FE83D /* iOS FaceTrack for Maya */ = {
132 | isa = PBXNativeTarget;
133 | buildConfigurationList = 104DAEA5235147DC007FE83D /* Build configuration list for PBXNativeTarget "iOS FaceTrack for Maya" */;
134 | buildPhases = (
135 | 104DAE77235147DB007FE83D /* Sources */,
136 | 104DAE78235147DB007FE83D /* Frameworks */,
137 | 104DAE79235147DB007FE83D /* Resources */,
138 | );
139 | buildRules = (
140 | );
141 | dependencies = (
142 | );
143 | name = "iOS FaceTrack for Maya";
144 | productName = "iOS FaceTrack for Maya";
145 | productReference = 104DAE7B235147DB007FE83D /* iOS FaceTrack for Maya.app */;
146 | productType = "com.apple.product-type.application";
147 | };
148 | 104DAE90235147DC007FE83D /* iOS FaceTrack for MayaTests */ = {
149 | isa = PBXNativeTarget;
150 | buildConfigurationList = 104DAEA8235147DC007FE83D /* Build configuration list for PBXNativeTarget "iOS FaceTrack for MayaTests" */;
151 | buildPhases = (
152 | 104DAE8D235147DC007FE83D /* Sources */,
153 | 104DAE8E235147DC007FE83D /* Frameworks */,
154 | 104DAE8F235147DC007FE83D /* Resources */,
155 | );
156 | buildRules = (
157 | );
158 | dependencies = (
159 | 104DAE93235147DC007FE83D /* PBXTargetDependency */,
160 | );
161 | name = "iOS FaceTrack for MayaTests";
162 | productName = "iOS FaceTrack for MayaTests";
163 | productReference = 104DAE91235147DC007FE83D /* iOS FaceTrack for MayaTests.xctest */;
164 | productType = "com.apple.product-type.bundle.unit-test";
165 | };
166 | 104DAE9B235147DC007FE83D /* iOS FaceTrack for MayaUITests */ = {
167 | isa = PBXNativeTarget;
168 | buildConfigurationList = 104DAEAB235147DC007FE83D /* Build configuration list for PBXNativeTarget "iOS FaceTrack for MayaUITests" */;
169 | buildPhases = (
170 | 104DAE98235147DC007FE83D /* Sources */,
171 | 104DAE99235147DC007FE83D /* Frameworks */,
172 | 104DAE9A235147DC007FE83D /* Resources */,
173 | );
174 | buildRules = (
175 | );
176 | dependencies = (
177 | 104DAE9E235147DC007FE83D /* PBXTargetDependency */,
178 | );
179 | name = "iOS FaceTrack for MayaUITests";
180 | productName = "iOS FaceTrack for MayaUITests";
181 | productReference = 104DAE9C235147DC007FE83D /* iOS FaceTrack for MayaUITests.xctest */;
182 | productType = "com.apple.product-type.bundle.ui-testing";
183 | };
184 | /* End PBXNativeTarget section */
185 |
186 | /* Begin PBXProject section */
187 | 104DAE73235147DB007FE83D /* Project object */ = {
188 | isa = PBXProject;
189 | attributes = {
190 | LastSwiftUpdateCheck = 1110;
191 | LastUpgradeCheck = 1110;
192 | ORGANIZATIONNAME = "Mohamed Hammoud";
193 | TargetAttributes = {
194 | 104DAE7A235147DB007FE83D = {
195 | CreatedOnToolsVersion = 11.1;
196 | };
197 | 104DAE90235147DC007FE83D = {
198 | CreatedOnToolsVersion = 11.1;
199 | TestTargetID = 104DAE7A235147DB007FE83D;
200 | };
201 | 104DAE9B235147DC007FE83D = {
202 | CreatedOnToolsVersion = 11.1;
203 | TestTargetID = 104DAE7A235147DB007FE83D;
204 | };
205 | };
206 | };
207 | buildConfigurationList = 104DAE76235147DB007FE83D /* Build configuration list for PBXProject "iOS FaceTrack for Maya" */;
208 | compatibilityVersion = "Xcode 9.3";
209 | developmentRegion = en;
210 | hasScannedForEncodings = 0;
211 | knownRegions = (
212 | en,
213 | Base,
214 | );
215 | mainGroup = 104DAE72235147DB007FE83D;
216 | productRefGroup = 104DAE7C235147DB007FE83D /* Products */;
217 | projectDirPath = "";
218 | projectRoot = "";
219 | targets = (
220 | 104DAE7A235147DB007FE83D /* iOS FaceTrack for Maya */,
221 | 104DAE90235147DC007FE83D /* iOS FaceTrack for MayaTests */,
222 | 104DAE9B235147DC007FE83D /* iOS FaceTrack for MayaUITests */,
223 | );
224 | };
225 | /* End PBXProject section */
226 |
227 | /* Begin PBXResourcesBuildPhase section */
228 | 104DAE79235147DB007FE83D /* Resources */ = {
229 | isa = PBXResourcesBuildPhase;
230 | buildActionMask = 2147483647;
231 | files = (
232 | 104DAE8B235147DC007FE83D /* LaunchScreen.storyboard in Resources */,
233 | 104DAE88235147DC007FE83D /* Assets.xcassets in Resources */,
234 | 104DAE86235147DB007FE83D /* Main.storyboard in Resources */,
235 | );
236 | runOnlyForDeploymentPostprocessing = 0;
237 | };
238 | 104DAE8F235147DC007FE83D /* Resources */ = {
239 | isa = PBXResourcesBuildPhase;
240 | buildActionMask = 2147483647;
241 | files = (
242 | );
243 | runOnlyForDeploymentPostprocessing = 0;
244 | };
245 | 104DAE9A235147DC007FE83D /* Resources */ = {
246 | isa = PBXResourcesBuildPhase;
247 | buildActionMask = 2147483647;
248 | files = (
249 | );
250 | runOnlyForDeploymentPostprocessing = 0;
251 | };
252 | /* End PBXResourcesBuildPhase section */
253 |
254 | /* Begin PBXSourcesBuildPhase section */
255 | 104DAE77235147DB007FE83D /* Sources */ = {
256 | isa = PBXSourcesBuildPhase;
257 | buildActionMask = 2147483647;
258 | files = (
259 | 104DAE83235147DB007FE83D /* ViewController.swift in Sources */,
260 | 104DAE7F235147DB007FE83D /* AppDelegate.swift in Sources */,
261 | );
262 | runOnlyForDeploymentPostprocessing = 0;
263 | };
264 | 104DAE8D235147DC007FE83D /* Sources */ = {
265 | isa = PBXSourcesBuildPhase;
266 | buildActionMask = 2147483647;
267 | files = (
268 | 104DAE96235147DC007FE83D /* iOS_FaceTrack_for_MayaTests.swift in Sources */,
269 | );
270 | runOnlyForDeploymentPostprocessing = 0;
271 | };
272 | 104DAE98235147DC007FE83D /* Sources */ = {
273 | isa = PBXSourcesBuildPhase;
274 | buildActionMask = 2147483647;
275 | files = (
276 | 104DAEA1235147DC007FE83D /* iOS_FaceTrack_for_MayaUITests.swift in Sources */,
277 | );
278 | runOnlyForDeploymentPostprocessing = 0;
279 | };
280 | /* End PBXSourcesBuildPhase section */
281 |
282 | /* Begin PBXTargetDependency section */
283 | 104DAE93235147DC007FE83D /* PBXTargetDependency */ = {
284 | isa = PBXTargetDependency;
285 | target = 104DAE7A235147DB007FE83D /* iOS FaceTrack for Maya */;
286 | targetProxy = 104DAE92235147DC007FE83D /* PBXContainerItemProxy */;
287 | };
288 | 104DAE9E235147DC007FE83D /* PBXTargetDependency */ = {
289 | isa = PBXTargetDependency;
290 | target = 104DAE7A235147DB007FE83D /* iOS FaceTrack for Maya */;
291 | targetProxy = 104DAE9D235147DC007FE83D /* PBXContainerItemProxy */;
292 | };
293 | /* End PBXTargetDependency section */
294 |
295 | /* Begin PBXVariantGroup section */
296 | 104DAE84235147DB007FE83D /* Main.storyboard */ = {
297 | isa = PBXVariantGroup;
298 | children = (
299 | 104DAE85235147DB007FE83D /* Base */,
300 | );
301 | name = Main.storyboard;
302 | sourceTree = "";
303 | };
304 | 104DAE89235147DC007FE83D /* LaunchScreen.storyboard */ = {
305 | isa = PBXVariantGroup;
306 | children = (
307 | 104DAE8A235147DC007FE83D /* Base */,
308 | );
309 | name = LaunchScreen.storyboard;
310 | sourceTree = "";
311 | };
312 | /* End PBXVariantGroup section */
313 |
314 | /* Begin XCBuildConfiguration section */
315 | 104DAEA3235147DC007FE83D /* Debug */ = {
316 | isa = XCBuildConfiguration;
317 | buildSettings = {
318 | ALWAYS_SEARCH_USER_PATHS = NO;
319 | CLANG_ANALYZER_NONNULL = YES;
320 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
321 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
322 | CLANG_CXX_LIBRARY = "libc++";
323 | CLANG_ENABLE_MODULES = YES;
324 | CLANG_ENABLE_OBJC_ARC = YES;
325 | CLANG_ENABLE_OBJC_WEAK = YES;
326 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
327 | CLANG_WARN_BOOL_CONVERSION = YES;
328 | CLANG_WARN_COMMA = YES;
329 | CLANG_WARN_CONSTANT_CONVERSION = YES;
330 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
331 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
332 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
333 | CLANG_WARN_EMPTY_BODY = YES;
334 | CLANG_WARN_ENUM_CONVERSION = YES;
335 | CLANG_WARN_INFINITE_RECURSION = YES;
336 | CLANG_WARN_INT_CONVERSION = YES;
337 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
338 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
339 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
340 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
341 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
342 | CLANG_WARN_STRICT_PROTOTYPES = YES;
343 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
344 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
345 | CLANG_WARN_UNREACHABLE_CODE = YES;
346 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
347 | COPY_PHASE_STRIP = NO;
348 | DEBUG_INFORMATION_FORMAT = dwarf;
349 | ENABLE_STRICT_OBJC_MSGSEND = YES;
350 | ENABLE_TESTABILITY = YES;
351 | GCC_C_LANGUAGE_STANDARD = gnu11;
352 | GCC_DYNAMIC_NO_PIC = NO;
353 | GCC_NO_COMMON_BLOCKS = YES;
354 | GCC_OPTIMIZATION_LEVEL = 0;
355 | GCC_PREPROCESSOR_DEFINITIONS = (
356 | "DEBUG=1",
357 | "$(inherited)",
358 | );
359 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
360 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
361 | GCC_WARN_UNDECLARED_SELECTOR = YES;
362 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
363 | GCC_WARN_UNUSED_FUNCTION = YES;
364 | GCC_WARN_UNUSED_VARIABLE = YES;
365 | IPHONEOS_DEPLOYMENT_TARGET = 13.1;
366 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
367 | MTL_FAST_MATH = YES;
368 | ONLY_ACTIVE_ARCH = YES;
369 | SDKROOT = iphoneos;
370 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
371 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
372 | };
373 | name = Debug;
374 | };
375 | 104DAEA4235147DC007FE83D /* Release */ = {
376 | isa = XCBuildConfiguration;
377 | buildSettings = {
378 | ALWAYS_SEARCH_USER_PATHS = NO;
379 | CLANG_ANALYZER_NONNULL = YES;
380 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
381 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
382 | CLANG_CXX_LIBRARY = "libc++";
383 | CLANG_ENABLE_MODULES = YES;
384 | CLANG_ENABLE_OBJC_ARC = YES;
385 | CLANG_ENABLE_OBJC_WEAK = YES;
386 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
387 | CLANG_WARN_BOOL_CONVERSION = YES;
388 | CLANG_WARN_COMMA = YES;
389 | CLANG_WARN_CONSTANT_CONVERSION = YES;
390 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
391 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
392 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
393 | CLANG_WARN_EMPTY_BODY = YES;
394 | CLANG_WARN_ENUM_CONVERSION = YES;
395 | CLANG_WARN_INFINITE_RECURSION = YES;
396 | CLANG_WARN_INT_CONVERSION = YES;
397 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
398 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
399 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
400 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
401 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
402 | CLANG_WARN_STRICT_PROTOTYPES = YES;
403 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
404 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
405 | CLANG_WARN_UNREACHABLE_CODE = YES;
406 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
407 | COPY_PHASE_STRIP = NO;
408 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
409 | ENABLE_NS_ASSERTIONS = NO;
410 | ENABLE_STRICT_OBJC_MSGSEND = YES;
411 | GCC_C_LANGUAGE_STANDARD = gnu11;
412 | GCC_NO_COMMON_BLOCKS = YES;
413 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
414 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
415 | GCC_WARN_UNDECLARED_SELECTOR = YES;
416 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
417 | GCC_WARN_UNUSED_FUNCTION = YES;
418 | GCC_WARN_UNUSED_VARIABLE = YES;
419 | IPHONEOS_DEPLOYMENT_TARGET = 13.1;
420 | MTL_ENABLE_DEBUG_INFO = NO;
421 | MTL_FAST_MATH = YES;
422 | SDKROOT = iphoneos;
423 | SWIFT_COMPILATION_MODE = wholemodule;
424 | SWIFT_OPTIMIZATION_LEVEL = "-O";
425 | VALIDATE_PRODUCT = YES;
426 | };
427 | name = Release;
428 | };
429 | 104DAEA6235147DC007FE83D /* Debug */ = {
430 | isa = XCBuildConfiguration;
431 | buildSettings = {
432 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
433 | CODE_SIGN_STYLE = Automatic;
434 | DEVELOPMENT_TEAM = S3MT5765R8;
435 | INFOPLIST_FILE = "iOS FaceTrack for Maya/Info.plist";
436 | LD_RUNPATH_SEARCH_PATHS = (
437 | "$(inherited)",
438 | "@executable_path/Frameworks",
439 | );
440 | PRODUCT_BUNDLE_IDENTIFIER = "mhammoud.iOS-FaceTrack-for-Maya";
441 | PRODUCT_NAME = "$(TARGET_NAME)";
442 | SWIFT_VERSION = 5.0;
443 | TARGETED_DEVICE_FAMILY = "1,2";
444 | };
445 | name = Debug;
446 | };
447 | 104DAEA7235147DC007FE83D /* Release */ = {
448 | isa = XCBuildConfiguration;
449 | buildSettings = {
450 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
451 | CODE_SIGN_STYLE = Automatic;
452 | DEVELOPMENT_TEAM = S3MT5765R8;
453 | INFOPLIST_FILE = "iOS FaceTrack for Maya/Info.plist";
454 | LD_RUNPATH_SEARCH_PATHS = (
455 | "$(inherited)",
456 | "@executable_path/Frameworks",
457 | );
458 | PRODUCT_BUNDLE_IDENTIFIER = "mhammoud.iOS-FaceTrack-for-Maya";
459 | PRODUCT_NAME = "$(TARGET_NAME)";
460 | SWIFT_VERSION = 5.0;
461 | TARGETED_DEVICE_FAMILY = "1,2";
462 | };
463 | name = Release;
464 | };
465 | 104DAEA9235147DC007FE83D /* Debug */ = {
466 | isa = XCBuildConfiguration;
467 | buildSettings = {
468 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
469 | BUNDLE_LOADER = "$(TEST_HOST)";
470 | CODE_SIGN_STYLE = Automatic;
471 | DEVELOPMENT_TEAM = S3MT5765R8;
472 | INFOPLIST_FILE = "iOS FaceTrack for MayaTests/Info.plist";
473 | IPHONEOS_DEPLOYMENT_TARGET = 13.1;
474 | LD_RUNPATH_SEARCH_PATHS = (
475 | "$(inherited)",
476 | "@executable_path/Frameworks",
477 | "@loader_path/Frameworks",
478 | );
479 | PRODUCT_BUNDLE_IDENTIFIER = "mhammoud.iOS-FaceTrack-for-MayaTests";
480 | PRODUCT_NAME = "$(TARGET_NAME)";
481 | SWIFT_VERSION = 5.0;
482 | TARGETED_DEVICE_FAMILY = "1,2";
483 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iOS FaceTrack for Maya.app/iOS FaceTrack for Maya";
484 | };
485 | name = Debug;
486 | };
487 | 104DAEAA235147DC007FE83D /* Release */ = {
488 | isa = XCBuildConfiguration;
489 | buildSettings = {
490 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
491 | BUNDLE_LOADER = "$(TEST_HOST)";
492 | CODE_SIGN_STYLE = Automatic;
493 | DEVELOPMENT_TEAM = S3MT5765R8;
494 | INFOPLIST_FILE = "iOS FaceTrack for MayaTests/Info.plist";
495 | IPHONEOS_DEPLOYMENT_TARGET = 13.1;
496 | LD_RUNPATH_SEARCH_PATHS = (
497 | "$(inherited)",
498 | "@executable_path/Frameworks",
499 | "@loader_path/Frameworks",
500 | );
501 | PRODUCT_BUNDLE_IDENTIFIER = "mhammoud.iOS-FaceTrack-for-MayaTests";
502 | PRODUCT_NAME = "$(TARGET_NAME)";
503 | SWIFT_VERSION = 5.0;
504 | TARGETED_DEVICE_FAMILY = "1,2";
505 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iOS FaceTrack for Maya.app/iOS FaceTrack for Maya";
506 | };
507 | name = Release;
508 | };
509 | 104DAEAC235147DC007FE83D /* Debug */ = {
510 | isa = XCBuildConfiguration;
511 | buildSettings = {
512 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
513 | CODE_SIGN_STYLE = Automatic;
514 | DEVELOPMENT_TEAM = S3MT5765R8;
515 | INFOPLIST_FILE = "iOS FaceTrack for MayaUITests/Info.plist";
516 | LD_RUNPATH_SEARCH_PATHS = (
517 | "$(inherited)",
518 | "@executable_path/Frameworks",
519 | "@loader_path/Frameworks",
520 | );
521 | PRODUCT_BUNDLE_IDENTIFIER = "mhammoud.iOS-FaceTrack-for-MayaUITests";
522 | PRODUCT_NAME = "$(TARGET_NAME)";
523 | SWIFT_VERSION = 5.0;
524 | TARGETED_DEVICE_FAMILY = "1,2";
525 | TEST_TARGET_NAME = "iOS FaceTrack for Maya";
526 | };
527 | name = Debug;
528 | };
529 | 104DAEAD235147DC007FE83D /* Release */ = {
530 | isa = XCBuildConfiguration;
531 | buildSettings = {
532 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
533 | CODE_SIGN_STYLE = Automatic;
534 | DEVELOPMENT_TEAM = S3MT5765R8;
535 | INFOPLIST_FILE = "iOS FaceTrack for MayaUITests/Info.plist";
536 | LD_RUNPATH_SEARCH_PATHS = (
537 | "$(inherited)",
538 | "@executable_path/Frameworks",
539 | "@loader_path/Frameworks",
540 | );
541 | PRODUCT_BUNDLE_IDENTIFIER = "mhammoud.iOS-FaceTrack-for-MayaUITests";
542 | PRODUCT_NAME = "$(TARGET_NAME)";
543 | SWIFT_VERSION = 5.0;
544 | TARGETED_DEVICE_FAMILY = "1,2";
545 | TEST_TARGET_NAME = "iOS FaceTrack for Maya";
546 | };
547 | name = Release;
548 | };
549 | /* End XCBuildConfiguration section */
550 |
551 | /* Begin XCConfigurationList section */
552 | 104DAE76235147DB007FE83D /* Build configuration list for PBXProject "iOS FaceTrack for Maya" */ = {
553 | isa = XCConfigurationList;
554 | buildConfigurations = (
555 | 104DAEA3235147DC007FE83D /* Debug */,
556 | 104DAEA4235147DC007FE83D /* Release */,
557 | );
558 | defaultConfigurationIsVisible = 0;
559 | defaultConfigurationName = Release;
560 | };
561 | 104DAEA5235147DC007FE83D /* Build configuration list for PBXNativeTarget "iOS FaceTrack for Maya" */ = {
562 | isa = XCConfigurationList;
563 | buildConfigurations = (
564 | 104DAEA6235147DC007FE83D /* Debug */,
565 | 104DAEA7235147DC007FE83D /* Release */,
566 | );
567 | defaultConfigurationIsVisible = 0;
568 | defaultConfigurationName = Release;
569 | };
570 | 104DAEA8235147DC007FE83D /* Build configuration list for PBXNativeTarget "iOS FaceTrack for MayaTests" */ = {
571 | isa = XCConfigurationList;
572 | buildConfigurations = (
573 | 104DAEA9235147DC007FE83D /* Debug */,
574 | 104DAEAA235147DC007FE83D /* Release */,
575 | );
576 | defaultConfigurationIsVisible = 0;
577 | defaultConfigurationName = Release;
578 | };
579 | 104DAEAB235147DC007FE83D /* Build configuration list for PBXNativeTarget "iOS FaceTrack for MayaUITests" */ = {
580 | isa = XCConfigurationList;
581 | buildConfigurations = (
582 | 104DAEAC235147DC007FE83D /* Debug */,
583 | 104DAEAD235147DC007FE83D /* Release */,
584 | );
585 | defaultConfigurationIsVisible = 0;
586 | defaultConfigurationName = Release;
587 | };
588 | /* End XCConfigurationList section */
589 | };
590 | rootObject = 104DAE73235147DB007FE83D /* Project object */;
591 | }
592 |
--------------------------------------------------------------------------------
/iOS FaceTrack for Maya.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS FaceTrack for Maya.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/iOS FaceTrack for Maya.xcodeproj/project.xcworkspace/xcuserdata/mohamedhammoud.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhammoud/iOS-FaceTrack-for-Maya/bae2ead5a57bc93011303421c2c636ea645ad27f/iOS FaceTrack for Maya.xcodeproj/project.xcworkspace/xcuserdata/mohamedhammoud.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/iOS FaceTrack for Maya.xcodeproj/xcuserdata/mohamedhammoud.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | iOS FaceTrack for Maya.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/iOS FaceTrack for Maya/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // iOS FaceTrack for Maya
4 | //
5 | // Created by Mohamed Hammoud on 2019-10-11.
6 | // Copyright © 2019 Mohamed Hammoud. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | }
30 |
31 | func applicationWillEnterForeground(_ application: UIApplication) {
32 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
33 | }
34 |
35 | func applicationDidBecomeActive(_ application: UIApplication) {
36 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
37 | }
38 |
39 |
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/iOS FaceTrack for Maya/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/iOS FaceTrack for Maya/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/iOS FaceTrack for Maya/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/iOS FaceTrack for Maya/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/iOS FaceTrack for Maya/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | NSCameraUsageDescription
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 | arkit
33 |
34 | UIStatusBarHidden
35 |
36 | UISupportedInterfaceOrientations
37 |
38 | UIInterfaceOrientationPortrait
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UISupportedInterfaceOrientations~ipad
43 |
44 | UIInterfaceOrientationPortrait
45 | UIInterfaceOrientationPortraitUpsideDown
46 | UIInterfaceOrientationLandscapeLeft
47 | UIInterfaceOrientationLandscapeRight
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/iOS FaceTrack for Maya/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // iOS FaceTrack for Maya
4 | //
5 | // Created by Mohamed Hammoud on 2019-10-11.
6 | // Copyright © 2019 Mohamed Hammoud. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import SceneKit
11 | import ARKit
12 |
13 | class ViewController: UIViewController, ARSCNViewDelegate {
14 |
15 | @IBOutlet var sceneView: ARSCNView!
16 | @IBOutlet weak var faceLabel: UILabel!
17 | @IBOutlet weak var labelView: UIView!
18 |
19 | override func viewDidLoad() {
20 | super.viewDidLoad()
21 |
22 | // Set the view's delegate
23 | sceneView.delegate = self
24 |
25 | labelView.layer.cornerRadius = 10
26 |
27 | // Show statistics such as fps and timing information
28 | sceneView.showsStatistics = true
29 |
30 | guard ARFaceTrackingConfiguration.isSupported else {
31 | fatalError("Face tracking is not supported on this device.")
32 | }
33 | }
34 |
35 | override func viewWillAppear(_ animated: Bool) {
36 | super.viewWillAppear(animated)
37 |
38 | // Create a session configuration
39 | let configuration = ARFaceTrackingConfiguration()
40 |
41 | // Run the view's session
42 | sceneView.session.run(configuration)
43 | }
44 |
45 | override func viewWillDisappear(_ animated: Bool) {
46 | super.viewWillDisappear(animated)
47 |
48 | // Pause the view's session
49 | sceneView.session.pause()
50 | }
51 |
52 | // MARK: - ARSCNViewDelegate
53 |
54 | // Override to create and configure nodes for anchors added to the view's session.
55 | func renderer(_ renderer: SCNSceneRenderer, nodeFor anchor: ARAnchor) -> SCNNode? {
56 | let faceMesh = ARSCNFaceGeometry(device: sceneView.device!)
57 | let node = SCNNode(geometry: faceMesh)
58 | node.geometry?.firstMaterial?.fillMode = .lines
59 |
60 | return node
61 | }
62 |
63 | func renderer(_ renderer: SCNSceneRenderer, didUpdate node: SCNNode, for anchor: ARAnchor) {
64 | let faceAnchor = anchor as? ARFaceAnchor
65 | let faceGeometry = node.geometry as? ARSCNFaceGeometry
66 | faceGeometry?.update(from: faceAnchor!.geometry)
67 |
68 | }
69 |
70 | func session(_ session: ARSession, didFailWithError error: Error) {
71 | // Present an error message to the user
72 |
73 | }
74 |
75 | func sessionWasInterrupted(_ session: ARSession) {
76 | // Inform the user that the session has been interrupted, for example, by presenting an overlay
77 |
78 | }
79 |
80 | func sessionInterruptionEnded(_ session: ARSession) {
81 | // Reset tracking and/or remove existing anchors if consistent tracking is required
82 |
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/iOS FaceTrack for Maya/art.scnassets/ship.scn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhammoud/iOS-FaceTrack-for-Maya/bae2ead5a57bc93011303421c2c636ea645ad27f/iOS FaceTrack for Maya/art.scnassets/ship.scn
--------------------------------------------------------------------------------
/iOS FaceTrack for Maya/art.scnassets/texture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhammoud/iOS-FaceTrack-for-Maya/bae2ead5a57bc93011303421c2c636ea645ad27f/iOS FaceTrack for Maya/art.scnassets/texture.png
--------------------------------------------------------------------------------
/iOS FaceTrack for MayaTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/iOS FaceTrack for MayaTests/iOS_FaceTrack_for_MayaTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // iOS_FaceTrack_for_MayaTests.swift
3 | // iOS FaceTrack for MayaTests
4 | //
5 | // Created by Mohamed Hammoud on 2019-10-11.
6 | // Copyright © 2019 Mohamed Hammoud. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import iOS_FaceTrack_for_Maya
11 |
12 | class iOS_FaceTrack_for_MayaTests: XCTestCase {
13 |
14 | override func setUp() {
15 | // Put setup code here. This method is called before the invocation of each test method in the class.
16 | }
17 |
18 | override func tearDown() {
19 | // Put teardown code here. This method is called after the invocation of each test method in the class.
20 | }
21 |
22 | func testExample() {
23 | // This is an example of a functional test case.
24 | // Use XCTAssert and related functions to verify your tests produce the correct results.
25 | }
26 |
27 | func testPerformanceExample() {
28 | // This is an example of a performance test case.
29 | self.measure {
30 | // Put the code you want to measure the time of here.
31 | }
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/iOS FaceTrack for MayaUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/iOS FaceTrack for MayaUITests/iOS_FaceTrack_for_MayaUITests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // iOS_FaceTrack_for_MayaUITests.swift
3 | // iOS FaceTrack for MayaUITests
4 | //
5 | // Created by Mohamed Hammoud on 2019-10-11.
6 | // Copyright © 2019 Mohamed Hammoud. All rights reserved.
7 | //
8 |
9 | import XCTest
10 |
11 | class iOS_FaceTrack_for_MayaUITests: XCTestCase {
12 |
13 | override func setUp() {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 |
16 | // In UI tests it is usually best to stop immediately when a failure occurs.
17 | continueAfterFailure = false
18 |
19 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
20 | }
21 |
22 | override func tearDown() {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | }
25 |
26 | func testExample() {
27 | // UI tests must launch the application that they test.
28 | let app = XCUIApplication()
29 | app.launch()
30 |
31 | // Use recording to get started writing UI tests.
32 | // Use XCTAssert and related functions to verify your tests produce the correct results.
33 | }
34 |
35 | func testLaunchPerformance() {
36 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) {
37 | // This measures how long it takes to launch your application.
38 | measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) {
39 | XCUIApplication().launch()
40 | }
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------