Markemp / Cryengine-Converter

A c# program to convert Crytek files to Collada (XML) format
https://www.heffaypresents.com/GitHub/
GNU General Public License v2.0
208 stars 53 forks source link

Normals ( or Smoothing groups? ) didnt correct. #136

Closed mortany closed 1 year ago

mortany commented 1 year ago

Describe the bug Exported smoothing dont original, because normal map dont aplly correctly with this smoothing. I tried .dae and .obj and got same wrong result.

Game: Sniper Ghost Warrior Contracts 2 Model: objects.pak\objects\weapons\ksg_pc33\ksg_pc33_fp.chr

image

mortany commented 1 year ago

Ah, its mistake, its fixed after swap X and Y channels in normal map.

Markemp commented 1 year ago

Quick question before closing this officially: Did you have to manually swap that out, change the game file's normal map, or something else? I want to make sure that the mapping isn't wrong in the code even if there was a manual fix.

mortany commented 1 year ago

Did you have to manually swap that out

Yep, texture has DXGI_FORMAT_BC5_SNORM format and after save it into tga i swapped red and green channels and smoothing after apply normal map looks absolutely correct like as ingame. Normal vectors looks correct in my opinion.

mortany commented 1 year ago

image