Archived

This topic is now archived and is closed to further replies.

Lighting woes

This topic is 4981 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

Hmm, I can''t seem to get lighting working. I have a .x file, I load and use lighting with, and it works fine. I have my own geometry, and it doesn''t even when I render them together. So, in the same scene, I can add a light, and the .x file I load has shading etc... everything else does not. My textures are loaded the same way, render states etc... If I turn off all lights in the scene, I still see the geometry, the .x object turns black. What on earth can cause such a thing? My diffuse is set to black I my FVF has normals, and the normals are correct and normalized My geometry also has a Diffuse component, but I set my diffuse to 0x00000000; My material is currently all 0''s except for, ambient and diffuse (all 0.8, but tested with all 0''s as well.) Simply, no matter what I do, the geometry does not appear lit. I think I''ve checked everything, I''m getting a headache.

Share this post


Link to post
Share on other sites
But I use diffuse for transparancy. How else can you set the transparency of an object?

I don''t mind turning the diffuse off when not using transparaency, but if I have it, changing it should affect the model. If I change the diffuse, the objects don''t change, as if the global diffuse is always white.

Share this post


Link to post
Share on other sites
are you using enough vertices in your geometry, xfiles can easily have 100s of vertices and since light is per vertex u need alot of them, a large panel should typically be 64x64 triangles.

regards,

ace

Share this post


Link to post
Share on other sites
Yes, my objects are quite complex. Actually I noticed that at startup my geometry is black with all lights off, then suddenly pops to white. Somewhere, deep in my engine, I must be doing something bad. I''ll try and figure it out.

Share this post


Link to post
Share on other sites