Page MenuHome

Problems with GLSL and Renderer Tangent Basis not matching?
Closed, ArchivedPublicTO DO

Description

Hey all,

I have been reading a large thread on polycount where a user was complaining that the tangent basis of the viewport shader in max does not match the one used in the renderer. (Autodesk have acknowledged publicly on polycount that this is a problem and are looking into it)

I decided to do some tests in Blender and it seems that we have the same problem (or at least similar)

The viewport shader in Blender shows smoothing errors, but the same errors are much worse within the renderer itself, so as far as i can tell it means the the tangent basis of Blender internal renderer and the GLSL viewport rendering do not match and as such it is impossible to get identical results when baking normal maps as the GLSL result is different from baked map.
The question is, which one is correct?
Also it seems that the triangulation seen in the renderer and the viewport should not show, as the normal map should compensate for this in both examples.


Please bear in mind that the mesh i have used for these test was created especially for finding these errors by a polycount user.

(I realise the two links below are max specific but the theory is the same)
The Polycount thread is here http://boards.polycount.net/showthread.php?t=68173
A breakdown of the problem in max can be found here http://wiki.polycount.net/Normal_Map (toward the bottom entitled Shaders and Seams)


To duplicate the error check the viewport (GLSL enabled) and the render to see the differences.

I would be grateful if anyone could shed any light on this problem)

Thanks for looking.

Event Timeline

Also exists in 2.5 so moving to 2.5 tracker.

The problem is the Vertex Normal Flip option for meshes. I'll remove that option since it is doing more harm than good, for now just disable it in the Mesh panels. I'll close this report and leave another one open that is specifically about that problem:
http://projects.blender.org/tracker/index.php?func=detail&aid=22583&group_id=9&atid=498

Thanks for the response Brecht :)

The Vertex Normal Flip toggled off seems to work perfectly for the renderer but the GLSL shader still shows errors and visible triangulation in the viewport. (New screenshot attached)
Any ideas?

Not sure from a quick glance, reopening report to investigate later.

Assigning to brecht, so it shows on his list :)

It seems the cause of the discrepancy is that the viewport and render engine use a different method to calculate smooth normals, which shows especially on such low poly meshes. The render engine does extra angle weighting, which is a bit slow for the viewport. We should add an option once to choose the method, for now considering this a todo.

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Unknown Status.Jan 6 2011, 1:19 PM

Thanks for the update :)