About 2D lights

Advanced game related topics
MisterDr
User
User
Posts: 41
Joined: Mon Sep 29, 2003 4:14 pm

About 2D lights

Post 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.
Codemonger
Enthusiast
Enthusiast
Posts: 384
Joined: Sat May 24, 2003 8:02 pm
Location: Canada
Contact:

Post 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 ...
<br>"I deliver Justice, not Mercy"

    - Codemonger, 2004 A.D.
MisterDr
User
User
Posts: 41
Joined: Mon Sep 29, 2003 4:14 pm

Thanx man

Post 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.
Codemonger
Enthusiast
Enthusiast
Posts: 384
Joined: Sat May 24, 2003 8:02 pm
Location: Canada
Contact:

Post 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.
<br>"I deliver Justice, not Mercy"

    - Codemonger, 2004 A.D.
Post Reply