Author Topic: Of Mirroring and Normal Maps. Any Magic Solutions?  (Read 16305 times)

0 Members and 1 Guest are viewing this topic.

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Of Mirroring and Normal Maps. Any Magic Solutions?
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 THIS 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.
« Last Edit: July 22, 2012, 06:17:22 pm by Droid803 »
(´・ω・`)
=============================================================

 

Offline Legate Damar

  • Keeping up with the Cardassians
  • 29
  • Hail Cardassia!
Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Wait, you mean you're supposed to unwrap a model before applying the mirror modifier?

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Of Mirroring and Normal Maps. Any Magic Solutions?
wat. you don't?
makes uvmapping so much faster and less soul-draining
(´・ω・`)
=============================================================

 

Offline Legate Damar

  • Keeping up with the Cardassians
  • 29
  • Hail Cardassia!
Re: Of Mirroring and Normal Maps. Any Magic Solutions?
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.

  
Re: Of Mirroring and Normal Maps. Any Magic Solutions?
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.
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 Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Of Mirroring and Normal Maps. Any Magic Solutions?
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?
« Last Edit: July 20, 2012, 11:57:29 am by Droid803 »
(´・ω・`)
=============================================================

 

Offline Legate Damar

  • Keeping up with the Cardassians
  • 29
  • Hail Cardassia!
Re: Of Mirroring and Normal Maps. Any Magic Solutions?
Sorry :doubt:

Just commenting on what I read in the thread

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Of Mirroring and Normal Maps. Any Magic Solutions?
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
(´・ω・`)
=============================================================

 
Re: Of Mirroring and Normal Maps. Any Magic Solutions?
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.
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!"

 
Re: Of Mirroring and Normal Maps. Any Magic Solutions?
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.
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 Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Of Mirroring and Normal Maps. Any Magic Solutions?
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
(´・ω・`)
=============================================================

 

Offline Col. Fishguts

  • voodoo doll
  • 211
Re: Of Mirroring and Normal Maps. Any Magic Solutions?
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
"I don't think that people accept the fact that life doesn't make sense. I think it makes people terribly uncomfortable. It seems like religion and myth were invented against that, trying to make sense out of it." - D. Lynch

Visit The Babylon Project, now also with HTL flavour  ¦ GTB Rhea

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Of Mirroring and Normal Maps. Any Magic Solutions?
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.
« Last Edit: July 20, 2012, 11:01:59 pm by Droid803 »
(´・ω・`)
=============================================================

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
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).
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
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.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
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.

 
Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
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


Each one opf those sections is sharing the uv map space, but since none are actually connected the normal map problem shouldn't occur
« Last Edit: July 21, 2012, 04:36:44 am by Scooby_Doo »
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!"

 
Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
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
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 zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
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.

 

Offline Col. Fishguts

  • voodoo doll
  • 211
Re: NORMAL MAPS SUCK (between mirroring and normals i choose mirroring)
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.
« Last Edit: July 21, 2012, 11:01:17 am by Col. Fishguts »
"I don't think that people accept the fact that life doesn't make sense. I think it makes people terribly uncomfortable. It seems like religion and myth were invented against that, trying to make sense out of it." - D. Lynch

Visit The Babylon Project, now also with HTL flavour  ¦ GTB Rhea