Adding Lights and Model Remains Black

Mar 24, 2010 at 1:54 PM

I'm following the "3D Game Development with Microsoft Silverlight 3" book

I've been adding the ship model and some lights to a scene.
The model and camera work great however my model is black and not shaded.

I'm thinking this is for 2 reasons
1. There is something wrong with how i created the model. I used Blender and imported a .X file then exported as a .ASC file
    No changes to the mesh were made.

2. The light setup is not created correctly. I have noticed there is no Range setting for Omnilights anymore, however the book doesn't tell you to use the Range property. Below is my Omnilight setup, I've also triied making sure that the light is positioned in the 3D Scene correctly by using the light position as the camera position. With different positions the ship model remains black.


private Light _light;

_light = new OmniLight();
_light.Position.Set(new Coordinate(-7.481f, -6.508f, 5.344f));
_light.Ambient = Colors.Red;
_light.Diffuse = Colors.Purple;
_light.Specular = Colors.Magenta;









Mar 24, 2010 at 9:17 PM

Could you email me your project so I could have a look. It might be a problem with the material definition or similar.

(einar _at_ dolittle _dot_ com )