Normal Maps


Im trying to export my model with normal map, but then in pview it seems that the normal map isnt working. When I press L it only changes color to diffuse color that is set in material. I have checked Normal and Tangent in Image Sampling. For exporting i am using blender 2.65 and yabee.
So what am I doing wrong?

Did you tried press P also? It will switch into per-pixel shading, normal maps are applied on this mode only. L just add some default lights but still render with fixed-function pipeline.

Also, did normal map refenced in egg file? It must have something like envtype { NORMAL } in texture definition.

Normals.003 {
envtype { NORMAL }
wrap { REPEAT }

Yes, I tried pressing P too, but it was doing nothing. In fact P seems like adding some light.

Do the vertex have tangent and binormals?
Like this:

<Vertex> 262 {
        -0.807282 -0.222689 4.44816
        <UV> {
          1.14037 0.11409
          <Tangent> { -0.528483 -0.753378 0.391314 }
          <Binormal> { -0.261078 -0.294374 -0.919338 }
        <Normal> { 0.807802 -0.588018 -0.0411192 }

No :slight_smile:
150 {
0.24516640603542328 -0.8578447699546814 -0.9574963450431824
{ 0.574786 -0.423383 -0.700217 }

    <UV>  {
      0.804058 0.332516

How do I add them?

Hooray! So I have to use egg-trans -tbnall and make new egg, then it works.

tvym for help guys

You also can use “TBS generation: Panda” in YABEE options (by default this option is “No”), which actually automaticaly does “egg-trans -tbnall”.

Yeah there are No and Panda options but they dont work or rather both exported models are same. I was trying both options before I made this thread. I messed up panda instalation a bit so maybe that is the reason why it is not working.

Yeah, I think YABEE needs the egg-trans tool in PATH or a default location.

Yes, YABEE uses PATH. Possible I should make a warning or something similar if script can’t find this tool. For the time it just prints message in the standart output (terminal).

I have another problem with normal maps now. Is there a way how to get rid of these splitting lines? In blender everything seems ok.

“Splitting lines”? IF you mean that you’re seeing artefacts at the edges of your normal-map texture when applied to your model, it might be a matter of simply specifying a different wrap mode for the texture.

It’s known issue in tangent space generator. I can’t find out way to get tangent space in Blender, so i have to use egg-trans, which has different algorithm from Blender.
It is also possible that the normal map algorithms differ in themselves.

If I change the wrap in egg file it is still the same.

Well, I can try to play with my old TBS generator, but I’m not sure there will be some result.