Finally figured out Normalmapping Issue

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
madmark
Goblin
Posts: 292
Joined: Fri Jul 22, 2005 8:14 pm
Location: Midwest USA
Contact:

Finally figured out Normalmapping Issue

Post by madmark »

I have been struggling with a normalmapping problem for a while and I am happy to report that I found the problem.

The issue was that my shader (based on the example shader) worked under DX9 but not under OpenGL when the example program worked fine under both rendersystems.

It turns out that it was a data issue. The artist never saw the MAX exporter checkbox for tangent generating so it was left unchecked. Somehow DX9 was giving me reasonable tangent data while OpenGL was not. Once I faked up some tangents, all was well. Armed with that knowledge I found the checkbox and the fake tangents are no longer used.

We used MAX for this because it was the external artist's tool choice. We generally use Blender and I don't see the option for tangents in that exporter. Does anyone have info on this?

The shader working in one and not the other made finding the root problem more difficult. I do not understand why it was happy in DX9, I am just reporting what happened to so that maybe someone else can benefit.

Please commence pointing and laughing.
User avatar
CaseyB
OGRE Contributor
OGRE Contributor
Posts: 1335
Joined: Sun Nov 20, 2005 2:42 pm
Location: Columbus, Ohio
x 3
Contact:

Post by CaseyB »

Blender exports to the OgreXML format, when you use the OgreXMLConverter you pass it the -t flag to have it generate the tangents
User avatar
madmark
Goblin
Posts: 292
Joined: Fri Jul 22, 2005 8:14 pm
Location: Midwest USA
Contact:

Post by madmark »

Thanks! That is very helpful!
Post Reply