Skip to content
  • There are no suggestions because the search field is empty.

3D Model Compression

Requirements

  1. You have Blender installed locally on your computer
  2. You have a .glb file you are looking to reduce in size

 

Expected Outcomes

  1. You will receive a compressed .glb file that will resize all images to a pre-determined pixel size.

 

Resizing the .glb File

  1. Open Blender and import the .glb file you are looking to compress
  2. In the Editor Type button, located on the upper-left hand corner of Blender, select Text Editor. This will open up the Text Editor UI, where you can select "+ New" located in the upper-centre of Blender
  3. In the new text editor, copy and paste the below code. Click the run button to execute this Python script. 
    • You may choose to change the TARGET_SIZE = (1024, 1024) 
    • This code will resize all images in the file to the target size set above

You have now resized all images in the .glb file and can now export the updated .glb file

 

Exporting the Compressed Model

  1. Click File, then Export, then .glb/.gltf
  2. There are some common inclusions to be aware of when exporting the updated file:
    • Limit to: Selected Objects
    • Data: Custom Properties and Punctual Lights
    • Lighting Mode: if you do not require a specific Lighting Mode, then select Raw.
  3. Select the appropriate File Path and File Name, before clicking Export glTF 2.0