   Mesh Lightning
  HeyWhen I'm rendering multiple meshes , the lightning is rendered foreach mesh.In my case, the meshes are rendering 4 parts of a map, and thus the lightning creates colour difference between each mech, which looks odd.The way I'm drawing the meshes is using device world to the specific mesh, and drawing it as a subsetC#device.Transform.World = Matrix.Translation(-128,-128,0) * Matrix.RotationZ(zAngle);meshA.DrawSubset(0);device.Transform.World = Matrix.Translation(-1,-128,0) * Matrix.RotationZ(zAngle);meshB.DrawSubset(0);The lightning is set overall with 1 directional light on the deviceC#device.RenderState.Lighting = true;device.Lights[0].Type = LightType.Directional;device.Lights[0].Diffuse   = Color.White;device.Lights[0].Direction = new Vector3(0, 0.5f, -1);device.Lights[0].Enabled   = true;Is this the correct way to do it in theroy, or did I miss something ?Thanks.   
  Any chance of a picture showing this aftifact? Could make it a little clearer [smile]From your description it doesn't sound like you're doing anything obviously wrong. The sort of rendering approach you're using isn't unheard of and is a valid way of rendering a tiled map.Have you inspected the data where the artifacts occur? Sometimes it'll be a discontinuity such that the algorithm is correct but the data isn't...hthJack   ;  heyYes, I've checked the data before. If I render the entire map without using meshes , but simply raw trinagles, the colour problem don't appear.The effect problem can be seen here. When not using multiple meshes the colours match , instead of here where it appears as the lightning is draw foreach mesh.Image: http://dragons-lair.org/upload/wtfcolour.pngThe image shows the middle of the 4 meshes that renders my area (zoomed well in).   ;  That screenshot looks like it's a case of texture coordinates/sampling rather than lighting. Try setting the ambient render state (device.RenderState.Ambient maybe) to white to effectively disable lighting and check again for artifacts. I'll bet they still exist.If I'm correct then you need to look at your geometry creation, quite specifically how it differs from the case where you say it works and the case where you say it doesn't.How are you putting the data into a mesh? Are you running any D3DX operators on the mesh?hthJack   