Object turning black when applying material

GTA:V Modding with ZModeler3 discussion.
Post Reply
Sirvilmos
Posts: 22
Joined: Sun Feb 13, 2022 2:46 pm

Object turning black when applying material

Post by Sirvilmos »

Hello,

I created an object in Blender and exported as an obj file. After importing into zmod, I apply a mesh material to the object and it turns black in certain spots like there's a shadow. I can't seem to figure out the issue as it doesn't happen every time with every object. I've tried normals, flipping, and applying different materials with different adaptations. When using default material without shaders, it looks normal with the usual gray texture. See attachments for example.

Thank you,
Attachments
Screenshot_11.png
Screenshot_14.png
Screenshot_14.png (38.27 KiB) Viewed 650 times
Screenshot_15.png
User avatar
Oleg
Site Admin
Posts: 14100
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Object turning black when applying material

Post by Oleg »

mesh shader uses bump-mapping texture to adjust surface shading. Bump-mapping requires surface tangents to be computed (evaluated on uv-mapping of triangles). An object coming from .obj file is never equipped with tangents, so either refuse from using mesh shader, or assign proper bump texture and calculate tangents. Surface\Normals\Calculate tool can do this (given that polygons are properly uv-mapped onto texture).
Post Reply