Sign in to follow this  

Lightmaps + bump mapping

This topic is 4730 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I am trying to add bumpmapping to my game. Currently it uses lightmaps... I love lightmaps because you get beautiful shading from radiosity + quality shadows, for free. So, my first instinct was to try some kind of hybrid approach (read: hack) which combines lightmaps and bump mapping... Here's my result so far: It seems to be the kind of effect I am going for, but I still have some problems/questions... Sorry if this is basic stuff, this is my first time doing bumpmapping of any sort, so pls bear with me ;) 1. Currently, only areas which are lit up by a dynamic light appear "bumpy". So, if you put a light near the wall, suddenly it will look like it has bricks. If you move the camera to a different area, away from the light, then the wall looks like it doesn't have bricks... Does this mean that, to have a bumpy surface, I'm going to have to place a crapload of lights all over my levels? 2. Another basic question... Let's say my level geometry is simply 1 huge mesh that I am rendering in one go. Say the level has 5 rooms, each room has 1 light. Is it possible to prevent the light in 1 room from lighting up a different room? Thanks very much, roos

Share this post


Link to post
Share on other sites
maybe use emboss bump-mapping or detail textures for ambient lit surfaces.

do you plan on using bsp+pvs or a cluster/portal? basically you would want to identify which area you the light is in. leaf for bsp based, sector for portal based. then you need to determine if that leaf/sector can see to the leaf/sector you are in or vice versa. a quick hack would be to define each room as a sector and just check to see if the light is in the camera's sector.

Share this post


Link to post
Share on other sites
One approach that helps is to have some ambient occlusion built in to your textures or normal maps.

In other words, you should be able to see the brick outlines just from ambient light, right?

One way to do this is to encode an ambient occlusion term into the texture itself, or into the normal map alpha. Then you take this into account when doing all lighting ( including light maps ).

This way you get high frequency local shadowing from the normal or diffuse map, and the lightmap can stay low-res.

Share this post


Link to post
Share on other sites
also, theres a trick used in some games where a fake light is placed at the camera's origin. you could use this for bump-mapping ambient lit surfaces. just make sure that you are not adding specular highlights. if you are using a normalization cubemap, you can probably just scale the vertextolight vector by some uniform value. or you could adjust the normalization cubemaps brightness.

Share this post


Link to post
Share on other sites

This topic is 4730 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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