Page 1 of 1

About 2D lights

Posted: Tue Nov 11, 2003 7:00 pm
by MisterDr
Look!!

I'm curous, how can I add ligt at the specific point of map.

In example: I have a bunch of textures which I assembled a map (some kind). And how can I add a blue ligh in the midle of tiles.

I think that It can be done by some DirectX commands but I don't know.

Posted: Tue Nov 11, 2003 7:13 pm
by Codemonger
You would have to do it in 3D and not 3D sprite or you could check out the example that was posted a while ago about 2d bumpmapping which shows fake lighting...

But in 3d, you would have to use hi-poly planes for each map peice, to have the light look real. You would probably create a 3d sphere and make it semi-transparent and blue, place the light(blue color) wherever your sphere is. and make sure it is a 'point' light, which acts the same way as a light bub, it emmits light to a certain radius. Don't know if this could be done in ogre3d yet ...

Thanx man

Posted: Tue Nov 11, 2003 7:17 pm
by MisterDr
It will be nice if Fred can add this feature in PB.

Can I do it with transparent sprite or translucide, In sequences or premade? It can be later displayed over map.

Posted: Tue Nov 11, 2003 7:55 pm
by Codemonger
Yeah that would be a good way to go, and make sure the light is animated so it gives it a real look and makes the user feel like something is happening.