This guide explains the best practices to implement when optimizing a 3D asset for use in Arthur, and elaborates on one of the methods you can use to achieve them
Please note that Arthur only supports 3D assets in .GLB format
Best Practices:
- Aim for a file size between 2mb to 3mb
- Keep the poly count as low as possible while maintaining the main outlines
- Use one texture and one mesh
- The texture should be in .jpg format with a maximum resolution of 1024px x 1024px
- Refrain from using reflective or transparent objects
- Do not use scripts or custom shaders
Guides to optimize a GLB:
Semi - Automated Process
Consider using the following online resource to get started:
https://www.rapidcompact.com/
This tool has the upside of being convenient and somewhat simple to use. Create a free account to receive 20 rapid points per month. This means you can optimize 20 models free of charge each month on this platform.
Steps to Follow:
- To upload the model, click on the Upload and Import tab at the top. Drag and drop your GLB file into the middle of the white area and select upload.
- After uploading your model, you'll automatically be directed to the Manage tab. Here, you can select your model by clicking on the checkmark under the Action column.
- Once you select the model, you'll see a detailed tab where you can choose various options. Here, we recommend to use a Custom Preset. This allows you to set your own settings, such as determining the number of tris you want for your low-poly version, and choosing your texture resolution.
- Once you select the model, you'll see a detailed tab where you can choose various options. Here, the best option is to use Low or Mid with Baking & Remeshing selected under General Tab.
Click on Optimize Selected Model to begin the optimization process. - Once processed, you'll see a tick mark indicating your model is optimized (as in the image below)
Navigate to the optimized model tab where you asset will be available for download.
Click on the download button and choose the .GLB file option
Adjusting material settings for best results:
While your model is now optimized, we still recommend adjusting some material settings using Blender. Blender is a free, open-source software.
- After downloading and installing Blender, open it and press "A" to select everything in the default scene. Then, delete everything.
- Navigate to the file menu and select Import>gltf2.0(.glb/.gltf). From there, import the file from your directory. After importing, the model may appear gray — simply switch to "Viewport Shading" to view the texture.
- Click and drag from the left side of the window to open a sub-window. Change the Editor type to Shader Editor. We only need one texture, which is for the Base color. Delete all slots that aren’t named “Base Color”.
- Next, drag the Color node to Emission. We need to assign the same texture to the Emission slot and set the Emission strength to 1. Follow these same values shown in the screenshot below, for the other material properties.
- Now that your model is ready for export, navigate to File > Export > gltf2.09.glb/.gltf and export it as a GLB in your desired directory. The file size should be significantly reduced since we removed unnecessary textures.
Manual Process
We have the option to use a variety of 3D software such as 3DS Max, Maya, and Blender. For the sake of consistency and to avoid potential complications that might occur when switching between platforms, we'll stick with Blender for this guide. Ultimately, Blender will also be used to execute the final export for Arthur.
A key requirement for this method to work effectively is having a clean, quadratic mesh.
- Open Blender and import the unoptimized mesh. Then, turn on viewport shading to view the texture as mentioned above.
- To view the wireframe of the mesh, select the overlay option and activate wireframe mode.
- Now, navigate to the modifier and add the Decimate modifier by selecting "Add Modifier".
- After applying the Decimate modifier, you'll notice the face count at the bottom along with several settings.
- You simply need to lower the ratio from 1. Where to set this value is heavily dependent on your specific model and its structure. Therefore, you need to adjust the value according to your specific needs. In this example, 0.25 is a good value. It reduces the face count significantly from 13,774 to 3,442 while maintaining the overall geometry well.
- Now, it's time to reduce the texture resolution. High-resolution textures affect the final file size. Before proceeding, we need to export the texture from Blender. To do this, open a new window in Blender and select Image Editor from the Editor Tab. Here, you can find the textures being used. We only need the base color/albedo texture.
- Press Alt + Shift + S to save the texture to your desired directory. Then, open the file in a image editor such as Photoshop, or similar free online solutions like Photopea (https://www.photopea.com/) to reduce the image size. As shown in the image below, the current size is 48mb and the resolution is 4096×4096. The image is in .png format. We recommend to use the .jpg format, as it's tends to be smaller in size for organic images like textures.
- First, we'll downsize the image resolution from 4096x4096 pixels to 1024x1024 pixels, which is the maximum resolution we recommend. The image size is now a significantly smaller 3mb at this resolution. To check the image size in Photoshop, use the shortcut Ctrl+Alt+I
- Now, press Ctrl+Alt+S to save the file. However, this time, change the 'Save as type' to .JPG
- Now, we need to replace the old texture with the new one in Blender. Stay in the shading tab, click on the folder button, and open the file from your directory.
- After reloading the texture, connect the color node to the Emission and set its value to 1. Copy the other settings as shown in the image below.
- Now that your model is ready, you can export it. Go to File > Export > gltf2.09.glb/.gltf and select your desired directory. The file size should be significantly reduced since we have removed unnecessary textures.
Other Guides
How to export a GLB with animations from Blender
Once you've fine-tuned the model using either technique described above, all you need to do is tweak the export settings. This will ensure the animations are exported correctly and work smoothly in Arthur.
When you're exporting a model with animation from Blender, please head to the animations tab and make sure to uncheck the Group by NLA Track option. If you skip this step, your animation might not play correctly in the Arthur application.
If the animation is not working or you face any issues, we suggest the following workaround:
- Select all the models that you want to export as FBX format
- Redo the animation in 3DS Max
- Export the model from 3DS Max in FBX Format with animations
- Should the animation continue to not function as expected, we may need to resort to using a plugin like Babylon to export the model with animation
- You can find the guide at this link: Babylon.js Documentation
- Import the model in Blender
- Redo the initial flow as described above