help for shadow map on complete object

I can take model’s shadow map and map to plane object,but I dont know how I can use
them map to complete object?may I calculate
uv for object or …please help me

I can’t map to “complex” object(not plane)
please tell me how to do it

You can use texgen to do this.
It involves the texture matrix as well.
I think it went something like

translate(0.5, 0.5, 0.0);
scale(0.5, 0.5, 1.0);
frustum(same as for spot light);
transform(to light position);

and enable EYE_LINEAR for coordinates S and T.

There is a demo in the GLUT, advanced section called projtex.c and you can find documents that explain this better than me.

This works fine for “texture lighting”, but not for doing shadows.

Don’t you need R and Q as well?

You need Q too, but not R.