How do I load a collada file in Away3d broomstick - away3d

Do you have an example of loading a 3d object and displaying it from a collada file? I've browsed around and haven't found a good example.

I'm afraid that in Broomstick version is Collada file loading not yet implemented. Available parsers are AC3D, AWD, MD2, MD5, 3DS and OBJ (see git hub parses source folder)..

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!

How to upload an OSG-model to Google Earth?

I am programming with OpenSceneGraph (OSG) and I want to put my created OSG-model into Google Earth.
I did research, but I could only find that Sketchup can directly upload its model to Google Earth, but couldn't find anything about uploading an OSG-mode.
Does anybody know how I can achieve this?
You can try exporting your model to COLLADA (DAE) which Google Earth can import.
OSG needs to be built with the COLLADA-DOM library in order to have the COLLADA .DAE loader/saver, and the COLLADA-DOM library is non-trivial to get working.

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.

How to load a 3d model from URL in unity?

What is the best way to load a 3d model from a URL inside of unity at runtime. I have tried this obj importer
http://wiki.unity3d.com/index.php?title=ObjImporter
But the mesh in not imported properly. What other options exist? Assetbundle needs a pro version and even that won't solve as I need to load a 3d model from url. Any suggestions?
The way to go would be asset bundles. They are Unity's (proprietary) way to load prepackaged, compressed assets from a file or an URL. All asset bundles must be prepared and built in Unity Editor.
If you need a more general approach which loads a raw file format like fbx, obj, 3ds, collada, et cetera, you should use the Assimp library. Assimp library is written in C++ but there is a wrapper for C#.NET here.
There are also wrappers for Unity like this Unity Assimp being free but quite outdated. The Asset Store though is packed with format specific importers including this free OBJ importer.
2021 update
Unity now also has Addressables which are an evolution of the aforementioned Asset Bundles. In a sentence, Addressables are memory managed, asynchronously loadable resources that can be loaded from local or remote end points.
There are a couple of libraries available to load 3d model from a URL in Unity.
These are the best two libraries to load the model from remote location at runtime.
Asynchronous Importer and run-time Loader for Unity
Runtime OBJ Importer
Asynchronous Importer and run-time Loader for Unity is quite a useful tool to import obj files from a remote location with texture and materials. where the Runtime OBJ Importer might miss the texture/material of the model.
Demos:
https://github.com/codemaker2015/unity3d-runtime-model-importer
https://github.com/codemaker2015/Runtime-OBJ-Importer-Demo

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.