More on shaders - bumpmap

I’ve been studying the ‘NormalMapping’ example, and trying to get it done, but I need some help please.

I noticed there is an inverse image of the original, which is applied to the model.
This is evident in the .egg file.

<CoordinateSystem> { Y-Up }

<Comment> {
  "maya2egg85 -o room.egg room.mb"
<Texture> phong3SG.tref3 {
  <Scalar> format { rgb }
  <Scalar> wrapu { repeat }
  <Scalar> wrapv { repeat }
  <Scalar> minfilter { linear_mipmap_linear }
  <Scalar> magfilter { linear }
  <Scalar> envtype { normal }
<Texture> phong3SG {
  <Scalar> format { rgb }
  <Scalar> wrapu { repeat }
  <Scalar> wrapv { repeat }
  <Scalar> minfilter { linear_mipmap_linear }
  <Scalar> magfilter { linear }

However I also noticed something like this in each vertex group:

<UV> {
        3 3
        <Tangent> { 0 -3.83044e-009 -1 }
        <Binormal> { -1 -3.83044e-009 0 }

… which is not found in any of my .egg files, and which therefore probably answers one of my questions – which is:-
Does my model have to be exported from my modeler with the inverse texture applied?
I suppose the answer would be ‘Yes’, since it would be like impossible to manually place a UV group in every vertex group with the correct coordinates.

My next question then would be:-
Where do I place the inverse texture on my model?
I am using 3dmax. My original texture is the diffuse color.

Do I need to get shader plugins for max in order to use certain shaders on my model in Panda?

The first thing you need to is calculate the tangent and binormals. Since your using max, the max plugin doesn’t support that. But you can use the command line tool egg-trans with the -tbnall flag or the -tbn [name] flag.

After that you would have to write your shader for normal mapping to work.

Also it’s a normal map, not an inverse map. It’s R G and B as X Y Z of the normal at that pixel.

If you use Maya you could use the automatic shader generation.

Thanks for replying.
I’ve never done this before and I am still in the learning process.
Could you give a little example on what you mean by the above quote (bold type)?

egg-trans -h for an the help

what you need is something like

egg-trans -tbnall -o output.egg input.egg

Thanks. I’ll try it.