diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py index 5211b845908d4854b16271cc9e722bdc5fe357d4..a381d83b9c3393677c7b03317315201791218e47 100644 --- a/io_scene_fbx/__init__.py +++ b/io_scene_fbx/__init__.py @@ -21,7 +21,7 @@ bl_info = { "name": "FBX format", "author": "Campbell Barton, Bastien Montagne, Jens Restemeier", - "version": (4, 20, 1), + "version": (4, 20, 2), "blender": (2, 81, 6), "location": "File > Import-Export", "description": "FBX IO meshes, UV's, vertex colors, materials, textures, cameras, lamps and actions", diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py index 970fc72192b63f1909cb2361625b48cc44fb01f3..1c43180dbe1faed6c7475316a57df59e40602db1 100644 --- a/io_scene_fbx/export_fbx_bin.py +++ b/io_scene_fbx/export_fbx_bin.py @@ -1328,10 +1328,10 @@ def fbx_data_material_elements(root, ma, scene_data): elem_props_template_set(tmpl, props, "p_number", b"TransparencyFactor", 1.0 - ma_wrap.alpha) elem_props_template_set(tmpl, props, "p_number", b"Opacity", ma_wrap.alpha) elem_props_template_set(tmpl, props, "p_vector_3d", b"NormalMap", (0.0, 0.0, 0.0)) + elem_props_template_set(tmpl, props, "p_double", b"BumpFactor", ma_wrap.normalmap_strength) # Not sure about those... """ b"Bump": ((0.0, 0.0, 0.0), "p_vector_3d"), - b"BumpFactor": (1.0, "p_double"), b"DisplacementColor": ((0.0, 0.0, 0.0), "p_color_rgb"), b"DisplacementFactor": (0.0, "p_double"), """ diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py index 93b01b9f2b0de0faa6745352b359fafd94e2aa2a..751a2b1771cf9e49e683bd8923fd1fd997a2edda 100644 --- a/io_scene_fbx/import_fbx.py +++ b/io_scene_fbx/import_fbx.py @@ -1425,8 +1425,7 @@ def blen_read_material(fbx_tmpl, fbx_obj, settings): ma_wrap.metallic = elem_props_get_number(fbx_props, b'ReflectionFactor', 0.0) # We have no metallic (a.k.a. reflection) color... # elem_props_get_color_rgb(fbx_props, b'ReflectionColor', const_color_white) - # (x / 7.142) is only a guess, cycles usable range is (0.0 -> 0.5) - ma_wrap.normalmap_strength = elem_props_get_number(fbx_props, b'BumpFactor', 2.5) / 7.142 + ma_wrap.normalmap_strength = elem_props_get_number(fbx_props, b'BumpFactor', 1.0) # For emission color we can take into account the factor, but only for default values, not in case of texture. emission_factor = elem_props_get_number(fbx_props, b'EmissiveFactor', 1.0) ma_wrap.emission_color = [c * emission_factor