What file formats are supported by Unity and Hololens? - unity3d

What file formats does Unity and Hololens support ? We assume only FBX and GLTF file formats only?
Are there open source tools to convert to these formats ?

The ARR service accept FBX and GLTF file formats only.
Unity supports FBX, GLTF, OBJ and Maya files.
Unfortunately, Microsoft doesn't provide any specific tooling to convert a CAD file to these formats. However, Microsoft has recommended using programs like PiXYZ ( https://www.pixyz-software.com/studio/ ) to convert from various CAD formats to a tessellated mesh , which Unity or ARR can read in (such as FBX). Note, the HoloLens itself doesn't care too much about the the format as long as it is a triangulated mesh of polygons. (HoloLens is just a UWP device that uses DirectX). But, Unity does the heavy lifting of sending the polygon data to DirectX. You will likely have to optimize/reduce their CAD data since the HoloLens is a mobile device it can't render much more than 100-200k polygons at 60 frames per second. So, if you need more "complex" representations of the CAD data that's where ARR can help.
Thank you Cameron for providing me/us the info! Microsoft Developers are the best.

Related

How do I open a `.pb` file? Ideally, how to import it into Meta Quest 2?

I'm using Matterport's free scanning software for Android and it spits out 2 files called 2b7cb66c-4c9e-408d-88c5-90b8c0322c13_sweep_features.pb and 2b7cb66c-4c9e-408d-88c5-90b8c0322c13_sweep_cloud.pb (the important thing is that they're of the forms [nums]_sweep_features.pb and [nums]_sweep_cloud.pb).
:^)
How can I open .pb files?
.
=======================================================
=======================================================
My ultimate goal: the room in VR
I need to know how to open the file so I can walk around the rooms I scan in my Meta Quest 2 VR Headset. Ideally, I'd get it working in Unity, but UnrealEngine would be fine too. The most important thing is that I get the numerical and/or color information about the scanned room. Besides sweep_cloud.pb, there is also a file called sweep_features.pb.
Maybe .pb is a Tensorflow format? I say that because most of the .pb files I have found through Google for are Protocol Buffers, many of which store Neural Network (Tensorflow) files, and "feature" is jargon in Neural Networks and Machine Learning more generally!
Another guess would be something like a .obj file, a numpy (.npy) file or other point cloud format that probably has some color information in it!
Thanks!

Import .ai (illustrator file) in Unity and display them

I want to load an illustrator file in my game. Unity should recognize different layers, colors, and forms, and layers with text and display them in a 2d canvas.
The goal is that the players can click on different forms and that unity recognize them as individual forms. Do you know any unity asset or a way to make this possible?
For example when you import an image like this as an illustrator file -> https://www.mandala-bilder.de/mandala/erwachsenemandalas/mandala-ideen-erwachsene.pdf
I thought about an SVG file but then I canĀ“t use the different layers.
Illustrator has a proprietary file format, it has no publicly available documentation for newer versions. While you can dig out old specifications (this is why some programs only support AI files saved in ancient versions) http://www.idea2ic.com/File_Formats/Adobe%20Illustrator%20File%20Format.pdf I do not think you can just go in and start supporting a 2021 variant without requesting (and motivating) the spec from Adobe. They might also want to charge you for it.
SVG on the other hand is free and it's spec is public so there is much widely spread support. also SVG supports groups which can get your around the need for layers
Vector Express is a free conversion API you should be able to use. (requires a network connection, though)
https://github.com/smidyo/vectorexpress-api
You should be able to POST a request (https://docs.unity3d.com/ScriptReference/Networking.UnityWebRequest.Post.html) to this endpoint, with the raw AI file as the body:
POST https://vector.express/api/v2/public/convert/ai/gs/pdf/psd2svg/svg/
This will return a JSON object with a link to an SVG file that you can then download and display.

Conversion from USDZ file to glTF file

I am currently trying to work with AR in android but I have been given models in .usdz format. So far I have been looking for a way to convert this file into one that works with android (.fbx .obj .gltf), preferably being .gltf.
Can someone tell me if there is some support to this kind of conversion?
From what I have researched there is a support to convert files the other way around, meaning from .obj .fbx to .unsz.
Updated: May 10, 2022.
Now USDZ to glTF conversion is possible
At first, you need to install Autodesk Maya 2020 | 2022 | 2023 with Maya USD plug-in.
Then unzip a USDZ zero-compressed archive to get a binary USDC (sometimes ascii USDA) file format and a set of textures. You need to import USDC into Maya. And if you need you can edit those PNG or JPG textures.
Unzipping a USDZ file in macOS
In macOS Finder change the suffix of USDZ file to ZIP.
Uncompress ZIP file using Archive_Utility.app or RAR_Extractor.app.
In Autodesk Maya (with pre-installed USD plugin) import USDC model.
Edit USDC model.
Use Babylon exporter to produce a glTF format.
Recording this for posterity.
You can convert a USDZ file to GLB easily through the following steps.
Open said USDZ file in XCode.
File -> Export... , select Digital Asset Exchange (DAE)
From here you can choose any other tool like https://products.aspose.app/3d/conversion/dae-to-glb or https://github.com/KhronosGroup/COLLADA2GLTF (it's just much easier to find DAE to GLB convertors.)
Voila. However, do note that while on iOS quick look obeys your pivot point origin, but on Android Scene Viewer does not.

Is there any way to import solidworks files into unity as assets?

I'm attempting to program a simple chess game using the unity game engine. However, I can't work out how to import the assets that I've created in Solidworks into Unity.
Is it possible to do?
SolidWorks files tend to describe parametric geometry, such as NURBs, but most game engines prefer to work with raw polygons.
Unity has direct support for the following model formats: FBX, OBJ, DAE, 3DS.
SolidWorks can export to STL format, which other programs should be able to convert to OBJ, DAE, and/or FBX. Recommending a specific tool is beyond the scope of Stack Overflow, but I know that such tools exist. I recommend searching terms such as "stl to obj conversion".
These sorts of headaches are fairly common with 3D assets, since so many programs use customized file formats.
Also with 3DS studio max, you can directly open Solidwork files and then export as them as .fbx (you need to have Solidworks installed in the same machine as 3DS Max).
about SolidWorks (SLDPRT, SLDASM) Files:
http://help.autodesk.com/cloudhelp/2015/ENU/3DSMax/files/GUID-861F1B25-0F1B-4E79-A660-821F4CD2175B.htm
Other free tool for converting 3D files: (can save as .obj, which unity reads)
MeshLab
http://meshlab.sourceforge.net/
*Update for 2018:
Unity has partnered with this CAD importer company, and its available to purchase from: https://unity3d.com/pixyz
They support pretty much all the available CAD formats, including SolidWorks
full importer list at https://www.pixyz-software.com/plugin/
Just for reference, since Solidworks 2019 it is not necessary to use any AddIn/3rd Party Plugin. It is supported out of the box: https://help.solidworks.com/2019/english/whatsnew/t_export_using_extended_reality.htm
the "XR exporter" in SOLIDWORKS will allow you to export the model with some additional content (animation, appearances, metadata) to the GLTF / GLB fileformat and using the GLTF importer for unity (should be free) you're done.

3D CAD to OpenGL

I was wondering if anyone knew of a program that can take a 3D drawing of an object and then convert it into the required OpenGL points and normals.
Basically I have an AutoCAD drawing of that I want to be able to display in a program I am creating for iPhone. Any suggestions?
If you have AutoCAD itself, you could export the object into a mesh format, like STL. Reading STL files is straightforward.
If you don't have AutoCAD you may also try FreeCAD, which is based on OpenCascade, which exports quite nice meshes (also into STL format). However the AutoCAD file format is in constant flux, so YMMV when reading the original file.
This is gonna be a bit of a downer, but DWG file formats explore a deep dark road I'm not sure even AutoDesk has control over. The format doesn't even belong to them (they bought it a while ago) and even if you could manage it, the format is updated every 3 years or so (and is set to update again soon). For now, they have all the power. Sorry.
All I can say, is explore the references and take a look here (no code, sorry)