Author Topic: Mirrored UV + normal map = lighting seams  (Read 4680 times)

0 Members and 1 Guest are viewing this topic.

Offline Nx

  • 26
Mirrored UV + normal map = lighting seams
see screenshot:



is this an engine issue or an issue with the mapping? I can't see it on the Aeolus, which has a similar mirrored UV map.

A model I'm making has this issue too, but only in FSO, not in Blender (using GLSL shaders in Blender's 3d view).
WikiModel dumpGTVA logo

"Don't try to be a great man; just be a man, and let history make its own judgments." -- Zefram Cochrane

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: Mirrored UV + normal map = lighting seams
ugh... can you post proper screens? i cant see **** on this one.


also, just in case, please make damn sure you made the normalmaps correctly.

[edit] on further inspection, both the normal maps and the uv seem to be a bit.. borked.


also, which other textures are there on the model at this very moment?
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline Nx

  • 26
Re: Mirrored UV + normal map = lighting seams
ugh... can you post proper screens? i cant see **** on this one.


also, just in case, please make damn sure you made the normalmaps correctly.

Click it to view a larger version.

I didn't make the normalmap. It's the MVP Iceni. Vasudan Admiral did the mapping, ha probably made the normalmap too.


[edit] on further inspection, both the normal maps and the uv seem to be a bit.. borked.


also, which other textures are there on the model at this very moment?

Just the normal map, no other textures. You can see try it yourself, it's the MVP Iceni, just rotate it around a bit, the seam is fairly obvious, but disable specular map to make it even more visible.
WikiModel dumpGTVA logo

"Don't try to be a great man; just be a man, and let history make its own judgments." -- Zefram Cochrane

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: Mirrored UV + normal map = lighting seams
sorry, misread then.

possibly a broken shader somewhere... check that you have the latest of whats needed...
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline Nx

  • 26
Re: Mirrored UV + normal map = lighting seams
sorry, misread then.

possibly a broken shader somewhere... check that you have the latest of whats needed...

Tried it with 3.6.10 and 3.6.12 RC1 on Linux, both are the same. Can you reproduce it?
WikiModel dumpGTVA logo

"Don't try to be a great man; just be a man, and let history make its own judgments." -- Zefram Cochrane

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: Mirrored UV + normal map = lighting seams
sorry, misread then.

possibly a broken shader somewhere... check that you have the latest of whats needed...

Tried it with 3.6.10 and 3.6.12 RC1 on Linux, both are the same. Can you reproduce it?
Yup, but not sure what seems to be causing it...

(using 3.6.10 media vp's, MV_Core, MV_Assets, MV_Music, MV_Effects, MV_Advanced, nothing after the "official" release of 3.6.10's...)
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Mirrored UV + normal map = lighting seams
What are you using to make the normal maps?  Newman had a similar issue and it turned out to be the way the normal map itself was being saved by the NVidia PSD plugin. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Re: Mirrored UV + normal map = lighting seams
I think it's more related to the method used by the shaders to invert the normals on the mirrored side of the ship. I don't know the shader code, but apparently the longitudinal specular highlights are a byproduct of the same mechanism that allows using mirrored UV maps on the models.
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 
Re: Mirrored UV + normal map = lighting seams
Yup I've had that happen a lot.

The only way I know how to fix this is a.) uvunwrap both sides seperately (they cannot share the same uvmap) or b.) in Max, detach the port side from the starboard side then reattach but do not combine vertices.  (or do a bit of both)
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: Mirrored UV + normal map = lighting seams
FUBAR, i thought that that was it too, turned out it wasnt :P
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

  

Offline Nx

  • 26
Re: Mirrored UV + normal map = lighting seams
What are you using to make the normal maps?  Newman had a similar issue and it turned out to be the way the normal map itself was being saved by the NVidia PSD plugin.  

Normalmap plugin for Gimp, following the instructions in the Gimp thread. I let the dds plugin handle the conversion (by saving to DXT5n), but now I tried converting manually (decompose, copy red to alpha, fill red & blue with black, save as png), and it's still the same.

I think it's more related to the method used by the shaders to invert the normals on the mirrored side of the ship. I don't know the shader code, but apparently the longitudinal specular highlights are a byproduct of the same mechanism that allows using mirrored UV maps on the models.

Yeah, but blender doesn't do this (I'm talking about the 3d view which uses glsl shaders, not rendering), and more importantly, not all ships in FSO seem to be affected. The Aeolus, the Leviathan/Fenris, the Poseidon and the Triton are fine, but the Aten, the Sobek, the Deimos the Iceni, and the Faustus are all showing the seam.

Yup I've had that happen a lot.

The only way I know how to fix this is a.) uvunwrap both sides seperately (they cannot share the same uvmap) or b.) in Max, detach the port side from the starboard side then reattach but do not combine vertices.  (or do a bit of both)

Thanks for the suggestion, but I'd rather not do either. Unfortunately, b) doesn't get rid of the problem entirely and it creates an ugly seam. I tried disabling smoothing and merging all vertices, and it still shows up on some flat faces. I'm thinking of unmirroring only the flat surface on the top and bottom where the seam is, i.e. moving the UV seam from the middle a little bit to the right where there's a hard edge on the model, while keeping the disconnected parts sharing uvs. I might be able to get away with that without having to redraw the texture entirely, but I fear this will only move the lighting seam.

Edit: I remapped my model since the uv was crappy anyway, and this time I didn't split the large flat surfaces in the middle. After mapping one half I applied the mirror modifier then manually mirrored the UVs for one half of the surfaces in the middle and attached it to the other half, so most of the islands are still shared between the two halves. That solved the problem.
« Last Edit: March 15, 2010, 02:11:57 pm by Nx »
WikiModel dumpGTVA logo

"Don't try to be a great man; just be a man, and let history make its own judgments." -- Zefram Cochrane