Help. Getting a technique to work

Hi,
I’m trying to get a technique for a material in a model. It seems to be not affected by light.

The technique is

<technique vs="LitSolid" ps="LitSolid" psdefines="DIFFMAP">
    <pass name="base" psdefines="EMISSIVEMAP" />
    <pass name="light" vsdefines="NORMALMAP" psdefines="NORMALMAP SPECMAP" depthtest="equal" depthwrite="false" blend="add" />
    <pass name="prepass" vsdefines="NORMALMAP" psdefines="PREPASS NORMALMAP SPECMAP" />
    <pass name="material" psdefines="MATERIAL SPECMAP EMISSIVEMAP" depthtest="equal" depthwrite="false" />

and my material is

<material> <technique name="Techniques/DiffNormalSpecEmissive.xml" /> <texture unit="diffuse" name="GameData/Textures/Planets/NewCunnun_CubeCorss_Diffuse.png" /> <texture unit="specular" name="GameData/Textures/Planets/NewCunnun_CubeCorss_Specular.png" /> <texture unit="normal" name="GameData/Textures/Planets/NewCunnun_CubeCorss_Normal.png" /> <texture unit="emissive" name="GameData/Textures/Planets/NewCunnun_CubeCorss_Emission.png" /> <parameter name="MatDiffColor" value="1 1 1 1"/> <parameter name="MatSpecColor" value="1 1 1 1"/> <parameter name="MatEmissiveColor" value="0 0 0" /> <cull value="ccw" /> <shadowcull value="ccw" /> <fill value="solid" /> <depthbias constant="0" slopescaled="0" /> </material>

Any help appreciated.

Vivienne



It partially works if I don’t use DiffNormalSpec or DiffNormalPackedSpec.xml. If I use those techniques. Parts of the object is invisible. So, I’m just trying the proper way to set the normal texture so DiffNormalxxxx can be used.

DiffNormalxxxx

May be model has no tangents in vertices

I added tangents also.

THe result is this

So I have to figure out why it’s doing that. The texture is seamless. It started as a cube then rounded into a sphere. Maybe it save the tangent as squared not smooth.

Hmmm.

It looks like smooth groups