Closed leandrodemarco closed 6 years ago
@leandrodemarco
You need to write out the modelScene
and/or animationScenes
inside your SCNAssimpScene
object. See: https://dmsurti.github.io/AssimpKit/appledocs/html/Classes/SCNAssimpScene.html
So it should be for example:
[scene.modelScene writeToURL...]
HI @dmsurti, thanks for the quick reply and for the great work maintaining this library. I forgot to mention in my original post I had also tried writing out the modelScene
with exactly same results. Would it help if I upload one of the fbx files? (it weights around 20 MB)
@leandrodemarco
thanks for the quick reply and for the great work maintaining this library 👍
Have you also tried loading the file with the macOS/iOS sample apps in the AssimpKit
repo? That way you know that there is no problem in reading and viewing the fbx file.
Would it help if I upload one of the fbx files
Sure thing, upload the FBX file. IIUC, you are not able to write this FBX to a scn
file? Otherwise, uploading a sample project to GH would also help.
Sorry for the delay @dmsurti. Here's a link to one of the fbx files: https://ufile.io/zpqe5
IIUC, you are not able to write this FBX to a scn file?
Exactly that, my Mac "app", just contains those lines I posted.
Have you also tried loading the file with the macOS/iOS sample apps in the AssimpKit repo?
I've just cloned the repo. I just opened the workspace and see there's an OSX-Example app. You mean to compile that?
@leandrodemarco There is no problem per se in AssimpKit
with the fbx model. I loaded it fine and also wrote it out to a .scn
file without any issues.
The minimal relevant sample code to save is:
[scene.modleScene writeToURL:panel.URL
options:nil
delegate:nil
progressHandler:nil];
I have attached the compressed exported scn file here. kia-hq-anim-00.scn.zip
Orthongal to the export issue, there is a problem in that some geometry is not rendered correctly. I have opened a separate issue for that here:
You can also download an app if you want to verify: http://www.isonapps.com, which is developed using AssimpKit
. I have used this app to import your fbx and export it to .scn
.
You will need to debug your file path related code; sorry I won't be able to help any further than this.
This is probably some dumb mistake I'm missing, but been stuck with it for quite a few hours now so I'd appreciate any help or hint to solve it. I have a bunch of .fbx files I'd like to convert to .scn I'm doing it on Mac, with a very tiny simple app which on it's
applicationDidFinishLaunching:
method has the following linesIn theory everything goes fine as for each one of the files I see the log message:
Serialized success for <fileName>.fbx. Output to /Users/Leandro/Documents/SCN/<fileName>.scn
If I forcefully create a file at that path with the commented lines, the file remains 0 bytes in size. I've disabled sandbox of the app as it says here but no changes: https://forums.developer.apple.com/thread/88701