Repository: khronosgroup/gltf-blender-io
Issue: Export crash when specular = 0 and IOR = 1

**Describe the bug**
When exporting a file with a model using a principled BSDF material that has a specular value of 0.0 and an IOR of 1.0 a ZeroDivisionError occurs and the export fails.

The stack trace:
```
Traceback (most recent call last):
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\__init__.py", line 648, in execute
    return gltf2_blender_export.save(context, export_settings)
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\blender\\exp\\gltf2_blender_export.py", line 35, in save
    json, buffer = __export(export_settings)
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\blender\\exp\\gltf2_blender_export.py", line 52, in __export
    __gather_gltf(exporter, export_settings)
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\blender\\exp\\gltf2_blender_export.py", line 66, in __gather_gltf
    active_scene_idx, scenes, animations = gltf2_blender_gather.gather_gltf2(export_settings)
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\blender\\exp\\gltf2_blender_gather.py", line 30, in gather_gltf2
    scenes.append(__gather_scene(blender_scene, export_settings))
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\blender\\exp\\gltf2_blender_gather_cache.py", line 38, in wrapper_cached
    result = func(*args, **kwargs)
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\blender\\exp\\gltf2_blender_gather.py", line 69, in __gather_scene
    node = gltf2_blender_gather_nodes.gather_node(
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\blender\\exp\\gltf2_blender_gather_nodes.py", line 35, in gather_node
    mesh=__gather_mesh(vnode, blender_object, export_settings),
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\blender\\exp\\gltf2_blender_gather_nodes.py", line 246, in __gather_mesh
    result = gltf2_blender_gather_mesh.gather_mesh(blender_mesh,
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\blender\\exp\\gltf2_blender_gather_cache.py", line 38, in wrapper_cached
    result = func(*args, **kwargs)
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\blender\\exp\\gltf2_blender_gather_mesh.py", line 61, in gather_mesh
    primitives=__gather_primitives(blender_mesh, uuid_for_skined_data, vertex_groups, modifiers, materials, export_settings),
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\blender\\exp\\gltf2_blender_gather_mesh.py", line 147, in __gather_primitives
    return gltf2_blender_gather_primitives.gather_primitives(blender_mesh,
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\blender\\exp\\gltf2_blender_gather_cache.py", line 38, in wrapper_cached
    result = func(*args, **kwargs)
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\blender\\exp\\gltf2_blender_gather_primitives.py", line 83, in gather_primitives
    material = gltf2_blender_gather_materials.gather_material(
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\blender\\exp\\gltf2_blender_gather_cache.py", line 38, in wrapper_cached
    result = func(*args, **kwargs)
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\blender\\exp\\gltf2_blender_gather_materials.py", line 57, in gather_material
    extensions, uvmap_actives_extensions = __gather_extensions(blender_material, emissive_factor, export_settings)
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\blender\\exp\\gltf2_blender_gather_materials.py", line 250, in __gather_extensions
    specular_extension, use_actives_uvmap_specular = export_specular(blender_material, export_settings)
  File "E:\\Program Files\\Blender Foundation\\blender-3.3.1-windows-x64\\3.3\\scripts\\addons\\io_scene_gltf2\\blender\\exp\\gltf2_blender_gather_materials_specular.py", line 124, in export_specular
    specular_color = (1 - transmission) * (1 / f0_from_ior) * 0.08 * specular * tint_strength + transmission * tint_strength
ZeroDivisionError: float division by zero
```

**To Reproduce**
Create a file with a model using a principled BSDF material that has a specular value of 0.0 and an IOR of 1.0 and try to export the file.

**Expected behavior**
The scene successfully exports

**Screenshots**
If applicable, add screenshots to help explain your problem.

**.blend file**
Very simple to reproduce but here is one anyway:
[export_crash_bug.zip](https://github.com/KhronosGroup/glTF-Blender-IO/files/9718761/export_crash_bug.zip)



**Version**
Blender 3.3.1 on Windows


Changed files:
addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_materials_specular.py

diff --git a/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_materials_specular.py b/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_materials_specular.py
index 96ea9041..5cbb3559 100644
--- a/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_materials_specular.py
+++ b/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_materials_specular.py
@@ -131,9 +131,13 @@ def export_specular(blender_material, export_settings):
                 return np.array([c[0] / l, c[1] / l, c[2] / l])            
 
             f0_from_ior = ((ior - 1)/(ior + 1))**2
-            tint_strength = (1 - specular_tint) + normalize(base_color) * specular_tint
-            specular_color = (1 - transmission) * (1 / f0_from_ior) * 0.08 * specular * tint_strength + transmission * tint_strength
-            specular_extension['specularColorFactor'] = list(specular_color)
+            if f0_from_ior == 0:
+                specular_color = [1.0, 1.0, 1.0]
+            else:
+                tint_strength = (1 - specular_tint) + normalize(base_color) * specular_tint
+                specular_color = (1 - transmission) * (1 / f0_from_ior) * 0.08 * specular * tint_strength + transmission * tint_strength
+                specular_color = list(specular_color)
+            specular_extension['specularColorFactor'] = specular_color
     else:
         if specular_not_linked and specular == BLENDER_SPECULAR and specular_tint_not_linked and specular_tint == BLENDER_SPECULAR_TINT:
             return None, None