Apologies seeing this just now.
I did explain exactly what I did. Instead of your reference image I loaded a .png with the area where the car is being transparent. Doesn't get any clearer than that. If you still do not understand what that means see below.
It does not matter if you are using Reality Composer or Xcode. Either way you can set a reference image as an anchor. Just use an image like I described. However, you're really missing out on a lot of great features of ARKit if you are not using Reality Composer. It's not about switching, it works together seamlessly with Xcode. Give it a try!
Post
Replies
Boosts
Views
Activity
It's working, but now I have a new problem:
import UIKit
import RealityKit
class ViewControllerBlender: UIViewController {
@IBOutlet var arView: ARView!
@IBAction func Clone(_ sender: Any) {
if let boxScene = try? Blender.loadVoid() {
if let box = boxScene.findEntity(named: "Steel Box") {
let boxCopy = box.clone(recursive: true)
let boxAnchor = AnchorEntity()
arView.scene.addAnchor(boxAnchor)
boxAnchor.addChild(boxCopy)
}
}
}
override func viewDidLoad() {
super.viewDidLoad()
}
}
It functions as expected, but returns the error "Result of call to function returning 'Blender.Void' is unused" – why? The .rcproject file is called "Blender", the Scene is called "Void", and the Box is called "Steel Box".
Have you tried importing your model through Reality Composer? There you can set collision shapes, maybe that would help…
How are you getting your Blender Cube to USD? The standard cube in Blender is 2×2×2 meters, when I export it as OBJ and load it into Reality Converter it is suddenly 2×2×2 centimeters, which leads me to believe the standard unit of measurement is centimeters not millimeters.
I suggest loading your objects into a Reality Composer scene to test the scale (see image). Once that's figured out I assume you can take these settings over to Xcode. The gray cube is from Blender, the white one is the standard 10cm one from Apple and I assume you are familiar with the TV.
Yes but what do you want to accomplish with this? What's the goal? If you're looking for object recognition of an real world object inside an ARKit Scene look here. Just download the App, load in on your iPhone via Xcode and start scanning. Later you can set an anchor when composing your scene in Reality Converter. Hope that helps.
OK one last try, I will make this short because I refuse to type this out a third time.
Forget the timer for now let's make that cube spawn. RCproject here with gray cube and gold cube. When scene starts, golden cube disappears, gray cube drops. When tap ➔ gold cube is made visible and drops also.
How can I spawn more cubes? I can loop the action and keep spawning the same gold cube but I want MORE. Maybe I am thinking about this in the wrong way, I am usually not this clueless. The issue is I can't tell wether the looping/spawning/repeating process needs to happen in Reality Converter, Xcode, or both.
Inspiration: definitely not google's video platform me pipe .com/watch?v=SDeVyxtdSUk
Nice concept btw
Is there some kind of curse on my profile? I have replied three times and the messages keep disappearing!
Yup! Solved! Totally works! Kid could paint the car entirely black and it still recognizes the scene.
https://www.icloud.com/iclouddrive/0d1z7xqmQIR2EaqLLL8Or9ZDg#MalenNachZahlen
I wonder what happens if you leave the area where the car is blank. As in load a .png as a reference image where the car is completely transparent. Maybe ARKit is smart enough to interpret that as "ignore this area of marker"?
Oh time flies!
Yes I actually have, you can scan objects with the developer-only ARKit Scanner app, then set them as anchors for any given scene.
The cube is real, it is a physical object.