Sign in to follow this  
Devestator

Light is not Projected Well

Recommended Posts

i'm using delphi with XorDX ( Directx 8.1) When I load a Spherical 3ds Model into the scene and a Spot Light strikes on the sphere , there's a line like Area on the sphere that The light breaks unevenly [URL=http://img207.imageshack.us/my.php?image=spherexu2.jpg][IMG]http://img207.imageshack.us/img207/3895/spherexu2.th.jpg[/IMG][/URL] Any ideas ???

Share this post


Link to post
Share on other sites
Your lighting is correct. The problem here is that some vertex are duplicated, and each duplicate vertex have a different normal.

To put it simply, the only problem here is your sphere model. To correct this you can try to find duplicate vertex and make sure they all share the same interpolated normal.

Share this post


Link to post
Share on other sites
Where? It looks reasonably smooth on that image.

D3D uses gourad shading, so any lighting is applied at the vertex and then interpolated across the triangle. So if your mesh has a low number of triangles, it'll looks a bit "weird".

Share this post


Link to post
Share on other sites
Arkhyl may be correct. But it also may be that there aren't any duplicate vertices, just that the normals are not correct. It depends on how the sphere is constructed.

Check the normals.

Share this post


Link to post
Share on other sites
I think That my 3ds file Reader is corrupted, I read more vertices than I should
in 3dStudio there are 266 vertices and my 3DS Reader reads 343 Vertices,
I did some checking according to the advices that has been said in here,
and I'm almost certain that it's the Normals,

I think that the problem is related to My 3DS Loader.
I'll check it out.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this