Post

Replies

Boosts

Views

Activity

Comment on UsdUtils CreateNewUSDZPackage texture bug?
Yes I probably should have answered this when I found the answer. But yeah I ended up instead creating a mesh and then binding a material to it, similarly to what is described here https://graphics.pixar.com/usd/docs/Simple-Shading-in-USD.html except instead of binding a texture to the material for the diffuse color I just set the diffuse color to a constant value.
Topic: Graphics & Games SubTopic: General Tags:
Oct ’21
Comment on Why does file download work on simulator but not on device?
@eskimo thanks again for your continued support, So the application completely freezes and in Xcode it shows a "thread breakpoint" on the first line of the function which is just a print statement to display the location, however, as mentioned in the original post this does not happen in the simulator. I thought perhaps it could have been an issue with my API however I tried it using one of the usdz files from the apple developer page: https://developer.apple.com/augmented-reality/quick-look/models/cupandsaucer/cup_saucer_set.usdz (and changed the request type to GET of course) and the same thing happened. Is there some kind of file system or download permissions I have to allow on my device or something along those lines?
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’21
Comment on Why does file download work on simulator but not on device?
@eskimo Thanks for your reply, I have implemented the didCompleteWithError like so: func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {     if let error = error {       print("Download error: \(error)")     } else {       print("Task finished: \(task)")     }   } However, I still get the same result and when the download is attempted Xcode shows a thread breakpoint in the first line of the urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL ) function.
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’21
Comment on Is it possible to have a SwiftUI button load an AR Quick Look preview?
Hi Jim, This answer you posted has helped me tremendously with my own project, however, I was wondering if it was possible to use this method to display model from within the apps file system (using FileManager to produce the url for this line "guard let fileURL = Bundle.main.url(forResource: parent.name, withExtension: "usdz")" I have created a new question for this at: https://developer.apple.com/forums/thread/689586 if you have any experience doing this I would much appreciate the help. Thanks, Louis
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’21
Comment on UsdUtils CreateNewUSDZPackage texture bug?
Yes I probably should have answered this when I found the answer. But yeah I ended up instead creating a mesh and then binding a material to it, similarly to what is described here https://graphics.pixar.com/usd/docs/Simple-Shading-in-USD.html except instead of binding a texture to the material for the diffuse color I just set the diffuse color to a constant value.
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on Why does file download work on simulator but not on device?
@eskimo, My inexperience with Xcode got the better of me I had set a breakpoint accidentally and was not familiar enough with the UI to recognise it. Though I would be interested in what the 2 messages output to the console in Xcode mean and why they only show up when using a physical device rather than a simulator as that assisted in throwing me off?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on Why does file download work on simulator but not on device?
@eskimo thanks again for your continued support, So the application completely freezes and in Xcode it shows a "thread breakpoint" on the first line of the function which is just a print statement to display the location, however, as mentioned in the original post this does not happen in the simulator. I thought perhaps it could have been an issue with my API however I tried it using one of the usdz files from the apple developer page: https://developer.apple.com/augmented-reality/quick-look/models/cupandsaucer/cup_saucer_set.usdz (and changed the request type to GET of course) and the same thing happened. Is there some kind of file system or download permissions I have to allow on my device or something along those lines?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on Why does file download work on simulator but not on device?
@eskimo Thanks for your reply, I have implemented the didCompleteWithError like so: func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {     if let error = error {       print("Download error: \(error)")     } else {       print("Task finished: \(task)")     }   } However, I still get the same result and when the download is attempted Xcode shows a thread breakpoint in the first line of the urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL ) function.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on Is it possible to have a SwiftUI button load an AR Quick Look preview?
Hi Jim, This answer you posted has helped me tremendously with my own project, however, I was wondering if it was possible to use this method to display model from within the apps file system (using FileManager to produce the url for this line "guard let fileURL = Bundle.main.url(forResource: parent.name, withExtension: "usdz")" I have created a new question for this at: https://developer.apple.com/forums/thread/689586 if you have any experience doing this I would much appreciate the help. Thanks, Louis
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on Display AR QuickLook preview of usdz model not in main bundle
So when I make a call to Data(contentsOf: fileURL) no error is thrown and when I print it, it says 1024 bytes which matchs the size of the model (I am trialling this with just a very basic model). So I am guessing that means the fileURL is correct but the way I am trying to load the ARQuickLookPreviesItem is incorrect.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21