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

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!

Related

Including non-standard resources in Unity HoloLens app

I'm building an app that must visualize a large point cloud on HoloLens 1st gen. As performance is an issue wit large clouds, I'm using Potree, an octree that takes care that only a preset number of points from the cloud are rendered.
The solution works in the editor, but, you guessed it, not when deployed on HL.
The point cloud in the Potree format is a set of couple of .json and hundreds of .bin files stored in hundreds of subfolders following the octree structure, all of that stored within a single folder, and the path to this folder is accessed by the renderer at runtime. However, I don't know how to include this folder in the HL app. Using Resources doesn't work as it's not really a standard resource. I've seen Asset Bundle suggested elsewhere, but according to this post asset bundling doesn't work on HL.
Is there a way to simply put this complex file structure in an accessible directory on HoloLens?
I feel completely stuck here and any help would be much appreciated.
Some of the things I've tried:
Keijiro Pcx doesn't work here. If rendered as single pixels, points cannot be seen in AR, and if rendered as meshes, the performance is abysmal (which led me to a conclusion octree structure should be used)
the solution here shows how to load one .xml file, but I have hundreds of files so I don't think it would work for me
similarly, this post deals with one .obj file
Unity 2019.4
HoloLens 1st gen
For anyone stumbling upon this - I ended up using Unity StreamingAssets and accessing the folder with Application.streamingAssetsPath - works beautifully!
Using pcx needs to be adjusted to binocular rendering in publishing settings. Please uncheck "Enable Depth Buffer Sharing" in XR Settings, and change "Single Pass" to "Multi Pass", as shown in the figure.enter image description here

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.

Unity3D file explorer on Microsoft Hololens?

My goal is to read a XLSX file and use this to generate objects in Unity3D. However this app is for a hololens. It is possible to let the game ask the user to select a file which it should import (at runtime)? like how a regular windows forms app opens an explorer window and lets you browse for a file.
so, just to clarify, what i DONT want is to import the XLSX file as an asset before building the app (because the game shouldn't be limited to just use that file!).
Let me know if the question isn't detailed enough, I'll try to specify it more if needed.
Unity itself doesn't have any way to implement a filebrowser on runtime however people have made their own versions of a filebrowser which you could use. Something like the ImprovedFileBrowser by Daniel Brauer. Which was inspired by a Filebrowser made by AngryAnt
Note: The ImprovedFileBrowser uses the ImprovedSelectionList which you will also need to get it to work.

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.

Are there any tutorials on coding a parser for SVG files to be used by box2D?

I am trying to create an iPhone game with fairly large levels. Hard coding the platforms and physics objects is very time consuming. I have seen some people have made their own parsers for svg files to use in box2D, and Riq is selling levelSVG but it is a little pricey for me at the moment, and I only need basic features. Is there a tutorial on how to code a parser available online?
Have you taken a look at SVGQuartzRenderer? It is designed to render SVG files in Quartz, so I imagine you might be able to pull out the SVG parsing code from this. It's opensource, MIT license.
I don't know about any tutorials but its fairly easy to do this using an XML parsing library. In my project I use MiniDOM to load an svg file and then I convert the elements into objects in the box2d word. The only thing that I had to do manually was the parsing of the path element.
I've written an extensive tutorial on how to parse SVG files using Apache Batik SVG library. Included with the tutorial are a set of classes and a function I wrote in Java which will generate a set of Vec2 points given the location of the SVG file. If you're using Objective C you could try to port the scripts or at least get an idea of the process involved. The scripts support multiple paths per SVG file, transformations, straight lines and quadratic splines. The first tutorial in the series can be found here.