Forum Discussion
tedats
2 years agoExplorer
Export space mesh scanned on quest 3?
Hey, To cut to the chase, I want to scan my entire house, then export the space so I can load it into a 3D model. This is so I can take that low poly version of my house interior, and make my own 3...
JeffNik
2 years agoMVP
Actually - the Meta Unity SDK *DOES* include a way to get a triangle mesh from the Quest 3 room scans, if thats all you need. It's really cool, actually - I tried it for the same reason as OP wanted - to pull it into a modeller (Blender?) and use the triangle mesh as a guide. Unfortunately, though, it only gives triangles, no color or camera scan data. Also - I'm not sure how you would go about getting your whole HOUSE scanned, but just your immediate scene/environment is simple. There is a script in the Unity Meta SDK that allows you to get prefabs returned for each scene primitive that has been setup in the Meta Scene setup - each, window, door, table, lamp and even generic volume or plane. One of the primitives you can get a prefab returned for it called something like '???_TRIMESH' - and if the prefab is setup correctly, it will be returned containing a MeshRenderer and Mesh, where the buffers contain a triangle mesh from the scene scan. You can then use a script to pull the vertices and triangle indices from the mesh. Let me know if this sounds like what you want - I'll be happy to refresh my memory on the exact scripts and functions if you cant find them.
- zach.actually2 years agoHonored Guest
Hey Jeff, just stumbled on this thread and this sounds exactly like what I'm looking for for my own personal project. Any chance you can let me know those scripts? I'd really appreciate it!
- JeffNik2 years agoMVPHere's a simple high-level overview, and a link to the Meta documentation where I learned it.Add an OVRSceneManager script to an empty (or any) game object. - this script will map the scene primitives (lamps, windows, walls, floors, room mesh, generic volumes, etc) to prefabs that you create (attach meshes and MeshRenderers if you want them visible, or create them with just colliders if you just need them for physics collisions, etc). For Meshes - if you keep it a unit cube, and unit square (1 meter in size) and set the parental heirarchy correctly, the Meta SDK will scale them when it instantiates them to be the correct size of the real object/feature. This does not apply to the GLOBAL_MESH - the triangles are inherently scaled in the vertex data. Also - all prefabs will need to have a OVRSceneAnchor component added.Add an OVRSceneModelLoader script to the same object - this script will automatically instantiate one of the prefabs you created for each scene primitive/type you have setup in the device for your current location when the program starts up.For the two generic primitives (Plane and Volume), you can, but don't have to, define prefabs and drag them to the script entries. Any generic volume or plane you setup in the room, will be represented by these prefabs.For specific primitives FLOOR, WINDOW, LAMP, TABLE, *GLOBAL_MESH*, etc., create a prefab, pick which primitive type it represents and add it to the "Prefab Overrides" array. These specific primitives will be replaced in your scene with these prefabs. Note that the GLOBAL_MESH primitive has a few special components (related to meshes and colliders) that you must include in the prefab to have the triangle mesh data instantiated on it by the OVRSceneModelLoader script - these are outlined toward the article linked below, under the heading "Scene Mesh"Specifics and more details can be found here:Hope that gets ya started. I'm happy to help further if you have more questions.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 8 years ago