I'v been using normal maps for some time, and been always noticing something strange in the look of the models. They looked ok, but something wasn't right in their light reflections. Finally, I've decided to find out, what exactly is going on. And didn't like what I've found. Hope someone will help with it. There is a little illustration of the problem.
Let's create a box
Unwarp UVW's the natural possible way, as a box
And create a high-poly version of the box in purpose to generate a normal map
After some routine manipulations we have a natural looking normal map.
And we expect to see a nice looking box with soften light reflections. But by a strange reason, our expectations proved to be wrong. Some of the sides look pushed, and some - popped.
Ok then, let's flip some faces at UV-space.
Now all sides are popped, but still, this look weired and requires more flipping to make it look all right.
So, the question is: what is the source of this issue? What do I do wrong. And how to make it work right? We can flip sides in this simple case, because sides are orthogonal, but it's not a solution at all, it won't work with anything but a cube.
First of, you need to move your mapping a bit out of sides. Generally it is a good practice to leave a bit of space between the mapping and the mapping boarders.
Now instead of flipping the mapping itself, maybe you should try to flip green of the normal map?
When you bake normal maps you need to ensure that both objects have reset scale (ie. in max 100, 100, 100).
That's at least what I do (besides the flipping green) and it works for me just fine :)
1. Mapping borders isn't the souce of this, map is as precise as possible, pixel to pixel.
2. Flipping isn't a solution. There should be a way to make everything work automatically right without flipping. Because different sizes of the model interpret the map differently. If I flip the map, the wrong sides will become right, but vice versa.
I even approximately understand why is this happening. If a side works right, its opposite side is wrong. Let's say the front side faces light and reflects right. Let's now rotate the model by 180 degrees. The opposite side has faces the light now, and it has the same normal, PLUS rotation angle = 180, so its lightning is interpreted as its kinda flipped.
3. High poly one is jsut a copy-pasted version of the same cube with tassellate and turbo smooth modifiers, don't think scale was changed.
(but I'll try both, ty)
upd: Ok, tried to flip green - no desired result attained.
I have no problems with smoothing groups. The subject of the thread is how to unwarp uvw to have normal maps properly work.
If you look at any zerg model and examine its normal maps, you'll notice that its smoothnes reflections work purely because of the normal map. And they look correctly, becuase of the mapping. So, I want to know, how to uv-map models.
It looks like a smoothing group issue to me. Your low poly box has hard edges, which is conflicting with the normal map which may have been baked on smoothed.
If this is not the issue, then it may simply be due to lack of geometry. If you add a bevel to the low poly cube, it may give the surface enough to work with to get a smooth look.
Keep in mind, Normals are simply a 'trick' that changes the way a surface reacts to light, but it does not change the surface itself. If you have a low poly cube and use a sphere for a normal map, you will end up with an odd looking cube.
Just compare these two images. Angles between the face and camera are equal, angles between the face and light source are equal. Smooth is cleared, not other information interfere, just pure normal. And the difference between images is that one normal is pushed, and another one poped, it's seen by reflected light.
Another example. Drone with smooth groups. And drone with cleared smooth. In the second case we still can see that 1) reflections are still logical andcorrectly represent the angles between model-light and model-camera angles. And 2) normals are still truthful within each triangle.
So, it's not smoothing group. And not geometry, we don't need geometry to show the simple effect of normal.
I would feel grattitude if you would repeat what I've done and show how your simple non-smoothed none-beveled cube look with that kind of normal in sc2.
If I'd remove specular map, there wouldn't be any reflected light visible. But I recreated drone's normal map to make sure that my normal generating method isn't the source of the problem. And it worked well with the drone. So, the problem is most probably related to uvw unwraping.
Maybe you could do the box with normal? Will it work for you?
To make the proble more clear, I did another model, with chamfered edges and with smooth groups. It must be just super smooth with the high poly normal. But it's ruined again.
Normal includes pushed "ХУЙ" word.
Let's inspect the 4 edges of the box. First, we can see that its edges are totally ruined. Also, keep attention to the "ХУЙ". And where the light is reflecting on the letters. And try to estimate, are they pushed or poped. I repeat, if the mapping was right, the normal would dictate the letters to be pushed. The pictures:
I believe the issue is being cause by a combination of how max creates normal maps and how SC2 renders them.
It might be a little tough to explain but I'll try.
there are 3 types of normals: object space, world space, and tangent space.
SC2 uses a bastardized version of a tangent normal map
when 3ds max creates a tangent normal map, it does so based off the height map ( black and white showing depth ) and not so much from the geometry itself, so its really creating 3D bump from a 2D image. This is why it always looks like the "light" is all coming from one direction.
In the SC2 engine it renders the normals similar to if they were object space normals, which is why the boxes look like the light is hitting them from different angles, because technically it is.
most in-game models are mirrored, so you never see conflicting surfaces next to each other.
There is a stand alone program for creating tangent normals from object space that im going to play around with tomorrow, I'll let you know if I have any luck. You can also try Xnormal and see if you get better results http://www.xnormal.net/1.aspx
Fuck, that's it! DIdn't try, but it is the answer! I knew 3 facts:
1. No matter how we do unwrap UVW, it always works wrong.
2. If a side works right, it's opposite side works wrong.
3. I had no problems remaking tangent space normals for sc2 units.
Because they all are motherfucking mirrored! When I unwrap uvw, all my sides use similar looking frames. But sc2 engine made for mirrored models! And it requires opposite sides to have mirrored normals.
Now I will verify this conjecture, but feel no doubts it will work.
Ok, mirroring and intersecting opposing faces didn't help to do what I want, but helped to understand that it's not possible with pure normals. Maybe It's still possible, but I don't see any possibilities for it after last tests.
But I understood that smoothing creates some kind of virtual object that works like a base normal map and controls reflections. Material's normal map is kinda projected to this base normal map and modifies it.
And simple box is too rough to make it look like its edges are smoothed, using only smoothing.
So, for now I'm a bit disappointed about how normals work in sc2, but at least now I know how to use 'em the best possible way -> smoothing + texture related normal maps. And this is kinda sad, becuase, normals could make a simple 12 triangle cube look smoothed, while smoothing can't.
If anyone have something to say about using tangent space normals for making low poly objects look smoother - you welcome.
Thank you for assistance. Your test confirmed what I figured out with my tests. That to make smoothed stuff we need to use additional polygons and smoothing groups, and that it's not possible with just pure normals.
Just one thing. We don't need to invert normal maps for opposite sides to make em look similar, we can let 'em share uv coordinates, just need to mirror (vertical and horizontal) one of the opposite side's map.
I did the following. Selected the polygons at bottom, made vertical and horizontal mirror. And placed em above the upper polygons. Exported, opened in editor -> same look. Becuase double mirror is the same as inverting normal map in this symmetrical case. Box would looks the same as if I mirrored the upper polygons and placed em above the lower ones.
I'v been using normal maps for some time, and been always noticing something strange in the look of the models. They looked ok, but something wasn't right in their light reflections. Finally, I've decided to find out, what exactly is going on. And didn't like what I've found. Hope someone will help with it. There is a little illustration of the problem.
Let's create a box
Unwarp UVW's the natural possible way, as a box
And create a high-poly version of the box in purpose to generate a normal map
After some routine manipulations we have a natural looking normal map.
And we expect to see a nice looking box with soften light reflections. But by a strange reason, our expectations proved to be wrong. Some of the sides look pushed, and some - popped.
Ok then, let's flip some faces at UV-space.
Now all sides are popped, but still, this look weired and requires more flipping to make it look all right.
So, the question is: what is the source of this issue? What do I do wrong. And how to make it work right? We can flip sides in this simple case, because sides are orthogonal, but it's not a solution at all, it won't work with anything but a cube.
First of, you need to move your mapping a bit out of sides. Generally it is a good practice to leave a bit of space between the mapping and the mapping boarders.
Now instead of flipping the mapping itself, maybe you should try to flip green of the normal map?
When you bake normal maps you need to ensure that both objects have reset scale (ie. in max 100, 100, 100).
That's at least what I do (besides the flipping green) and it works for me just fine :)
1. Mapping borders isn't the souce of this, map is as precise as possible, pixel to pixel.
2. Flipping isn't a solution. There should be a way to make everything work automatically right without flipping. Because different sizes of the model interpret the map differently. If I flip the map, the wrong sides will become right, but vice versa.
I even approximately understand why is this happening. If a side works right, its opposite side is wrong. Let's say the front side faces light and reflects right. Let's now rotate the model by 180 degrees. The opposite side has faces the light now, and it has the same normal, PLUS rotation angle = 180, so its lightning is interpreted as its kinda flipped.
3. High poly one is jsut a copy-pasted version of the same cube with tassellate and turbo smooth modifiers, don't think scale was changed.
(but I'll try both, ty)
upd: Ok, tried to flip green - no desired result attained.
You want the rounded edges? It would be better if smooth group use.
@Kailniris2: Go
I have no problems with smoothing groups. The subject of the thread is how to unwarp uvw to have normal maps properly work.
If you look at any zerg model and examine its normal maps, you'll notice that its smoothnes reflections work purely because of the normal map. And they look correctly, becuase of the mapping. So, I want to know, how to uv-map models.
It looks like a smoothing group issue to me. Your low poly box has hard edges, which is conflicting with the normal map which may have been baked on smoothed.
If this is not the issue, then it may simply be due to lack of geometry. If you add a bevel to the low poly cube, it may give the surface enough to work with to get a smooth look.
Keep in mind, Normals are simply a 'trick' that changes the way a surface reacts to light, but it does not change the surface itself. If you have a low poly cube and use a sphere for a normal map, you will end up with an odd looking cube.
@Triceron: Go
Just compare these two images. Angles between the face and camera are equal, angles between the face and light source are equal. Smooth is cleared, not other information interfere, just pure normal. And the difference between images is that one normal is pushed, and another one poped, it's seen by reflected light.
Another example. Drone with smooth groups. And drone with cleared smooth. In the second case we still can see that 1) reflections are still logical andcorrectly represent the angles between model-light and model-camera angles. And 2) normals are still truthful within each triangle.
So, it's not smoothing group. And not geometry, we don't need geometry to show the simple effect of normal.
I would feel grattitude if you would repeat what I've done and show how your simple non-smoothed none-beveled cube look with that kind of normal in sc2.
Just one question: Drone model you've deleted the Specular map? Because it is also available with reflection.
@Kailniris2: Go
If I'd remove specular map, there wouldn't be any reflected light visible. But I recreated drone's normal map to make sure that my normal generating method isn't the source of the problem. And it worked well with the drone. So, the problem is most probably related to uvw unwraping.
Maybe you could do the box with normal? Will it work for you?
I lost the thread. You want to achieve reflection without specular map?
To make the proble more clear, I did another model, with chamfered edges and with smooth groups. It must be just super smooth with the high poly normal. But it's ruined again.
Normal includes pushed "ХУЙ" word.
Let's inspect the 4 edges of the box. First, we can see that its edges are totally ruined. Also, keep attention to the "ХУЙ". And where the light is reflecting on the letters. And try to estimate, are they pushed or poped. I repeat, if the mapping was right, the normal would dictate the letters to be pushed. The pictures:
I'm trying to do a test to find a solution.
I believe the issue is being cause by a combination of how max creates normal maps and how SC2 renders them.
It might be a little tough to explain but I'll try.
there are 3 types of normals: object space, world space, and tangent space.
SC2 uses a bastardized version of a tangent normal map
when 3ds max creates a tangent normal map, it does so based off the height map ( black and white showing depth ) and not so much from the geometry itself, so its really creating 3D bump from a 2D image. This is why it always looks like the "light" is all coming from one direction.
In the SC2 engine it renders the normals similar to if they were object space normals, which is why the boxes look like the light is hitting them from different angles, because technically it is.
most in-game models are mirrored, so you never see conflicting surfaces next to each other.
There is a stand alone program for creating tangent normals from object space that im going to play around with tomorrow, I'll let you know if I have any luck. You can also try Xnormal and see if you get better results http://www.xnormal.net/1.aspx
Heres a link for alot of good info on normals: http://wiki.polycount.com/NormalMap
map should look like the nspace output map in the bottom right corner:
http://wiki.polycount.com/NormalMap?action=AttachFile&do=get&target=max2010_normalmap_compare.png
Formally Kinkycactus
Fuck, that's it! DIdn't try, but it is the answer! I knew 3 facts:
1. No matter how we do unwrap UVW, it always works wrong.
2. If a side works right, it's opposite side works wrong.
3. I had no problems remaking tangent space normals for sc2 units.
Because they all are motherfucking mirrored! When I unwrap uvw, all my sides use similar looking frames. But sc2 engine made for mirrored models! And it requires opposite sides to have mirrored normals.
Now I will verify this conjecture, but feel no doubts it will work.
Ok, mirroring and intersecting opposing faces didn't help to do what I want, but helped to understand that it's not possible with pure normals. Maybe It's still possible, but I don't see any possibilities for it after last tests.
But I understood that smoothing creates some kind of virtual object that works like a base normal map and controls reflections. Material's normal map is kinda projected to this base normal map and modifies it.
And simple box is too rough to make it look like its edges are smoothed, using only smoothing.
So, for now I'm a bit disappointed about how normals work in sc2, but at least now I know how to use 'em the best possible way -> smoothing + texture related normal maps. And this is kinda sad, becuase, normals could make a simple 12 triangle cube look smoothed, while smoothing can't.
If anyone have something to say about using tangent space normals for making low poly objects look smoother - you welcome.
That's not the problem, but maybe it will help.
@Kailniris2: Go
Thank you for assistance. Your test confirmed what I figured out with my tests. That to make smoothed stuff we need to use additional polygons and smoothing groups, and that it's not possible with just pure normals.
Just one thing. We don't need to invert normal maps for opposite sides to make em look similar, we can let 'em share uv coordinates, just need to mirror (vertical and horizontal) one of the opposite side's map.
The UV mirror I did not bring the desired results.
I did the following. Selected the polygons at bottom, made vertical and horizontal mirror. And placed em above the upper polygons. Exported, opened in editor -> same look. Becuase double mirror is the same as inverting normal map in this symmetrical case. Box would looks the same as if I mirrored the upper polygons and placed em above the lower ones.
I have not tried it, but horizontal mirror. However, the text will be mirrored.