Closed Leo-Kuyaco closed 7 years ago
@Leo-Kuyaco Are you sure, your Carthage build succeeded? Ensure you have p7zip
installed, this is a recent change in the build process.
It will be easier to help, if you can push a sample project that shows the problem.
There is a sample project that uses AssimpKit as an external dependency; may be that can help.
Hi @dmsurti,
Thanks for your immediate reply. I'm certain that the Carthage build succeeded because I can see the files that were created after the carthage update. I'm also certain that I installed p7zip because I was getting an error message when I was doing the carthage update and it went away after I installed the p7zip.
What I've done are as follows: (1) Copied original project (2) Installed p7zip (3) Did carthage update with github "dmsurti/AssimpKit" in the cartfile (4) Copied/Dragged and dropped assimpkit.framework file from Carthage\Build\iOS folder to both the assimpkit.xcworkspace and iOS-Example.xcodeproj. (4) I build/run the xcworkspace file. No errors on the build. (5) I build/run the iOS-Example.xcodeproj file then get the error, "'AssimpKit/PostProcessingFlags.h' file not found".
Not sure if I'm doing something wrong here or missing any steps. I hope I gave you enough information to decipher the issue. Attached is the screenshot showing where the files were created after I did the carthage update.
Thanks in advance!
Sorry, but I don't understand; what is your goal? To work on the AssimpKit
source itself or to use AssimpKit.framework
as a dependency in some app of yours.
For the former, just build the targets; see #77. You don't use Carthage when you work on AssimpKit
source itself.
To use AssimpKit.framework
in your app, you just add the Cartfile to your app sources, build and drop AssimpKit.framework
to your app's libraries section; see the sample project I referenced earlier.
Hope this helps.
I just want to use Assimpkit to convert fbx files to scn files. I was under the assumption that you need the Assimpkit.framework to do this. When I ran the sample project you mentioned above, I still get the same error message. I didn't do anything else but copy the project and run it. Should I be doing something else?
@Leo-Kuyaco You have to run carthage update
in the directory of the cloned sample project. I just did a fresh clone and I get no such build error.
Your screenshot also shows AssimpKit.framework
in red which implies it is not yet built.
Similar to this project, in your project, add a Cartfile, run carthage update
and add the AssimpKit.framework
to your project's embedded binaries section.
Screenshots:
Got it working! Thank you for you patience! This is awesome!
I guess my next question is, does AssimpKit actually generate an scn file after you load your projects in it? I was under the assumption that AssimpKit is an asset converter.
Great 👍
I was under the assumption that AssimpKit is an asset converter.
Definitely, it is a converter that converts the supported file formats to SceneKit files. It gives you SCNScene
instances which you need to serialize.
SCNAssimpScene
holds native SCNScene
model and animation scene objects, so you can just use these regular options to archive these to .scn
files on disk.
I'm going to admit... Objective-C is not my strong suit. I've been working on serializing the scene file but haven't had any luck. Can you look at my code below and see what I'm doing wrong? All I want is for the scn file to be generated in the same location where it's reading the files from. I'd really appreciate it if you can do me a solid and help me with this last request. Thanks so much!
You are writing to the docsDir, instead you have to write to a file in the docsDir with the file scheme PS: I am writing this off the top of my head and the code below might need some minor fixes in Xcode.
NSString *bobScnFile = [docsDir stringByAppendingString:@"/Bob.scn"];
NSURL *bobURL = [NSURL URLWithString:bobSCNFIle];
if(![bobURL isFileURL]) {
bobURL = [NSURL URLWithString: [@"file://" stringByAppendingString:bobURL.absoluteString]];
}
Now use the above URL in your writeToURL
method. Note that you will have to fetch the bobScnFile via iTunes files sharing as we are writing it to the docs dir. The above definitely works. Hope this helps.
You the man @dmsurti! I truly appreciate all your help. Couldn't have done it without you :).
Hello,
I'm getting an error message saying, "'AssimpKit/PostProcessingFlags.h' file not found" .
I copied the file AssimpKit.framework generated by carthage in my project per instructions but I'm not sure why I'm still getting this error message. Please help when you get a chance.
Thanks, Leo