Game Development Community

Render Billboards in front of objects?

by Matt Sanders · in Torque Game Engine · 02/13/2005 (5:16 pm) · 7 replies

I recently started messing with billboard effects and adding them to my game. I want to create the illusion of the starlike glare that you see on lightsources. I am not talking about the circular lens effect that you see from a lens but the effect that a street light has on your naked eye. I have made a billboard that looks like a star shape and it looks convincing the only problem is that it intersects polies on my street lamp and is hidden behind.
I would like to know how I would tell my billboard to be rendered infront of the lamp without being rendered in front of any other object that blocks that light source. Any help is more then appreciated.

#1
02/13/2005 (6:02 pm)
Check out fxSunLight for an example of how you might implement this.

In fact, I think you might want to try using an fxLight, as it already does this behavior...
#2
02/14/2005 (11:16 am)
I have not looked into fxLight yet and this sounds like something that may work. Where would be a good place to find out how to implament this. I will search for my self but any recomendations are helpful and if someone else stumbles on this forum it could point them in the right direction aswell. Thanks.
#3
02/14/2005 (3:23 pm)
FxLight basically does what you want. The corona effect in the demo is acheived with it.
#4
02/16/2005 (9:34 am)
Looks good. 2 problems with this though

1) the lights are seen infront of the characters weapons

2) If put in DIF buildings the light will affect both sides of the wall you have it against so the outside of the building has a wierd light effect.
#5
02/19/2005 (5:02 pm)
1) That's an issue with CastRay; your implementation will suffer from similar problems unless you fix it at the source, ie, make castray take the player weapons into account.

2) Why not turn off the lighting part, and keep the corona part?
#6
02/19/2005 (7:25 pm)
Thanks Ben. I think I will do what you said for 2) but not sure what to do for 1) CastRay; how would I change that to take the player weapons into account? thanks.
#7
02/21/2005 (8:54 pm)
For 1, the object instance has to consider the weapon LOS mesh when the raycast happens. There might be some resources for this, or you might just have to do some research... :)