Problem with normal maps for cars

Started by
5 comments, last by Viik 16 years, 11 months ago
Hello community! Now we are making a cars for our project. We get normal map from high poly model using 3D Max tools, simple render to texture as in Max's tutorials. For checking quality of normal map we use standart DX9 normal map material that provided with 3D Max. And than we use it in engine. But now we have a serious bug. This is how it looks: http://i6.photobucket.com/albums/y245/ViiKzzz/NormalMapGlossBug.jpg http://i6.photobucket.com/albums/y245/ViiKzzz/Noise_problem2.jpg http://i6.photobucket.com/albums/y245/ViiKzzz/Noise_problem.jpg Rendering into different formats (TGA, DDS 8R8G8B) just changes a type of bug - strong noise (second and third screenshots) or curves (first screenshot). Bug can be seen only with reflection or specular. We use local normal map. With tangent normal map we had a problem that a low poly mesh normals was blended into tangent normal map. Visualy it looks like you calculate shading per vertex and than just add a perpixel shading to interpolated pervertex color. Maybe we are missing something important in normal map rendering workflow. Any ideas?
Advertisement
Somethings wacky with the way you're sampling your normal map's texture. Looks like you're point-sampling it rather than doing some kind of interpolation when a lookup falls between pixels.
I don't know much about normal mapping, but it looks like your texture sampler isn't filtering the normal map. It could be something as simple as setting the sampler state from point to linear. Show us the shader code.

Admiral
Ring3 Circus - Diary of a programmer, journal of a hacker.
Do you render the car in multiple passes? If so, it might be a problem of invariance between passes w/ and w/o vertex shader. You should use an invariant option in your vertex shader or render everything with vertex shaders.
Nice Audi TT.
Make sure you disable texture compression if it's enabled. It results in very low quality and lots of artifacts when the normal map is compressed.
Thank you for your help!
Sorry for late reply. Yesterday we found solution and want to share info about it.
Sampling was linear and compression was not used. This was the first things that we checked. Problem was in shader. I simply copy/pasted almost all code from another shader that we was using for bricks, simple normal map shader. In this shader i was using linear interpolation between normal of the polygon and normal map, to control the amount of normal map effect. This work fine for bricks but not for car. Espesialy in case when you use local space normal map. Stupid me, i forgot about this part of the code. Now normals just summed and normalized, bag is still visible but not as much as before, you will not notice it at all if you not knew about it.

This topic is closed to new replies.

Advertisement