Sign in to follow this  
NiteLordz

Lighting in a BSP

Recommended Posts

Ok. i have my bsp level rendered nicely using a pvs and frustum culling. i have lightmaps to light the world, and not light the world, haha. now, i ahve placed a few models, both static and dynamic in the world that walk around. however, they are fully lit, and looks dumb, havinga bright object in a dark corner. so do i use hardware lights, and if so, how do i disable them from lighting up my bsp level again, defeating the purpose of my lightmapping. do i just pass the lighting coefficent. If i disable lighting, then render my objects, what if one of the models is behind a wall, the hardware light will still light it up, and it shouldnt. thakns for your time and thoughts

Share this post


Link to post
Share on other sites
is this a custom bsp format or is it from a specific game? any specific graphics library?

i know from the quakeII sources that they did entity lighting by running a line down from the the object to the nearest poly, and then looking at the uv's and finding the brightness value in it's lightmap texture. the entire object would use that color as a basis for all shading. This way the objects could change shading when they wen in and out of shadows and such.

Very crude, but i guess it works ok.

I think quake 3 stores lighting data for entities in a 3d 'lightgrid', you could sample data from it to get nice results. It would have helped, because using only the lighting data from under the objects would not have been good in the more vertical level designs of quake 3.

If you know the position of all your lights in the level, then yes, i guess you could use hardware lighting... and you could easily turn off the lighting for the regular level data. However, you would still have the problem of light leaking through the walls.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this