Game Development Community

Mounted Headlight Using spotlight

by Jon Fernback · in Torque Game Engine · 02/05/2006 (5:31 pm) · 4 replies

I have a vehicle with mounted headlights but I have not found a way to make the spotlight light terrains and interiors dynamically. Its working fine for DTS shapes but nothing else lights up.

Is this supported or can I only use point lights for this? I'm hoping that I just missed a setting because the spotlights as mounted headlights work wonderfully on dts objects, but they just are not lighting the terrain and interiors.

I suppose the other option is to fake it using a point light projected out in front of the vehicle, but I don't think this looks as nice.

Thanks,
Jon

#1
02/06/2006 (8:43 am)
Hi Jon,

Dynamic spotlights on the terrain and interiors is not supported, though it's something I'd like to do in the future. Your spotlights should generate some lighting though, make sure the lighting model is the advanced model (this closely resembles Torque's dynamic lighting).

Probably the best way to handle headlights is to use volume lights for the beam, set as point lights using the advanced lighting model, just try to keep the radius small to prevent the point from being too obvious. Also you could attach another brighter light (or two) just in front of the car to illuminate objects in front of the car and add to the perceived 'cone'.

-John
#2
02/06/2006 (9:59 am)
That describes almost exactly what I did with a previous version of the lighting engine:

www.rampantgames.com/blog/june20-05.jpg
(That road STILL bugs me - it's too big.... but this was just a prototype level anyway).

I thought I had some better pics of a character getting illuminated by the headlights, but I guess not. Anyway - the results were pretty good if you don't look too close. The problem is that I used a LOT of lights for this effect, so it's not something you want with a bunch of cars driving down a busy freeway or something like that.

For my purposes, it's mainly done in a cut-scene, so it was easy.

Jay Barnson
Tales of the Rampant Coyote
#3
02/07/2006 (7:24 am)
Thanks John and Jay

I'll try using the volume lights and see if I can get the effect I want.

Looks nice Jay! Yea, I'll have to keep the light count per vehicle somewhat low to be able to have 8-10 cars on screen at a time.
#4
07/31/2007 (11:57 pm)
Has anyone else gotten this to work? Or something similar?