Posts

Post not yet marked as solved
0 Replies
266 Views
I have a human-like rigged 3D model in a DAE file. I want to programmatically build a scene with several instances of this model in different poses. I can extract the SCNSkinner and skeleton chain from the DAE file without problem. I have discovered that to have different poses, I need to clone the skeleton chain, and clone the SCNSkinner as well, then modify the skeletons position. Works fine. This is done this way: // Read the skinner from the DAE file let skinnerNode = daeScene.rootNode.childNode(withName: "toto-base", recursively: true)! // skinner let skeletonNode1 = skinnerNode.skinner!.skeleton! // Adding the skinner node as a child of the skeleton node makes it easier to // 1) clone the whole thing // 2) add the whole thing to a scene skeletonNode1.addChildNode(skinnerNode) // Clone first instance to have a second instance var skeletonNode2 = skeletonNode1.clone() // Position and move the first instance skeletonNode1.position.x = -3 let skeletonNode1_rightLeg = skeletonNode1.childNode(withName: "RightLeg", recursively: true)! skeletonNode1_rightLeg.eulerAngles.x = 0.6 scene.rootNode.addChildNode(skeletonNode1) // Position and move the second instance skeletonNode2.position.x = 3 let skeletonNode2_leftLeg = skeletonNode2.childNode(withName: "LeftLeg", recursively: true)! skeletonNode2_leftLeg.eulerAngles.z = 1.3 scene.rootNode.addChildNode(skeletonNode2) It seems the boneWeights and boneIndices sources are duplicated for each skinner, so if I have let's say 100 instances, I eat a huge amount of memory, for something that is constant. Is there any way to avoid the duplication of the boneWeights and boneIndices ?
Posted Last updated
.
Post not yet marked as solved
0 Replies
329 Views
I am looking for a way to get the list of HomeKit secure videos that are stored on iCloud. The objective is to show a list of them, maybe with come information like person or animal identification. I search the Apple doc for API but found nothing (I know the HomeKit doc, and have made several HomeKit apps already). Can anybody point me to a documentation entry point, is that Apple reserved only ?
Posted Last updated
.
Post not yet marked as solved
0 Replies
355 Views
Since I updated to XCode 15, I got an annoying "app comes from an unidentified developper, do you confirm you want to open" alert (note: approximate translation). I can still open and debug my app by clicking the "open" button, but that's a pain... I have the "sign to run locally" build setting. And I run the debug target. Any way to solve this or is it just a new XCode bug ?
Posted Last updated
.