2
$\begingroup$

I am having a weir issues when trying to export an object to a game, causing the UVs to be partially inverted. In blender the normals look fine, however in game only part of the normals appear properly (see attached images, top shows expected from blender, bottom shows actual result from game).

I have made sure all transforms are applied, tried Apply Transform and multiple combinations of export settings, however I can not figure out which setting to change to fix this. I know it is possible to fix this in the export settings, because I have got it working multiple times in the past. Unfortunately, those times appear to be flukes because I can't get it working again.

Could anyone tell me which transform/setting in the obj/fbx exporter this issue is related to? I'd really like to understand why this is happening.

Expected result from blender Actual result from the game

Edit: I've added a picture showing the normal direction. I was also planning on adding the .blend file via blend-exchange, however I cannot actually post it because I do not have the rights necessary to distribute it as required by blend-exchange. This makes the problem even weirder because this model was ported directly from the game, had its UV-layout slightly modified (1 island with flat normal map moved a tiny bit), and then had this issue when exporting.

I've also added a drawing to clarify how the bevels appears to look vs how they should look from a sliced perspective (bottom picture, left how it appears, right how it should appear).

Normal direction enter image description here

Edit: I've now included the model without shading (top) and my normal map (repeated) with UV-islands overlaid (bottom). The normal map has a size of 512x512 and is the same as used in the game. Note that the square on the top left of the UVs is separated onto a different texture and is irrelevant to this question (because I don't see any wrong normals on it in game).

I also wanted to clarify that this model has been imported from the game's data, has been modified (the island in the top left was shrunk to accommodate for more icons), and was then exported successfully on one occasion, which I can not reproduce.

Flat shaded model and mesh UV-islands and map

$\endgroup$
8
  • $\begingroup$ please share your .blend file using blend-exchange.com $\endgroup$ Jun 13, 2022 at 22:44
  • $\begingroup$ Does this answer your question? How do I fix these normal map edges? $\endgroup$ Jun 13, 2022 at 23:33
  • $\begingroup$ As you might see, the normal data on the top face is actually fine. Same goes for the normal data on some the vertical edges. The only parts which are wrong are the which are actually wrong are the top and bottom edges of vertical faces. It's as if the normal space is inverted in that direction. $\endgroup$
    – BlueFlame
    Jun 14, 2022 at 6:12
  • $\begingroup$ That's a good edit, but can you show your UV map, your normal texture, and tell us what is the resolution of your normal texture? $\endgroup$ Jun 14, 2022 at 8:38
  • $\begingroup$ I retracted my close vote because after the edit we can see the edges differ - those without an issue aren't beveled. What if you beveled the top faces after baking? It would be helpful if you also posted the low poly cube without orientation shading, to better see all the bevels. I think this problems comes down to modifying a mesh without rebaking the normals... $\endgroup$ Jun 14, 2022 at 8:44

1 Answer 1

0
$\begingroup$

The solution to this problem is exporting the tangent space vectors when exporting to fbx. When exporting to fbx this option can be found under Geometry > Tangent Space.

Geometry > Tangent Space

From what I read on this forum, tangent space vectors are not supported in obj files. You just have to switch to a file format that does.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .