I have been having problems with normal maps going a bit crazy at the UV seams.
I'm trying to make some pants that use the normals for the folds in the fabric. I modeled it in Max and unwrapped it, exported an obj that I picked up in ZBrush to make the normal, that I sent back to Max. This is what happens when i apply it.
![Pantsrenderd.jpg](http://dl.dropbox.com/u/51192948/Pantsrenderd.jpg)
I figured it may be a problem with the normal maps so I used that as a diffuse to check that everything lined up. A few things are off but nothing that would cause what is above. I would like to know how to fix the inverted red in some parts though. Like just above and blow the leg belt.
![PantsNormaldif.jpg](http://dl.dropbox.com/u/51192948/PantsNormaldif.jpg)
It looks fine in zbrush
![PantsZBrush.jpg](http://dl.dropbox.com/u/51192948/PantsZBrush.jpg)
And because I'm sure someone will ask for it, here is the normal map with the UV. Forgive my unwrapping skill (or lack of) Still kind of new to it.
![PantsUV.jpg](http://dl.dropbox.com/u/51192948/PantsUV.jpg)
(Can you see the images now?)
Replies
Like yourself I'm a student too and again about the same amount of work experience in 3D so dw were all beginners to start with!
I can't load up the images on my iPhone but I believe - I've had the same problems in zbrush myself that the normal map needs to be flipped - or so my lecturer told me.
Cryrid, Baking it in max sounds like it may work. It has when I was testing it with simple shapes, but wont a several million ploy thing crash it? (can't check right now)
Also you can use xnormal to bake, it can handle the millions of polys thing because it doesn't have to render them out in a viewport. If you import that into 3dsmax it will lag a lot, and if you use Decimation Master to export a less intensive version you'll lose out on your details.
A problem is maxs "up" Z axis. So I assume i need to change the "Swizzle coordinates" in xnormal.
Also, because I eventually plan to take this in to UDK would the altered map be a problem or will it see it how max did?
Edit:
Messed around with xnormal a bit more and got a better normal map with the X and Y flipped so it looks right. But, still got the seam there. Any ideas?
Tangent normals are fine. Mesh faces are seperate. Weld the vertices.
Kurt. I am not yet in the game engine. The visable seams are in Max, although I will check it when i take it into Unreal.
I feel like it is something simple I am doing wrong. I'm going to try the "non-tangent edge UV seam" thing to see if that works.
Then Reset all face normals.
Fix smoothing groups if there is any trouble.
And lastly;
Check the vertexes at the seam area, if they are doubled, weld those.
let me give you an example;
Decided to try a bit with a simple shape before I spent much more time sculpting highpolys. Here was my process.
Made a simple boxy shape in 3DS Max and gave a small champher to the edges.
Unwraped the object so that the seam was around the center, running along flat faces. All one smoothing group.
Exported the object as an OBJ for Zbrush.
Imported the OBJ in Zbrush using the "tools" box.
Subdivided it a few times to ~million ploys.
Used the clay buildup brush and smoothing to add a bit of detail
Saved, and exported that as another OBJ
Used xNormal; "Closest hit if ray fails" and "Discard back-faces hits" checked on. 16 padding 64 bucket size.
Back in 3DS Max, applied the normal map as a normal bump to the bump map and assigned it to the low poly.
Added some lights.
Mental ray render.
Ended up with this. (imported the high poly next to it for refrence)
Found this http://www.andrewklein.net/bh/fix_normalmap_seams.html
It looks like it may solve the problem. Going to try it. Got to get Photoshop on my home computer first though.
From what I can figure out my problem is because of the way normal maps are made, where the normal map colors are relative to the image, not the UVs. So if I have an edge with a UV seam, where in the normal map one side of the seam is facing up and the other side is facing any direction other that the exact opposite (down), then the RGB colors will not mach up. When the normal map is applied to the object is where the seam appears.
Problem is i dont know how to get around this other than "HIDE EVERY SEAM EVER". With some objects i just dont see a way that is possible.
Bit of a strange description, hope you understand it.
Another new problem is that dark "shadow" on the top of the low poly. It may have something to do with the geometry being too low. But I chaferd the edges to avoid that.
The more i'm learning the more I'm starting to think that normal maps are terribly impractical for anything that is not a flat surface.
I have more to add later.
i was going to say make sure you are assigning a normal bump to the bump slot before adding your map, but you already figured that out.
post your test object max file and i'll have a look at it.
How's it look using a realtime shader? Normally game artists don't use Mental Ray for rendering normal mapped meshes (outside of doing texture bakes of course). I know back in older versions (might still not be fixed) Mental Ray couldn't handle normal maps properly - http://forums.cgsociety.org/showthread.php?t=519721
If using a proper realtime shader doesn't fix it, could you post your test mesh and the normal map? In Max format would be best so we can just look at which setting you've got wrong.
Hope I did this right. Here is the test project file (with the high poly)
http://dl.dropbox.com/u/51192948/NormalTestAlidium.zip
It may be a bit big, so here is one with just the Max file and Normal map.
http://dl.dropbox.com/u/51192948/NormalTestAlidiumTwo.zip
Thanks for the help agian.
Also why do you use xnormal to bake maps? I know that zbrush can do it.
Won't object space cause problmes if the object moves?
How would I have incorrectly set my uvw space up? I unwrapped it, then I made the normal map on to the unwrapped object. It should line up almost perfectly.
oh... or did you mean in the material editor. I made sure to plug a "normal bump" box into the bump map, and then plug my normal map.tif into the "normal" box in the "normal bump".
You may have set it correct, also try channel directions as a last advice.
Other than that, i dont have any ideas about what could be the problem.
i opened your file--your red and green channels are swapped, and both red green are flipped. in the "normal bump" slot check off all the "channel direction" checkboxes and render, it should look fine. you should change your swizzle settings in your baker from now on so you don't need to do this, though.
jeez, people around here really over-complicate their solutions.
regarding what makes the best looking normal maps; really you should be baking with whatever has math that matches your renderer the closest. for example, max in max, maya in maya etc. check this out if you want to know more: http://wiki.polycount.com/NormalMap#Tangent_Basis
also don't use TIF files for your maps, use TGA like everyone else.
Next time you're making your highpoly make sure that you don't use the move tool to move it around - just rotate and pan the camera around it.
Grab a good realtime shader and use it, if you don't know how to do it then watch this.
http://www.polycount.com/forum/showthread.php?t=81154&highlight=brink
If i understand this correctly (and i probably dont) from the link racer posted Then this should "fix" itself when in a normal map because the way it works with UVs or something?
Also went and got that shader, installed it and applied it to my object and got this, crashing max soon after.
I would update my drivers except that will cause my computer to be unable to run more than 10 minuets at a time, but that is another story.
Kurt, Do the normals have viable seams when you apply them as a diffuse map? it looks like you got rid of them just by using the shader, but i cant do that right now.
this doesn't matter. normal maps are a purely mathematical calculation, and what might look funny on the maps may look perfectly fine when displayed on the model.
here's your existing mesh and flipped/swapped bake displaying with no seam in both max scanline and standard DX viewport. keep in mind it looks fairly messed because when you baked it, the mesh was offset a bit as mentioned earlier.
gamma/LUT correction was on inside the file, so i turned that off. i moved your high poly over then i just created a routine baking setup in max using your meshes, and everything went smoothly. here's my file, you can just plug in the map and have a look, or select the low poly, unhide all, and bake a new normal map.
feel free to export to xnormal if you want as well. MAKE SURE you export the projection cage as well to make sure it uses an averaged cage, not split.
http://dl.dropbox.com/u/1725586/crits/goo1.rar
And...
No seams!
But not so fast!
When I attempt to use Max to make a normal map in the render to texture i get this abomination.
I'm going to mess around in the render to texture in Max a bit more. I know that have had it work before. Although insight you may have on why that happened would be nice.
When I rendered the normal map in the Max file you gave me racer it worked great. Just stuck it on the object and it worked. Also how did you get the normal maps to appear in the view port?
So I think the main part of the problem was the lut/gama. Turning that back on brings back those seams. But back when I was working on the pants I had the lut/gama off at one point and there was a slight seam there.
So progress yay!
The last one seems like a cage/raycasting problem to me.
otherwise you have some overlapping uvws.