How to get furniture models from 3d.io into ARKit - augmented-reality

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

Related

How to prepare a 3D model to embed in an AR App

I have a newbie-questions regarding a 3D model I want to use in an AR App (with sceneform). The model itself is in .fbx format and I have 5 textures or maps (as .jpg files) for opacity, metal, roughness, base color and normal. Importing the .fbx model works, but I have no idea how to assign the textures to it. According to the documentation (https://developers.google.com/ar/develop/java/sceneform/custom-material), I need a .mat file. And that's my problem, how to create one. Manually or automatically. Where to start? Any idea/direction/good reading on the topic is helpful. Thank you in advance!
Convert model to .sfb using sceneform plugin or using .gltf extension.
On converted model or on model with .gltf extension, you can add texture on model pragmatically, there is a sample project for doing this on the following link
https://medium.com/temy/dynamic-textures-in-sceneform-98d7a2d35406
i implemented this in java. i hope this help you.
You only need a custom material (and a mat file) if you want to create an own shader for your model. Setting your different maps will be done in the *.sfa file. Just use the Android Studio Sceneform plugin and import your FBX model. It will automatically create a SFA file and you can set your maps there. An overview about which maps can be set for an FBX model can be found here.

Convert ( .obj / .fbx ) to .dae runtime which must support iOS SceneKit

I am facing trouble to find a way to convert .obj / .fbx to .dae (iOS scenefit Supported) automatically in background.
In python, it may be available to convert the file from .obj / .fbx to .dae file format. This process should run in background, immediately run after we will get .obj / .fbx file on server.
Here is the sample file, which we are trying to convert.
https://s3.ap-south-1.amazonaws.com/p9-platform/DAE/barware_s11624.obj
Please help me, if you have any suggestion.
Scenekit on IOS doesn’t support dae unless it was included in the app. So because of the “iOS Scenekit Supported” requirement there is no right answer, sort of. Although there are third party libraries (like https://github.com/dmsurti/AssimpKit ) to read and convert many 3d model formats, it won’t change the fact dae isn’t properly supported on IOS Scenekit .
That said, it is possible to convert OBJ to DAE in SceneKit using the following steps (in IOS 11.2 and later)
Load the obj file into a SCNScene.
Write the scene to a file with .dae extension using SCNScene’s writeToURL method.
That will create a .dae file SceneKit can support (but not directly, i.e. would need to be included in xcode or converted first) that starts with the following:
<?xml version="1.0" encoding="UTF-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
<contributor>
<authoring_tool>SceneKit Collada Exporter v1.0</authoring_tool>
</contributor>
I would second the recommendation for using Assimp or AssimpKit (I’ve only used the former but the latter might be an easier starting point).
I believe the DAEs on iOS aren’t DAEs at all, they just left the suffix the same and the actual files are SceneKit archives. I’m not sure if the API to write them is exposed yet, but I think it might be now since Xcode is now willing to load DAEs and write out SceneKit archives (but it adds the “.scn” suffix, not “.dae”).
It’s possible that iOS SceneKit can just load “.scn” files — it won’t load true DAEs because the DEA-reading/writing framework was licensed from Sony and is HUGE and the iOS team just doesn’t want that giant ugly framework on its system.
Another option would be to just link the iOS app against Assimp — it can load a ton of formats natively so you could skip all the intermediate stuff. It’s not NEARLY as huge as Sony’s DAE library so it might be acceptable to ship it with your app.

How to convert Blender blend (or obj) file to Qualcom Vuforia .h file

I'm developing an iOS app with augmented reality using Qualcomm Vuforia and I have difficulty in understanding how to create 3D models from Blender (or other softwares). All the examples use .h files with the coordinates of the vertices to generate i.e. a teapot.
I can not find documentation useful for me.
Is there a tool to convert .blend or .obj files to .h (OpenGL ES)?
thanks
I developed a script called mtl2opengl that does exactly what you need, based on the project obj2opengl. The script works with .obj and .mtl files, which I think can be exported straight from Blender, and produces .h files with vertex data. I use it extensively in my iOS augmented reality applications (though I haven't used the Vuforia SDK yet) and the accompanying resources include a sample Xcode project too. Hope it helps!
You should check out BlenderVuforiaExport (developed by a coworker of mine) here:
https://github.com/StickyBeat/BlenderVuforiaExport
It exports objects from Blender to the same .h-format used in the Vuforia example project.
I don't know much about vufoia, but here are two answers about using blender to get 3d models and displaying them on iPhone. These may help you.
How to get proper number of vertices in OBJ file from DCC tools such as Blender for use in OpenGL ES?
Put a Cinema 4D model and Texture into an iPhone App

Regarding .obj file creation in Augmented Reality

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

How to Export SolidWorks file to use in WebGL?

Is there a way to export or convert a SolidWorks file to be used in any way for WebGL?
Not sure where you want to go with this, but http://showwebgl.com/ (see http://plopbyte.net/2011/04/showwebgl/ for a brief description) will upload and display models in a variety of formats, and uses a WebGL framework called ogs.js. So you just need to convert your SolidWorks file to one of those.
A lot of WebGL frameworks accept Collada format. If you can't track these down, let me know.
Here is a Solidworks plugin which can export Solidworks models to a lightweight visualization format .pyd. This site has a webgl based pyd viewer to view published pyd file.
You can use the Collada export from the SolidWorks labs page. But you should consider simplifying your models before exporting them to Collada with a tool like Swap3D. This will decrease filesize dramatically. Export to Collada works much better when exporting a part instead of an assembly. So you should always consider saving an assembly as part.

Resources