To get the best possible results when exporting from Rhino to JoinXR we recommend installing our free plugin. This will ensure that the model is optimal and the materials look as good as possible in JoinXR.
NOTE: This plugin was built with the Rhino 7 SDK, but only tested in Rhino 8. If you have problems with Rhino 7 or need an earlier Rhino version please get in touch.
Installing the plugin
- Download the plugin
- Place the plugin in a sensible folder i.e Documents/Rhino Plugins
- Open up Rhino
- Go to Tools -> Options
- Go to the Plug-ins section
- Click install and select the JoinXRPlugin.rhp file
Once installed you have access to 2 commands. FixMaterialsForExport and ExportToJoinXR
FixMaterialsForExport
The textures on Rhino materials can be mapped in multiple ways. The default way for some of the built in presets (Plastic, metal, etc) to make their details texture is to use WCS/OCS (box style). This is a procedural texture mapping that applies fairly uniform-sized texture detail onto your surface. Unfortunately, this procedural mapping does not get exported correctly. For the mapping to be exported correctly it must use channel mapping.
The FixMaterialsForExport command will swap all materials that use WCS/OCS texture mapping to use channel mapping and applies a Box texture mapping to all objects that are using those materials. This process should result in minimal visual side effects within Rhino and will result in like-for-like texture mapping once exported.
- Ensure your work is saved
- Run the "FixMaterialsForExport" command
- Press "Yes" on the confirmation prompt.
- Once complete it's a good idea to review the model to ensure it still looks correct in Rhino.
- Export (see next section)
ExportToJoinXR
The main purpose of this command is to convert all exported surfaces into meshes with the most optimal tessellation and then combine all the meshes in each layer. This minimizes triangle and object count improving both load time and runtime performance.
- Run the "ExportToJoinXR" command
- Select all the objects you wish to export and press enter
- When prompted to choose how to export. Choose "gltf binary file (*.glb")
- Configure export options
- Ensure "Cull backfaces" ticked (See below)
- Tick "Export Layers"
- In the Compression tab ensure "Use Draco compression" is unticked.
- Confirm
Once exported, the model can be imported as usual into JoinXR
Backface Culling
Usually, in realtime visualization backface triangles are culled, this is for performance reasons to ensure the best possible experience on XR headsets. However, in Rhino backfaces are not culled (double sided) which means your model can look perfectly fine in Rhino, but have parts missing or invisible when viewed from certain angles in JoinXR.
For example, this object looks correct in Rhino, but in JoinXR there are some missing faces
| Rhino | JoinXR |
The quick fix for this is to untick "Cull Backfaces" on the GLTF export settings. The downside to this is that the XR headset will have to do twice as much work drawing the inside and outside of the object. This can be fine for simple objects, but for more complex objects you need the model as optimal as possible.
The backfaces can be fixed properly using features available in Rhino.
- First you want to see where your backfaces are. Go to the display tab, tick Color Backfaces, and set the color to something obvious like red.
- Now that you can see the faces, select them
- Run the command "Flip"
- Repeat this process until no more backfaces are visible from the outside.