PDA

View Full Version : How to "limit" my light...



Viker
07-24-2010, 05:44 PM
I hope its ok that i post again almost the same question.. But i really need help..

Here is my problem...
http://i.imgur.com/76tfb.jpg

What i want is only to light the faces that are in the line of sight of the light. As in the picture i dont want light where i have circled with red...

What i am thinking is somehow rendering a view from the spotlights pov. Then identifying all the faces or if i can fragments that the light can see, and then having light only on them ? At this point I am desperate for ANY ideas.

How can i identify the faces ? How can i draw light only on the ones the light can see.

Ilian Dinev
07-24-2010, 07:18 PM
Uhm, .. shadowmaps

And DmitryM already told you what to do.

Viker
07-24-2010, 08:01 PM
But he wasnt very clear :)

DmitryM
07-24-2010, 10:29 PM
'Clear' answers you can hear from a neighbor beginners section, especially for such kind of a question.

Read about shadow maps, applied for spot lights.
Read how they can be extended to point(omni) lights.
Ask your questions on the beginner forum. Don't double post!