Archived

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

Tompa

Light following front of a vehicle

Recommended Posts

I''m trying to get a light to stick to the front of a vehicle. When I turn the vehicle it seems that it''s in the right place and so. I also draw a ball where the light position should be. The light is a spot light, so I have a position and a direction. My problem is that the light doesn''t show properly at the floor or walls. The floor just lights up at some point when i drive in a circle, same goes for the walls. It seems that the light shows properly at some cubes I placed around the world. I kind of suspect that it has to do with opengl that interpolates the light from the vertices, and a large floor won''t look good, since it''s a large polygon. Is it any way you could interpolate per pixel (probably expensive huh?) or should I create a floor/walls of several polygons? Anybody got an idea? Thanks for reading! /Tompa

Share this post


Link to post
Share on other sites
Make a light distribution texture, then use it as a projected light map to create the effect of a spotlight. It''s not as expensive as you might think...

-Nik

Share this post


Link to post
Share on other sites
It seems like a good idea. I should probably try it. Just got to learn how to do it first.
Is it hard to learn? Got any good tutorial links for the subject?
Thanks!

Share this post


Link to post
Share on other sites
That''s the search word i was looking for
sat googling a long time not finding much useful stuff (in this matter, that is)
Thanks again!

Share this post


Link to post
Share on other sites