I'm having a small problem with the Normal AO Specular Mapping Shader of the wiki.
The contribution of my normal map to the normals is hardly noticeable. In Blender some of the faces have flipped (wrong) normals, these have been baked to the normal map too. Only the effect of these (inverted) parts of the normal map can be seen.
This is the normal map I use:
Here the effect of the inverted normals can be seen, but there is no effect of the "normal" normals
With the rockywall example from the materials, the normals also don't show up.
The scene is lighted with 1 directional light.
The other maps (specular, ambient) work ok with this shader, it's just that it doesn't understand the normals.
Normal AO Specular Mapp Shader does not map normals correctl
-
- Goblin
- Posts: 287
- Joined: Mon Dec 08, 2008 4:49 pm
- x 10
- nullsquared
- Old One
- Posts: 3245
- Joined: Tue Apr 24, 2007 8:23 pm
- Location: NY, NY, USA
- x 11
Re: Normal AO Specular Mapp Shader does not map normals correctl
Well I wrote that shader and I can guarentee you the normal mapping works because I tested it myself Does your mesh have proper normals and tangents? Normal mapping needs both. Also, are you sure the normal map is actually applying? Perhaps you're not specifying the name of the normal map correctly.
-
- Goblin
- Posts: 287
- Joined: Mon Dec 08, 2008 4:49 pm
- x 10
Re: Normal AO Specular Mapp Shader does not map normals correctl
Ah, I forgot to convert using the -t flag (or select "tangent" in blender mesh exporter options)Does your mesh have proper normals and tangents?
Thanks for the shaders!
Is it also to modify the texture unit parameters? (like scroll, filtering, etc.)
- nullsquared
- Old One
- Posts: 3245
- Joined: Tue Apr 24, 2007 8:23 pm
- Location: NY, NY, USA
- x 11
Re: Normal AO Specular Mapp Shader does not map normals correctl
Scrolling and other animations are fixed-function based, so you'd have to implement them in the shader. Filtering, however, will still work properly, and so will animated textures.jonim8or wrote:Is it also to modify the texture unit parameters? (like scroll, filtering, etc.)Does your mesh have proper normals and tangents?
- icaro56
- Greenskin
- Posts: 105
- Joined: Sun Feb 15, 2009 2:03 am
- Location: Belo Horizonte, MG, BRA
- x 1
Re: Normal AO Specular Mapp Shader does not map normals corr
This shader don't works in ninja.mesh. Why?
material
I generate the tangent. Nullsquared, please, could you help me?
Code: Select all
Entity *ent3 = mSceneMgr->createEntity("Ninja3", "ninja.mesh");
nodeNinja3 = mSceneMgr->getRootSceneNode()->createChildSceneNode("NinjaNode3");
nodeNinja3->attachObject(ent3);
nodeNinja3->yaw(Degree(180));
nodeNinja3->translate(-80,0,0);
ent3->getMesh()->buildTangentVectors(Ogre::VES_TANGENT);
ent3->setMaterialName("ogreninja");
material
Code: Select all
material ogreninja : base_material
{
set_texture_alias diffuseMap nskingr.jpg
set_texture_alias specMap nskingr.jpg
set_texture_alias normalMap nskingr_NRM.jpg
}
Ícaro Motta