Textures import from CC3 with visible seams #66368

Closed
opened 2019-07-03 12:06:14 +02:00 by Bob Metcalfe · 10 comments

System Information
Operating system: Windows 10
Graphics card: Nvidia 1050 Ti

Blender Version
Broken: blender-2.80.0-git.50ccbe6bb233-windows64
Worked: 2.79

Short description of error
Imported Model from Reallusion CC3 displays texture seams. These carry over to exported models. (works fine in 2.79)

Exact steps for others to reproduce the error
1 > Export an fbx model from Reallusion CC3 with split textures for separate body parts, using the Blender output setting.
2 > import into blender 2.79 and 2.8 with default settings
3 > turn on a textured view (also add a hemi light in 2.79)
4 > look at the back of the head.

Screenshots attached
2.79.JPG
2.8.JPG

**System Information** Operating system: Windows 10 Graphics card: Nvidia 1050 Ti **Blender Version** Broken: blender-2.80.0-git.50ccbe6bb233-windows64 Worked: 2.79 **Short description of error** Imported Model from Reallusion CC3 displays texture seams. These carry over to exported models. (works fine in 2.79) **Exact steps for others to reproduce the error** 1 > Export an fbx model from Reallusion CC3 with split textures for separate body parts, using the Blender output setting. 2 > import into blender 2.79 and 2.8 with default settings 3 > turn on a textured view (also add a hemi light in 2.79) 4 > look at the back of the head. Screenshots attached ![2.79.JPG](https://archive.blender.org/developer/F7563556/2.79.JPG) ![2.8.JPG](https://archive.blender.org/developer/F7563558/2.8.JPG)
Author

Added subscriber: @BobMetcalfe

Added subscriber: @BobMetcalfe
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Mind sharing one of those FBXs (including textures)?

Mind sharing one of those FBXs (including textures)?
Author

Sure Thing...
HiPoly.zip

Sure Thing... [HiPoly.zip](https://archive.blender.org/developer/F7563854/HiPoly.zip)
Philipp Oeser self-assigned this 2019-07-03 14:35:11 +02:00
Member

Seems to be the normalmap coming in as sRGB in 2.8.
If I change this to Non-Color manually, everything seems fine again...

2.8 changed to the principled workflow for FBX, checking code now...

Seems to be the normalmap coming in as sRGB in 2.8. If I change this to Non-Color manually, everything seems fine again... 2.8 changed to the principled workflow for FBX, checking code now...
Member

Added subscriber: @mont29

Added subscriber: @mont29
Member

2.7 used cycles_shader_compat for cycles which did something like
self.node_image_normalmap.image.colorspace_settings.is_data = True

2.8 uses node_shader_utils.PrincipledBSDFWrapper which doesnt really have this in place yet

so we could

  • for each importer [think OBJ and FBX uses this atm]: set the image colorspace_settings there
  • or do this more generic in node_shader_utils.ShaderImageTextureWrapper?

here is a patch to do the first:
P1024: #66368 snippet



diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index d94a237c..4100443b 100644
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@ -3024,6 +3024,7 @@ def load(operator, context, filepath="",
                         texture_mapping_set(fbx_lnk, ma_wrap.roughness_texture)
                     # XXX, applications abuse bump!
                     elif lnk_type in {b'NormalMap', b'Bump', b'3dsMax|maps|texmap_bump'}:
+                        image.colorspace_settings.name = 'Non-Color'
                         ma_wrap.normalmap_texture.image = image
                         texture_mapping_set(fbx_lnk, ma_wrap.normalmap_texture)
                         """
diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index c565bd05..75eb184c 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -172,7 +172,7 @@ def create_materials(filepath, relpath,
             bump_mult = map_options.get(b'-bm')
             bump_mult = float(bump_mult- [x]) if (bump_mult and len(bump_mult- [x]) > 1) else 1.0
             mat_wrap.normalmap_strength_set(bump_mult)
-
+            image.colorspace_settings.name = 'Non-Color'
             _generic_tex_set(mat_wrap.normalmap_texture, image, 'UV', map_offset, map_scale)
 
         elif type == 'D':

@mont29: what do you think?

2.7 used `cycles_shader_compat` for cycles which did something like `self.node_image_normalmap.image.colorspace_settings.is_data = True` 2.8 uses `node_shader_utils.PrincipledBSDFWrapper` which doesnt really have this in place yet so we could - for each importer [think OBJ and FBX uses this atm]: set the image colorspace_settings there - or do this more generic in `node_shader_utils.ShaderImageTextureWrapper`? here is a patch to do the first: [P1024: #66368 snippet](https://archive.blender.org/developer/P1024.txt) ``` diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py index d94a237c..4100443b 100644 --- a/io_scene_fbx/import_fbx.py +++ b/io_scene_fbx/import_fbx.py @@ -3024,6 +3024,7 @@ def load(operator, context, filepath="", texture_mapping_set(fbx_lnk, ma_wrap.roughness_texture) # XXX, applications abuse bump! elif lnk_type in {b'NormalMap', b'Bump', b'3dsMax|maps|texmap_bump'}: + image.colorspace_settings.name = 'Non-Color' ma_wrap.normalmap_texture.image = image texture_mapping_set(fbx_lnk, ma_wrap.normalmap_texture) """ diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py index c565bd05..75eb184c 100644 --- a/io_scene_obj/import_obj.py +++ b/io_scene_obj/import_obj.py @@ -172,7 +172,7 @@ def create_materials(filepath, relpath, bump_mult = map_options.get(b'-bm') bump_mult = float(bump_mult- [x]) if (bump_mult and len(bump_mult- [x]) > 1) else 1.0 mat_wrap.normalmap_strength_set(bump_mult) - + image.colorspace_settings.name = 'Non-Color' _generic_tex_set(mat_wrap.normalmap_texture, image, 'UV', map_offset, map_scale) elif type == 'D': ``` @mont29: what do you think?

@lichtwerk nice catch… Would rather do that in the wrapper itself though, I cannot think of any case where someone would like to apply color correction to some normal map…

@lichtwerk nice catch… Would rather do that in the wrapper itself though, I cannot think of any case where someone would like to apply color correction to some normal map…

This issue was referenced by blender/blender@711960b3c2

This issue was referenced by blender/blender@711960b3c234d02ac11f11a22fd15436bdd489d5
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#66368
No description provided.