This lighting is driving me crazy, could someone help me?

Started by
3 comments, last by mars_888 23 years, 6 months ago
I want to use a light to light a scene. I have a ground plane which get''s lit well. And I have an object which I load from a .3ds file. I calculate the vertex normals by using the cross product and then aplying this to all vertices of a face. So basically I should get a flat shaded object. But the object doesn''t look right. Some faces get lit others don''t. There''s no transition. Either fully lighted face or no lighting at all (totally black). So when I make the light move around the object it looks really weird, like the faces turning on and off. could someone please tell me what I have to do to correct this? I''ve tried everything I could think of
Prosser: But the plans were on display.Arthur Dent: On display? I eventually had to go down to the cellar.Prosser: That's the display department.Arthur Dent: With a torch.Prosser: The lights had probably gone.Arthur Dent: So had the stairs.Prosser: But you did see the notice, didn't you?Arthur Dent: Oh, yes. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign outside the door saying "Beware of the Leopard." Ever thought of going into advertising?
Advertisement
That''s because you are using a per vertex lighting algo. To avoid that, take the object further from the light source, or do a per pixel lighting (to time consuming for real-time rendering, not even the newest cards do it), or use lightmaps.

Sorry for not going into details, it''s saturday''s night, and i''m going out


Thannk, I'll try that. I just hope I can make it work.
Np, for not going into any details. Have fun tonight

Edited by - mars_888 on October 7, 2000 8:35:38 PM
Prosser: But the plans were on display.Arthur Dent: On display? I eventually had to go down to the cellar.Prosser: That's the display department.Arthur Dent: With a torch.Prosser: The lights had probably gone.Arthur Dent: So had the stairs.Prosser: But you did see the notice, didn't you?Arthur Dent: Oh, yes. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign outside the door saying "Beware of the Leopard." Ever thought of going into advertising?
just a thought, are you normalizing the result of the cross product?
I didn''t at first, but later I did. It doesn''t seem to matter.
Should there be a difference?
Prosser: But the plans were on display.Arthur Dent: On display? I eventually had to go down to the cellar.Prosser: That's the display department.Arthur Dent: With a torch.Prosser: The lights had probably gone.Arthur Dent: So had the stairs.Prosser: But you did see the notice, didn't you?Arthur Dent: Oh, yes. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign outside the door saying "Beware of the Leopard." Ever thought of going into advertising?

This topic is closed to new replies.

Advertisement