Skip to main content
gamedev.net
🔒 Locked

lights

Started by a38750 Dec 17, 2000 at 4:44 PM 5 replies 400+ views
Original Post
a38750
a38750
Do all modern games like unreal tournament use mostly fake lights ie. they just use a sprite with a shine on it, and use lit vertices that were calculated when the level was made? (and is this called a lightmap?) I''ve inspected many games and they all seem to use effects like semi-transparent white cones for spotlight glow and stuff. Are real lights ever used in games? I''m sure I read somewhere that you can only have up to 8 lights in a D3D scene. If that''s true, how do you have a scene with say 20 rocket glows all at the same time. Thanks, Frank
Julio
Julio
well, some lights are "fake" while others, like the light that radiates off of a missle trail are real time lighting. you can have only 8 lights in an OpenGL app. you can have as many lights as you like in DX. just remember that with every light it slows down the rendering speed.

JoeMont001@aol.com www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
richardve
richardve
DX has 8 lights per polygon.
OGL has 8 lights per polygon.
phueppl1
phueppl1
Who was the one that said "8 Lights per glBegin()/ glEnd()!" ?, I guess he''s right!

setup lights,
render scene,
setup lights,
render rest..

of course the objects in the first rendering part wouldn''t be lightned by the new lights, right? But that doesn''t matter if the lights are far away anyhow, nobody would notice...

Light maps are just black/white textures blended with the main texture, so it''s darkened...
hope that helped,
cya,
Phil

Visit Rarebyte!
and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states
Visit Rarebyte! and no!, there are NO kangaroos in Austria (I got this question a few times over in the states ;) )
mitchw
mitchw
Remember that is 8 lights at any ONE time. You can turn lights on and off and move them around any number of times per scene. I believe Quake3 uses API lights for the player models. What I would gather it does is find the 8 (perhaps fewer) most relevant lights per model and turns them on/positions them renders the model, repeat for each model.

BeRSeRKeR[DGT]
BeRSeRKeR[DGT]
I think that each level of Quake III has a lighting grid where each vertex of the grid has the color of the light/s of the level. So if we have a red light, the vertex of the grid at this place will have a red color but if we have a red light and near it a green light, the vertex grid at this place will be a yellow color (more or less)..so if a player is walking through the level and is in a place where the vertex grid color is red, the vertex color of the model player will be red...so the player models lightning in quake III is vertex lighting type...but I''m not 100% sure of that!!!...
furby100
furby100
Any lights which are static (ie they just stay absolutely still) are simulated using precalculated lightmaps. Lightmaps are useful, because they can give per-pixel lighting (but usually the lightmaps are much smaller than the texture maps because they don''t need as much resolution). Lightmaps are used with multitexturing. What happens is, there is the surface containing the texture which the viewer will see. In places where there is only ambient light and the occasional dynamic light (which is one of the 8 lights you are talking about) you need not use a lightmap. However, if there is a lamp in the ceiling in a small, dark room, you can create a lightmap for the textures below it. Lightmaps are then blended onto the texture when it is drawn, giving the impression of static lighting which is not per-vertex (as dynamic lighting invariably is).



''Smile, things could get worse.''
So I smiled, and they did.


sharewaregames.20m.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.