I want to convert my fbx file I made in Maya (2017) to a scn file for the ARKit of iOS 11. What steps do I take to convert the file?
You will need to export your Maya model as a Collada (.dae) file using the available Maya Collada export plugin which you can locate via web search.
Related
I have lost a lot of sleep over this (in the past 3 years).
I was hooping that Apple would at least be able to export its own .scn Scenes to USDZ without too much problems.
Has anyone been successful in exporting a .scn scene to USDZ from within an app?
I have tried this but to no avail:
https://github.com/piemonte/obj2usdz
Have you taken a look at this:
Batch Converting Apple SCN files into DAE
xcrun scntool --convert fileIn.scn --output fileOut.dae --format dae
Or this:
https://developer.apple.com/forums/thread/104553
They mention a number of ways such as converting to a dae first, and then using the free converter.
I'm displaying furniture from furniture.3d.io in my AR app, which works well in a web view using Google's WebARonARKit and aframe. However the tracking and lighting seems to be better when using ARKit natively.
ARKit requires models to be either .scn, .dae, or .obj formats. Is there any way to export the furniture from 3d.io so that I can use it in my app? Aframe has a gltf exporter that I could use, so I might try to manually convert a few models using from 3d.io -> .gltf -> .dae and blender, but can't figure out how to do it in a more automated way.
I would suggest you go from 3d.io -> .blend -> export .dae for any model that you wish to take to ARKit. Blender has a great collada exporter.
I'm not sure if exporting furniture / any 3d object is possible yet from 3d.io, but it should be possible from archilogic.com. You can also directly export collada files from archilogic, but texture export is not yet supported.
Edit: actually archilogic now exports diffuse, normal and specular maps for collada
I am working with SceneKit and Collada file. Now, I am able to load the collada file inside art.scnassets folder as well as in my project root directory. I am getting an error when i am trying to load the file from a local webserver. Any reason why I cannot do this?
let url = NSURL(string: "http://localhost:8888/new.dae")
let scn = try! SCNScene(URL: url!, options: nil)
2016-07-31 17:41:29.537 biOS[3863:254446] SceneKit IO: error, COLLADA files are not supported on this platform.
fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=259 "The document "new.dae" could not be opened." UserInfo={NSURL=http://localhost:8888/new.dae, NSLocalizedDescription=The document "new.dae" could not be opened., NSLocalizedRecoverySuggestion=Collada is not supported by this version of SceneKit}: file /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-703.0.18.8/src/swift/stdlib/public/core/ErrorType.swift, line 54
My goal is to read the collada file from a websever and then offer the user to download the file onto the device. I do not know why I am getting the error. By the way, I did a document preview to render the file, and it was successfully about to render document in xml. So, it is not a case of access to the file. Please help!
Any reason why I cannot do this?
Yes unfortunately.
During the build process XCode compiles your collada to .scn files. This is a scenekit specific binary file format, doing this reduces the size of the asset files (collada files are XML based) improving the load performance. SceneKit running on an iOS device does not load collada files, only .scn files.
You could look at using ModelIO to load resources that aren't part of your application, but I note collada isn't one of the supported formats.
You can also convert your dae files just like Xcode does using terminal.
Build a project with Xcode that has a dae and check the commands executed by Xcode (search for scntool)
Related: COLLADA transformations in SceneKit
I have found the AssetImportKit framework to solve this problem. The framework allows you to import Assimp supported file formats directly in SceneKit at runtime (macOS & iOS). The library supports:
Geometry Materials (with color, embedded textures and external textures)
Cameras and Skeletal animations
Serialization to .scn format
We try to make viewer for models in Xcode and use SceneKit to render model. If we add COLLADA (.dae) file to Xcode, it transforms the model using scntool to c3d format (found this on the Internet). But we want to load models in runtime (we download them from server to iOS device). How can we transform .dae to this format not from Mac OS? Our server running Ubuntu, we can transform model and send it already converted to iOS devices.
Thanks a lot!
you can run scntool manually but you'll need a machine running OS X to do that. The compressed format used by SceneKit on iOS is not documented and there is no other tool that you can use to make the conversion.
Can anyone suggest me , how to generate .obj 3D image ? Is there any free tools available ?
I want to generate .obj files and use it in my silverlight augmented reality application.
.obj files are created originally from Alias WaveFront which was purchased by Maya
http://usa.autodesk.com/alias/
These should help you