I use the following shader (or material) to get per pixel lighting into my project:
http://www.ogre3d.org/tikiwiki/tiki-ind ... g%20Shader
Now the per pixel lighting works absolutely fine but with the specular maps and the normal map i am not that sure.
Specular maps give me absolutely no effect and bumpmap only work in a binary fasion, meaning, i can get a result if i only use black and white, meaing that some parts of the texture are completely dark, some are full lit.
Now could someone please test it themselfes? Just to see if this is an exclusive problem for me? i currently only have acess to one computer. It runs Linux Mint 16 64bit with a Geforce GTX 650. Just to see if its just my setup.
Normal AO Specular Mapping Shader Bumpmap Problems
-
- Goblin
- Posts: 253
- Joined: Sat Sep 28, 2013 3:46 pm
- x 10
-
- OGRE Expert User
- Posts: 1119
- Joined: Sat Jan 01, 2011 7:57 pm
- x 216
Re: Normal AO Specular Mapping Shader Bumpmap Problems
What do you mean? Is the specular unaffected by the specular map or do you have no specular at all? In the latter case, make sure you have correct specular colors set for both the material and your lights.Specular maps give me absolutely no effect
Bump mapping requires tangents, meaning, the meshes/entities you use this material on must be created with tangent information built in (OgreXMLConverter -t option, but you can also build those from code)
-
- Goblin
- Posts: 253
- Joined: Sat Sep 28, 2013 3:46 pm
- x 10
Re: Normal AO Specular Mapping Shader Bumpmap Problems
OH, okay, ill try it with tangent information, thanks.
-
- Goblin
- Posts: 253
- Joined: Sat Sep 28, 2013 3:46 pm
- x 10
Re: Normal AO Specular Mapping Shader Bumpmap Problems
Thanks a lot, it works now.
-
- Goblin
- Posts: 253
- Joined: Sat Sep 28, 2013 3:46 pm
- x 10
Re: Normal AO Specular Mapping Shader Bumpmap Problems
Just for curiosity, why do i need tangents for bumpmap?
-
- OGRE Expert User
- Posts: 1119
- Joined: Sat Jan 01, 2011 7:57 pm
- x 216
Re: Normal AO Specular Mapping Shader Bumpmap Problems
Because normals in a bump map are typically stored in tangent space, so to get the final object space (or world space) normal, the tangent needs to be known.
You could also do object-space normal mapping, but unlike tangent space, this would not work properly for animated meshes,
You could also do object-space normal mapping, but unlike tangent space, this would not work properly for animated meshes,
-
- Goblin
- Posts: 253
- Joined: Sat Sep 28, 2013 3:46 pm
- x 10
Re: Normal AO Specular Mapping Shader Bumpmap Problems
Ok, i got it, thanks.