   Planes,Trains &...Projective Shadows :)
  Just managed to get my shadowing code (projective shadows)working with a skeletal animated character.Its all fine,except i''m not sure i understand how to use planesor how i would make my mesh that recieves the shadow from thecasting character.I undestand that this technique is fairly limited in that it can''t self-shadow or cast on other objects,but i''ve been struggling for a long time understanding and getting a realtimeshadows algo in my game As i said,its working perfectly with every model(for casting)that iv''e tried,i''m using a simple plane though for receiving.float Plane[4] = {0,1,0,0};now i understand that 0,1,0 is the normal for the plane,and 0 or 1for the light,and  the shadow matrix function works out the dot product for the planefloat dot;// dot product of plane and light positiondot =fPlane[0] * fLightPos[0] + fPlane[1] * fLightPos[1] + fPlane[1] * fLightPos[2] + fPlane[3] * fLightPos[3];// first columnfDestMat[0] = dot - fLightPos[0] * fPlane[0];fDestMat[4] = 0.0f - fLightPos[0] * fPlane[1];fDestMat[8] = 0.0f - fLightPos[0] * fPlane[2];fDestMat[12] = 0.0f - fLightPos[0] * fPlane[3];// second columnfDestMat[1] = 0.0f - fLightPos[1] * fPlane[0];fDestMat[5] = dot - fLightPos[1] * fPlane[1];fDestMat[9] = 0.0f - fLightPos[1] * fPlane[2];fDestMat[13] = 0.0f - fLightPos[1] * fPlane[3];// third columnfDestMat[2] = 0.0f - fLightPos[2] * fPlane[0];fDestMat[6] = 0.0f - fLightPos[2] * fPlane[1];fDestMat[10] = dot - fLightPos[2] * fPlane[2];fDestMat[14] = 0.0f - fLightPos[2] * fPlane[3];// fourth columnfDestMat[3] = 0.0f - fLightPos[3] * fPlane[0];fDestMat[7] = 0.0f - fLightPos[3] * fPlane[1];fDestMat[11] = 0.0f - fLightPos[3] * fPlane[2];fDestMat[15] = dot - fLightPos[3] * fPlane[3];could any one give any help/advice on what steps i need to taketo be able to recieve shadows for walls,ceilings etc,(not just a floor)either by constructing planes,or (preferably)by using my static and animated model loading.It may sound weird,though i''m doing backdrops,so although it would be easier to just load a ''Scene mesh''in an .ascii file for collision and receiving the shadows,i don''t mind constructing them(take longer)doing it another way.Thanks,Paul. 
  If i understand you correctly, you are doing planar projected shadows, right ?Well, how can i say this..., For what you want to do,  that sucks Imagine you want to render the shadow in a wall, 2 columns, the ceiling and a little box on the floor.., you would need to render the model one time for each projection, and also clip it.That''s insane, and slow..,Just go with standard projected shadows, it''s not that hard, and it''s much faster than what you are doing right now.;  bruno,no not planar shadows,standard projected shadows(sorry i should have been more clear),realtime-shadows is just all very new to me is all,and would like some help;  Are you sure you are using projected shadows ?I''m asking this because you are talking about planes, and projected shadows don''t care about any planes.In projected shadows you render the scene twice,first to a texture from the light point of viewthe second, you render the scene and blend the texture obtained in the first pass over the scene.Is this what you are doing ?;  Thats a planar shadow matrix.   Heres a demo/source on shadow volumes.-UltimaX-"You wished for a white christmas... Now go shovel your wishes!"   [edited by - UltimaX on August 1, 2003 12:57:31 PM];  I''m using the technique described in Game Programming with OpenGl book(only had it a week or so),before that i''ve been doing everything with D3D.Sorry i didn''t realise it was Planar shadows(shows how much i know about these techniques doesn''t it)Would you say that going with Shadow Volumes would be a safe bet for what i''m doing(backdrops) over the others(shadow mapping,soft shadows,hard shadows,projective etc)Thanks for the link for shadow volumes,will check it out.I suppose all of these techniques have their advantages and dissadvantages,though can anyone say out of ALL the shadowing algos out which one would be ''ideal'' for backdrops and the easiest to implement.(not including planar of course)Paul. ;  OK i have managed to get shadow volumes working(partially).meaning, i have them working within a scene and my charactersare recieving shadows,from the casting objects.I even have exceptable framerates!woo.anyway,my problem now is getting my characters to actually cast''their'' shadows.I''m not sure how this is going to work,becausei''m unsure how to use my vertices(milkshape3d ascii files)instead of something like this *as a casting object)//----------------------struct Vertex{    float r, g, b;    float x, y, z;};//--------------------------------------------Vertex g_shadowCastingObjectverts[] = {    { 1.0, 1.0, 1.0,  -1.0f, 2.5f, -1.0f },    { 1.0, 1.0, 1.0,  -1.0f, 2.5f,  1.0f },    { 1.0, 1.0, 1.0,   1.0f, 2.5f,  1.0f },    { 1.0, 1.0, 1.0,   1.0f, 2.5f, -1.0f }, };//--------------------------------------------float g_shadowCastingObjectNormal[] = { 0.0f, 1.0f, 0.0f };//-----------------------------struct shadowCastingObject{    Vertex *verts;float  *normal;intnumVerts;  intshadowVolume; };//----------------------------I tried last night to make a class from the model(milkshape3dloading)classes,but had conversion errors,something like class shadowCastingObject{public:ShadowCaster();~ShadowCaster();Vec*verts;   Vertex *verts;    Normal*normal;  // A surface normal for lighting float  *normal; intnumVerts;intshadowVolume; // Display list for holding the shadow volume};shadowCastingObject::shadowCastingObject(){    verts = mesh.vertices;    normal = mesh.normals;    numVerts = mesh.num_vertices;  }but had conversion errors, from  vec to vertex ... normal to floatetc etc and i''m puzzled on how i can use my milkshape ascii file models instead of what are the casting objects now.any help,or explanations on the differences etc would be good.any help at all