• Advertisement
Sign in to follow this  

Object unaffected by lights

This topic is 4850 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone, I have .x model although the normals were not exported correctly and therefore the model remains dark at all times even if a light source is close by. Is there a way to make an object be unaffected by any lights in a scene. As previously using darkbasic professional which runs on directx the command Set Object Light would determin this, is there a function that can do this directly using DirectX, any help would be appreciated.

Share this post


Link to post
Share on other sites
Advertisement
Try the ComputeNormals function or D3DXMeshComputeNormals or whatever (I use managed code).

Share this post


Link to post
Share on other sites
Set the lighting renderstate of the device to false before rendering and then true after rendering.

Share this post


Link to post
Share on other sites
cheers guys got it sorted

i was using D3DXComputeNormals(m_pMesh, NULL); but forgot to add the null parameter, so it was not recognising the function. Although pressing F1 in Visual Studio .Net help does not explain the function, is this information available anywhere else, for other directX functions as well.

http://img.photobucket.com/albums/v38/bigbrother_200uk/lighting.jpg

Share this post


Link to post
Share on other sites
The DirectX documentation is in the DX SDK. If you have it installed you should see it in the Start Menu. Otherwise you can dig in the directory where you installed it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement