Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Droid803 on July 20, 2012, 01:32:05 am

Title: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Droid803 on July 20, 2012, 01:32:05 am
Yeah okay, I recall there being like 2-3 threads previously on this, but I don't seem to notice that any conclusion was reached other than "don't have seams where mirrored parts meet"... Now, that's just unacceptable because at that point I might as well UV the whole ****ing ship without utilising symmetry, and at that point I'd rather go "**** Normal Maps" and not have them at all, because I'm not exactly going to be assed to go back and re-UVmap and then re-texture a whole bunch of ships...

That, or I couldn't understand any of the jargon that was being thrown around and tehre was a magic solution out there after all. Which is why I ask.

I mean, usually its not bad and barely noticeable  (ie. Optimized Karuna has a bit of it but you barely notice with all the maps on, etc.), but occasionally, you get **** LIKE (http://img.photobucket.com/albums/v423/kc1991/****MIRRORING.jpg) THIS (http://img.photobucket.com/albums/v423/kc1991/****NORMALMAPS.jpg) which is just...atrocious. It seems it's just because that there are "flat" areas over which are mirrored then **** like this happens. If there's a sharp seam it's fine.

I heard that this was a problem because of photoshop-generated normal maps, but I had AndrewofDoom make the Volga's normal maps in GIMP. Same problem... No I do not have higher poly versions from which I can bake a normal map, nor am I going to make one...just not a good use of time.

So, what do I do? Delete the normal maps? Or is there a fix that doesn't require me to re-do the texture (I HATE texturing, and I will NOT be redoing it. If I have to alter the UVs slightly and maybe tweak the AO/Texture slightly so be it, but re-Uving entire seams and re-making the texture? **** that noise. a) It uses too much UV Space and b) It takes too much time and it's not worth it at all, it's easier to just get rid of the normal maps entirely; not like they're absolutely necessary.)


I'm looking for a magic-based solution. Meaning, ideally I will have to do nothing and my problem will go away.

How is the outlook for that? :P



For Posterity, Magic Solution Found.

Unwrap before or after mirroring, then just select all the faces on one side and nudge them 0.1 pixels in the UVspace or whatever (doesn't actually have to be offset at all, just must not be 100% overlapping. You cannot see the difference visually as the same pixels are being mapped onto the same coordinates due to quantization, but the apparently that tricks the shader into thinking the two parts aren't mirrored and everyone is happy. ****Yeah.
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Legate Damar on July 20, 2012, 01:48:14 am
Wait, you mean you're supposed to unwrap a model before applying the mirror modifier?
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Droid803 on July 20, 2012, 01:52:12 am
wat. you don't?
makes uvmapping so much faster and less soul-draining
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Legate Damar on July 20, 2012, 02:02:49 am
I still haven't figured out unwrapping yet. I don't know where I'm supposed to to put the seams or how to tell when I have enough of them.
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Scooby_Doo on July 20, 2012, 03:58:20 am
Here's what I do (this is for max, but something like this should work for blender too)


tl;dr; Basically what you want to do is uvmap just one side, then use sysmmetry modifier to have to do the other side, and finally afterwards just flip and weld/merge the two sides together for easier texturing.

Oh one more thing, if you use the Mirror tool, you MUST do a reset X-form on the mirrored piece otherwise the poly faces get flipped.
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Droid803 on July 20, 2012, 11:50:35 am
I still haven't figured out unwrapping yet. I don't know where I'm supposed to to put the seams or how to tell when I have enough of them.

...

Thank you Legate Damar, for attempting to hijacking my thread. I appreciate it. I'm looking for solutions to a particular problem, if you want to learn how to UV map please take it elsewhere.

Here's what I do (this is for max, but something like this should work for blender too)

  • Create the shape, use symmetry modifier to create the opposite side
  • Temporarily disable symmetry modifier and delete any polys that are removed via the modifier (this'll make sense in a moment)
  • Reactivate modifier
  • Select the mesh or parts of the mesh you want to uvmap and uvmap it
  • If you notice polygons on the uvmap that shouldn't be there, it's could be because of polys that weren't deleted from above (They are destroyed/removed when you apply symmetry modifier but still exist below the modifier stack)
  • Continue to uvmap the rest of the object
  • Use select poly modifier again, but this time AFTER the symmetry modifier
  • Go to the uvmap layout, checkmark "Select Element" to select the entire uvmap segment (this is the fastest way) DO NOT click and drag, rather just click on one piece!
  • Select one of the uvmap sections, then move it up/down or left/right depending on where your symmetry cut is
  • You will notice that you moved that segment, but there's another segment underneath it, one was what you worked on, the other the symmetric side
  • Flip the one you have selected so both pieces would line up correctly
  • Decheck Select Element, because you want to select just some of the vertices
  • Select just the vertex points that would be connected, then use Tools->Stitch Selected
  • If everything worked out right both pieces should be connected

tl;dr; Basically what you want to do is uvmap just one side, then use sysmmetry modifier to have to do the other side, and finally afterwards just flip and weld/merge the two sides together for easier texturing.

Oh one more thing, if you use the Mirror tool, you MUST do a reset X-form on the mirrored piece otherwise the poly faces get flipped.

I'm not sure if this is a response to me or Legate. But that is what I do minus the last few steps (I use max as well). Except that I just cut along my axes of symmetry and then delete everything on one side of it.

So I have to make sure that anything with a symmetry seam on it has both sides on the UVmap. Which is what I don't want to do because I'm using 6-fold symmetry on some things and that would mean using a lot more UVspace than I want to (plus this means I need to re-texture everything)...no.

So I guess I'm getting rid of the normal maps.  :sigh:

Guess I'll keep this in mind the next time I'm UV mapping something (read: Never again)


EDIT:
Just a thought: is it possible, on the normal map, to make the areas which are mirrored "Normal-Neutral" so they don't catch light in a weird way, and just behave like they have no normal map? Or to just put a seam in the normal map down the middle to break up the light warping?
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Legate Damar on July 20, 2012, 12:35:07 pm
Sorry :doubt:

Just commenting on what I read in the thread
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Droid803 on July 20, 2012, 01:30:02 pm
That would be fine if your comment amounted to more than "I don't know how to do this lol."

For reference, previous threads on the topic:
http://www.hard-light.net/forums/index.php?topic=76804.0
http://www.hard-light.net/forums/index.php?topic=70719.0
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Scooby_Doo on July 20, 2012, 03:03:18 pm
Another, kinda messy solution for now is to take the texture (let's say ship1.dds), copy it to ship2.dds (including the shine,glow and normal maps).  Then on the model assign ship2 to the polys on the starboard side.  This should get rid of the messed up normals.
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Scooby_Doo on July 20, 2012, 03:05:51 pm
EDIT:
Just a thought: is it possible, on the normal map, to make the areas which are mirrored "Normal-Neutral" so they don't catch light in a weird way, and just behave like they have no normal map? Or to just put a seam in the normal map down the middle to break up the light warping?

Those normal neutral areas would require a seperate texture that doesn't have a normal-map file.  I ran into this issue with the hanger floors.
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Droid803 on July 20, 2012, 03:59:46 pm
Another, kinda messy solution for now is to take the texture (let's say ship1.dds), copy it to ship2.dds (including the shine,glow and normal maps).  Then on the model assign ship2 to the polys on the starboard side.  This should get rid of the messed up normals.

Doubling up on textures isn't ideal, but I'll give it a try. Thanks!
Obviously not idea for making something new, but as a last-ditch minimal-effort way of fixing existing things this sounds very promising.

EDIT:
Just a thought: is it possible, on the normal map, to make the areas which are mirrored "Normal-Neutral" so they don't catch light in a weird way, and just behave like they have no normal map? Or to just put a seam in the normal map down the middle to break up the light warping?

Those normal neutral areas would require a seperate texture that doesn't have a normal-map file.  I ran into this issue with the hanger floors.
Oh...welp, scratch that idea then. Pretty much no different from the double-up textures thing (ends up using another texture slot anyway). :P
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Col. Fishguts on July 20, 2012, 04:42:16 pm
So I guess I'm getting rid of the normal maps.  :sigh:

No, you just have to make sure that mirrored geometry is not welded together in the UV space along the seam, since this appears to provoke some glitch in the normal shader (like on the rotating section of the new Karuna as you observed)

So for you to do in EDS max:

- Go to "Unwrap UV" editor
- Select half of the offending geometry, and by that I mean exactly on half of the mirrored geometry (it doesn't matter which one)
- Right-click on any of the selected faces in the UV editor -> "Detach Edge Verts"
- Collapse Unwrap UV modifier and re-convert the model

If you do this, the mirrored geometry will share the exact same UV space, but since they are technically not connected in any way, the normal shader doesn't throw a glitch.
I got rid of all offending errors in the normal maps of my models like this
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Droid803 on July 20, 2012, 06:08:43 pm
So I guess I'm getting rid of the normal maps.  :sigh:

No, you just have to make sure that mirrored geometry is not welded together in the UV space along the seam, since this appears to provoke some glitch in the normal shader (like on the rotating section of the new Karuna as you observed)

So for you to do in EDS max:

- Go to "Unwrap UV" editor
- Select half of the offending geometry, and by that I mean exactly on half of the mirrored geometry (it doesn't matter which one)
- Right-click on any of the selected faces in the UV editor -> "Detach Edge Verts"
- Collapse Unwrap UV modifier and re-convert the model

If you do this, the mirrored geometry will share the exact same UV space, but since they are technically not connected in any way, the normal shader doesn't throw a glitch.
I got rid of all offending errors in the normal maps of my models like this

Oh this looks quick and painless. I'll try this then before the other one...
I mean, I de-welded the verts on the mode without it helping, but I didn't try detaching them on the UV (I thought doing it on the model would have done that whoops).



EDIT: No Dice. :(



EDIT2:

Another, kinda messy solution for now is to take the texture (let's say ship1.dds), copy it to ship2.dds (including the shine,glow and normal maps).  Then on the model assign ship2 to the polys on the starboard side.  This should get rid of the messed up normals.

Doubling up on textures isn't ideal, but I'll give it a try. Thanks!
Obviously not idea for making something new, but as a last-ditch minimal-effort way of fixing existing things this sounds very promising.

Didn't work either.

Screw these normal maps. They're gone.
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Nuke on July 21, 2012, 02:35:22 am
there is another option to make things simpler.

dont ****ing mirror ****! in fact dont share uv space at all. sure its a texture space whore but you can always step up the texture size. i think my video memory has quadrupled since last time i drew a huge texture. you can also apply more graffiti, hawt chick on the nose, pilots name on both sides of the canopy, rescue strips, asymmetric dirt, the list goes on. it also opens the door to exotic features, like better lightmaps, really good normal maps, and other as of yet unforeseen features (like scorch maps).
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: mjn.mixael on July 21, 2012, 02:38:15 am
there is another option to make things simpler.

dont ****ing mirror ****! in fact dont share uv space at all. sure its a texture space whore but you can always step up the texture size. i think my video memory has quadrupled since last time i drew a huge texture. you can also apply more graffiti, hawt chick on the nose, pilots name on both sides of the canopy, rescue strips, asymmetric dirt, the list goes on. it also opens the door to exotic features, like better lightmaps, really good normal maps, and other as of yet unforeseen features (like scorch maps).

Quoted for truth.
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: zookeeper on July 21, 2012, 03:27:17 am
As silly as it may sound, I can't but point out that it would be possible, at least to some degree, workaround the mirrored normals issue in shaders. :D For example, add a magic pixel in the texture to tell the shader that this is a mirrored ship, and then have the shader invert the normals on the right side of the ship, or something like that.
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Scooby_Doo on July 21, 2012, 04:29:44 am
there is another option to make things simpler.

dont ****ing mirror ****! in fact dont share uv space at all. sure its a texture space whore but you can always step up the texture size. i think my video memory has quadrupled since last time i drew a huge texture. you can also apply more graffiti, hawt chick on the nose, pilots name on both sides of the canopy, rescue strips, asymmetric dirt, the list goes on. it also opens the door to exotic features, like better lightmaps, really good normal maps, and other as of yet unforeseen features (like scorch maps).

Mirroring/symmetry is ok as long as you do a final uvmap AFTER the modifier.  Oh and if the symmetric sides don't actually connect your all good for sharing uv space.
Edit: Here's an idea I used with my massive wc2 starbase: since I have to use a ton of uvspace overlap, I disconnect each piece from each other.  Now if I left it as is, the results would look rather unflatterning with the smoothing being cut off.  Instead I added raised bevel lines as borders. 

Look at the bottom saucer section
(http://img.photobucket.com/albums/v356/Shodan_AI/starbase3.jpg)
(http://img.photobucket.com/albums/v356/Shodan_AI/starbase4.jpg)
Each one opf those sections is sharing the uv map space, but since none are actually connected the normal map problem shouldn't occur
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Scooby_Doo on July 21, 2012, 04:30:36 am
As silly as it may sound, I can't but point out that it would be possible, at least to some degree, workaround the mirrored normals issue in shaders. :D For example, add a magic pixel in the texture to tell the shader that this is a mirrored ship, and then have the shader invert the normals on the right side of the ship, or something like that.
Don't see that as possible as both sides would get that magic pixel
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: zookeeper on July 21, 2012, 04:40:51 am
As silly as it may sound, I can't but point out that it would be possible, at least to some degree, workaround the mirrored normals issue in shaders. :D For example, add a magic pixel in the texture to tell the shader that this is a mirrored ship, and then have the shader invert the normals on the right side of the ship, or something like that.
Don't see that as possible as both sides would get that magic pixel

Yeah, but I meant that the shader would check the current vertex/pixel coordinate (in the model's frame of reference), and only invert the normal if it's on the right side of the model.
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Col. Fishguts on July 21, 2012, 10:43:11 am
Screw these normal maps. They're gone.

YOUAREDOINGITWRONG

No srsly, you probably made something in the wrong order... post your model/maps if you want us to have a look.
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Oddgrim on July 21, 2012, 10:58:35 am
Screw these normal maps. They're gone.

YOUAREDOINGITWRONG

No srsly, you probably made something in the wrong order... post you model/maps if you want us to have a look.
Agree, let us see what the issue is.. Mirroring is a perfectly legit way of modeling, it makes things loads easier and allows you to increase map detail without adding more maps. (but I guess you know that aleardy c: )
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Droid803 on July 21, 2012, 12:22:29 pm
Screw these normal maps. They're gone.

YOUAREDOINGITWRONG

No srsly, you probably made something in the wrong order... post your model/maps if you want us to have a look.

The two examples I linked in the first post are the ones I'm trying to fix, and they're released models. (The Baikal is in DE, and the AKF Eitr is the Askaeldians thread) so of course...

Eitr http://www.mediafire.com/?7ziy3uysczgll5f
Baikal http://www.mediafire.com/?44l4q04qsm087zl

there is another option to make things simpler.

dont ****ing mirror ****! in fact dont share uv space at all. sure its a texture space whore but you can always step up the texture size. i think my video memory has quadrupled since last time i drew a huge texture. you can also apply more graffiti, hawt chick on the nose, pilots name on both sides of the canopy, rescue strips, asymmetric dirt, the list goes on. it also opens the door to exotic features, like better lightmaps, really good normal maps, and other as of yet unforeseen features (like scorch maps).

That doesn't make anything simpler because that means it takes more time to UV map. Meaning I'm not going to do it. It takes freaking long enough as it is and I'm not exactly made of free time.


Edit: Here's an idea I used with my massive wc2 starbase: since I have to use a ton of uvspace overlap, I disconnect each piece from each other.  Now if I left it as is, the results would look rather unflatterning with the smoothing being cut off.  Instead I added raised bevel lines as borders. 

This is something I'm willing to try.
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Nuke on July 21, 2012, 12:38:51 pm
there is another option to make things simpler.

dont ****ing mirror ****! in fact dont share uv space at all. sure its a texture space whore but you can always step up the texture size. i think my video memory has quadrupled since last time i drew a huge texture. you can also apply more graffiti, hawt chick on the nose, pilots name on both sides of the canopy, rescue strips, asymmetric dirt, the list goes on. it also opens the door to exotic features, like better lightmaps, really good normal maps, and other as of yet unforeseen features (like scorch maps).

Mirroring/symmetry is ok as long as you do a final uvmap AFTER the modifier.  Oh and if the symmetric sides don't actually connect your all good for sharing uv space.
Edit: Here's an idea I used with my massive wc2 starbase: since I have to use a ton of uvspace overlap, I disconnect each piece from each other.  Now if I left it as is, the results would look rather unflatterning with the smoothing being cut off.  Instead I added raised bevel lines as borders. 

Look at the bottom saucer section
-snip-
Each one opf those sections is sharing the uv map space, but since none are actually connected the normal map problem shouldn't occur

the other think i should have mentioned is that if you are generating your normal map from a high poly mesh, it really helps to not share uv space. you can get away with it in some instances. my htl seker does this for its nacelles, which are essentially the same model in the same orientation with no mirroring at all. still to generate the normal map for this section, i had to take the whole thing and separate it from the model, then generate its normal map, and then composite the thing into the normal map generated for the rest of the ship. it was crude but effective.

the as of yet incomplete htl vulture has a similar set up, having 4 identical nacelles in slightly different orientations. it should work, they are symmetrical and dont need to be mirrored and the normals are in tangent space. i may mirror its large wings, cause that is a lot of space being taken up, but the fuselage will not be mirrored, as doing so will take away texturing options as mentioned in my previous post.

there is another option to make things simpler.

dont ****ing mirror ****! in fact dont share uv space at all. sure its a texture space whore but you can always step up the texture size. i think my video memory has quadrupled since last time i drew a huge texture. you can also apply more graffiti, hawt chick on the nose, pilots name on both sides of the canopy, rescue strips, asymmetric dirt, the list goes on. it also opens the door to exotic features, like better lightmaps, really good normal maps, and other as of yet unforeseen features (like scorch maps).

That doesn't make anything simpler because that means it takes more time to UV map. Meaning I'm not going to do it. It takes freaking long enough as it is and I'm not exactly made of free time.

you can really piss away a lot of time looking for shortcuts too. sometimes its better just to do the work, and get fast at it. but the general rule of thumb is the more time you dump on a model the better it will be.
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Scooby_Doo on July 21, 2012, 02:41:05 pm

The two examples I linked in the first post are the ones I'm trying to fix, and they're released models. (The Baikal is in DE, and the AKF Eitr is the Askaeldians thread) so of course...

Eitr http://www.mediafire.com/?7ziy3uysczgll5f
Baikal http://www.mediafire.com/?44l4q04qsm087zl



Oh man, I see what you mean, the Eitr has tons of symmetry, not sure if there's an easy way to fix that.

The cap ship isn't has bad.  The quickest ad-hock method there would be to detach any piece where the two symmetric sides come in contact (the top, front, back and bottom, but not the sides) and remap those.  Since it has sharp unsmoothed edges,  having them be seperate subobjects in max wouldn't be noticeable.  Unfortunately there's still quite a bit to do there too.
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Col. Fishguts on July 21, 2012, 06:42:09 pm
I had a look at the Eitr... and sweet raptor jesus does it use excessive mirroring in UV space  :blah:  The problem is that even most of the flat rectangular pieces are not simply quads, but instead are split in half and then are mirrored unto themselves in UV space. This gives the normal shader a really hard time. I'm not even sure the shader can handle that type of UV mapping in any correct way?

I agree with Scooby, that there's probably no quick-fix for that one, only re-UVing the offending pieces will allow the use of normal maps.
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Nuke on July 21, 2012, 08:17:38 pm
another technique i use is to have dividing geometry between mirrored sections. something thats not mirrored but takes up relatively little space in the uv map. like a fusalage or a keel. just to prevent the mirrored sections from sharing a seam.
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Scooby_Doo on July 21, 2012, 10:26:16 pm
another technique i use is to have dividing geometry between mirrored sections. something thats not mirrored but takes up relatively little space in the uv map. like a fusalage or a keel. just to prevent the mirrored sections from sharing a seam.

Yup, like my starbase...
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: esarai on July 21, 2012, 10:30:42 pm
Your link on the first page is broken, so I'm not sure if this is the same issue, but I get giant normal splices down the midlines of my ships quite a bit.  I haven't fully explored this, but I notice that the hard edge disappears somewhat if the background color is similar to the hull color.  Given this, I believe that if you have a massively different background color from the hull color, the change in the rgb values is enough for it to attempt and render a beveled edge there.  So I suggest expanding the border on the UV faces that share an edge with the mirror axis to prevent the seam from appearing.  Continue the texture over the edge, so that even though it won't be drawn, no apparent change appears to the normal map and it renders it flattened out.  Like I said, not sure if this is the right thing or me missing the point entirely due to a missing image, but worth a shot.
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Droid803 on July 21, 2012, 11:00:53 pm
Your link on the first page is broken...

turn off censoring :P its censoring the URL, but I'll try that!

EDIT: Didn't seem to get rid of it, but it might have lessened it a bit...can't tell for sure.
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Water on July 22, 2012, 12:44:05 am
Have a look at your normal map, the blue version.

Use the eyedropper to check the levels of the plain blue parts. It should be red 127 green 127 and blue 255. Values different from these indicate a slope and may be causing you to chase the wrong thing.
If you could double check, I measured r154 g154 b255, but that was with a reconverted file.
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Droid803 on July 22, 2012, 01:08:03 am
Er...Blue?
I have one that's pinkish and the other is grey...
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Scooby_Doo on July 22, 2012, 02:06:29 am
Have a look at your normal map, the blue version.

Use the eyedropper to check the levels of the plain blue parts. It should be red 127 green 127 and blue 255. Values different from these indicate a slope and may be causing you to chase the wrong thing.
If you could double check, I measured r154 g154 b255, but that was with a reconverted file.

Symmetry issue would still be there.
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Water on July 22, 2012, 03:14:50 am
Er...Blue?
I have one that's pinkish and the other is grey...
Then you have a slight problem.

The normal map was badly made in photoshop.  In the normal texture each of the UV islands has a seam running around it that should not be there. This is mostly what you have a problem with, showing visible seams that are present in the normal map.

Also the base colour is off by 10% telling FS that a surface is sloped when in actual fact it should be treated as flat by the shader. This one is noticeable when you have a mirrored uv's side by side. One face will be lighter and the other darker.

Edit: I only checked the Etir
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Col. Fishguts on July 22, 2012, 06:28:05 am
Water is correct, there's definitely something wrong with your normal map, did you by chance auto-generate it from the diffuse map? If yes, then the black borders around the UV islands are to blame, since they translate to maximum recessed areas.

I made a quick&dirty new normal map (attached) using the diffuse map with a gray background and vastly reduced contrast to get a roughly uniform normal map. Then I re-UVed one of the arms and aligned the pieces exactly with the other 2 arms (but didn't weld the vertices in the UV editor). This results in correct behavior of the normal shader on that arm (see attached screenshot). I tried the same on the cockpit area, but it worked only partially, not sure why.

So, first get your normal map in order, then you can start sorting out the offending parts in the UV editor by remapping them and stacking without welding them together.



[attachment deleted by a ninja]
Title: Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
Post by: Droid803 on July 22, 2012, 01:29:02 pm
Ah, so I just have to re-UV them, but keep them stacked? okay.
Thanks :D

EDIT: WOot it works. The trick is to offset the UVs by a...less than 1 pixel shift, and then suddenly it's fine, even though nothing really changed (wtf?) Got it enough to make it look acceptable
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Droid803 on July 22, 2012, 07:26:38 pm
Alright, this is a double post but just to show that it works, I figure it's worth the bump and update.

For anyone who wants proof it works:

Before:
(http://img.photobucket.com/albums/v423/kc1991/****NORMALMAPS.jpg)

After:
(http://img.photobucket.com/albums/v423/kc1991/fixednormals.jpg)

Thanks :D
Didn't even need to touch the textures for this one.

"De-mirroring" the Eitr went the same way, after using the new normal map. :)
Guess I know how to fix the mirroring thing now, and have a perfect excuse to never do anything.

Apparently nudging the UV island 1/10th of a pixel is enough to trick the shader or something. I don't know if that even makes any sense at all but i'm not complaining.
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Legate Damar on July 22, 2012, 10:30:56 pm
You first picture link isn't working
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: pecenipicek on July 22, 2012, 11:08:08 pm
there's a reason its usually reccomended to have a nice decent space around the uv-map, specifically to avoid this sort of thing, since the UV map's dimensions stay the same, and you cannot map its coordinates 1 to 1 to the texture, since they are in float space (0...1 with however many decimals the format of the model wants)

you can get away with a 1-3 pixel border around the uvmap with diffuse maps and such, not so with normalmaps, especially, the smaller the texture gets.
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: jr2 on July 22, 2012, 11:18:05 pm
Should this get a sticky (is it a common problem)?
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Droid803 on July 23, 2012, 12:00:03 am
You first picture link isn't working
turn off censoring

Should this get a sticky (is it a common problem)?

No. (There are way to many goddamn stickies in this board already)
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Scooby_Doo on July 23, 2012, 01:03:25 am
Wait? Stacking (with a slight shift) uvmap space works?
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Water on July 23, 2012, 01:52:19 am
Wait? Stacking (with a slight shift) uvmap space works?
With a proper normal map stacking works without any shifting.
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Scooby_Doo on July 23, 2012, 03:16:21 am
Please explain, even with symmety?
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Col. Fishguts on July 23, 2012, 05:17:17 am
In my experience the trick is stacking without welding in the UV editor, the slight sub-pixel shifting should not be necessary. But to confirm we'd need a coder in here to clarify how PCS2 handles welded/unwelded UV verts when converting to POF, because I'm actually not sure what happens with that information. I only know that it makes a difference.
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Nuke on July 23, 2012, 02:58:32 pm
ah, crtl+b

i think the general idea is you dont want your seam verts to share a normal. you want each one to have its own normal. of course ive only ever made one normal map and it was a pita, and it didnt even have any seams. so i really dont know how to approach the mirrored geometry meshes that i need to normal map. if i were to make a new model from scratch, id probibly avoid seams like the plague, and even do non-layered uv maps on the smaller meshs.
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Scooby_Doo on July 23, 2012, 03:37:29 pm
Oh I think I've tried that.. no luck.  Best advice is just use seperate uv space for both sides right?
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Water on July 23, 2012, 04:56:22 pm
I my experience the trick is stacking without welding in the UV editor, the slight sub-pixel shifting should not be necessary. But to confirm we'd need a coder in here to clarify how PCS2 handles welded/unwelded UV verts when converting to POF, because I'm actually not sure what happens with that information. I only know that it makes a difference.
I'd have expected it to work better with a separate mesh on each side (mirrored) It seems that FS prefers a continuous mesh. Though If the mesh is flat  it's not so important

Both Photoshop and baked maps behave the same.
(http://i229.photobucket.com/albums/ee67/waternz/other/FS-Normals.jpg)

Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Droid803 on July 23, 2012, 06:29:07 pm
I don't know why but, without touching the normal map:
perfect stacking (nothing welded) results in the funky lighting bar.
Sub pixel-shifted imperfect stacking results in proper lighting (no seam even? maybe because its flat), just a smooth flat surface which catches light as if it weren't mirrored at all and is all a single UV island...
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: pecenipicek on July 23, 2012, 10:22:33 pm
okay, after playing with this for a few hours now, i'm getting very inconsistent results with the seams. i cannot confirm the "magic" solution works, but neither can i deny it.

BUT. The original models both have problems of the UV's being right at the edge of their alloted texture space. you usually leave 2-5 pixels of fiddle room outward from where your UV rests, regardless of the mirroredness of it. moving them inward does not fix it that much, but reduces the visible effect noticeably.


which brings me to the other point. READ THIS! (http://wiki.polycount.com/NormalMap#Mirroring)

The whole page is a gloriously excellent read of many many tips and tricks.
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Nuke on July 24, 2012, 01:37:14 pm
has anyone tried putting both sides of the seam in different smoothgroups? i think i read somewhere that the pof format splits up polygroups based on smoothing boundries, but im not sure if that would make things worse or not. like ive said ive never actually had to deal with a seam so idk.

Oh I think I've tried that.. no luck.  Best advice is just use seperate uv space for both sides right?

thats the surefire way. the thread is full of ways to get around the issue though.

I don't know why but, without touching the normal map:
perfect stacking (nothing welded) results in the funky lighting bar.
Sub pixel-shifted imperfect stacking results in proper lighting (no seam even? maybe because its flat), just a smooth flat surface which catches light as if it weren't mirrored at all and is all a single UV island...

i never weld, i just grab a bunch of verts and scale them down until they are all in the same general location. floating point wonkyness will make sure they are never all in exactly the same place.
Title: Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Post by: Droid803 on July 24, 2012, 01:49:39 pm
i never weld, i just grab a bunch of verts and scale them down until they are all in the same general location. floating point wonkyness will make sure they are never all in exactly the same place.

Without welding results in something like sub-pixel shifts (which is what I noticed when I tried re-mapping parts; that I couldn't get them perfectly stacked no matter what). Which is why I decided to just nudge the perfectly stacked islands a bit to save time so I didn't need to do all the re-scaling. By welding and de-welding it results in perfect stacking, which causes the weird mirrored lighting fault thing. I guess this is why UVmapping after mirroring results in no issues so as long as you don't weld everything together to create perfect stacking again.