0

I'm seeing an issue with a wood texture I have been using successfully until I started splitting subdividing my object using Python with:

# Subdivide each face into four parts
bmesh.ops.subdivide_edges(bm, edges=bm.edges, cuts=1, use_grid_fill=True , use_only_quads=True)

update mesh

bmesh.update_edit_mesh(mesh)

recalculate normals

bmesh.ops.recalc_face_normals(bm, faces=bm.faces)

This may not be a Python specific issue, if I can better understand why the shading and pattern changes for some objects I can probably figure out the Python fix. This wood texture is imported and applied to each face based on the face normal using Python.

Here is an example of the texture issue:

enter image description here enter image description here

but this issue does not appear for other similar parts using the eaxct same methods and textures, for example: enter image description here enter image description here

I can also se it on other parts like:

enter image description here enter image description here

The shader to texture used can be seen below: enter image description here

This community has been extremely helpful, please else me know if anything is unclear or if more information is required :)

Update 1:

@Gorgious here is a screenshot of the normals as requested, they seem correct. I figure if we could solve the shading issue on a simple example like this is might be helpful and the associated .blend file was uploaded @Harry McKenzie:

enter image description here

buildxyz
  • 15
  • 5
  • can you share the blend file https://blend-exchange.com – Harry McKenzie Aug 06 '23 at 04:31
  • This looks like a normal problem, also you have a N-Gon there in the lower right which are infamous for providing weird shading when the face are not completley planar. Could you add a screenshot with the "Face Orientation" overlay on ? https://i.stack.imgur.com/l5OaB.png – Gorgious Aug 07 '23 at 08:30
  • thanks for your help with this! please see Update 1 above – buildxyz Aug 09 '23 at 03:39
  • @buildxyz i can't see any blend file. you probably forgot to embed it in your post. there is a generated code for the blend file you have to embed here. try this solution. – Harry McKenzie Aug 09 '23 at 15:43
  • ah yes, I thought uploading the .blend would magically updated this post, I have updated the update to link the .blend file now. As for the solution you reference, I'm not sure if that is my exact issue. – buildxyz Aug 09 '23 at 16:23

1 Answers1

1

The issue is you shader's normal map texture is set to sRGB color space instead of non-color:

enter image description here

Any texture that isn't used for color (base color, albedo, diffuse, etc) should be set to non-color to be interpreted correctly.

L0Lock
  • 15,965
  • 1
  • 20
  • 44
  • THANK YOU! That completely resolved all the texture issues I was having! You are so helpful its ridiculous and I need to give you money or buy you 10 coffees. I wouldn't have figured that out anytime soon otherwise. – buildxyz Aug 09 '23 at 23:46