Sign in to follow this  
Viik

Problem with normal maps for cars

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this