Archived

This topic is now archived and is closed to further replies.

malachii

Landscape lightmap question

Recommended Posts

It seems that using lightmaps is "the way to go" for landscape lighting. The reasons being that it looks better from afar when gouraud shading doesn''t have enough normal information to do a good job, and because it''s faster. So my questions are... 1. Is it faster than calculating the normals on the fly? Texturing isn''t THAT fast is it? 2. My entire landscape is comprised of 1000x1000 vertices, or 1,000,000 vertices in total. It''s BIG. I use a ROAM method for dynamically allocating detail. When a man is "walking" along the landscape, you are only seeing perhaps 1000 total vertices, a 10x10 section. If I used a lightmap that is 1000x1000 large (same as my number of vertices), would the lighting not have a SEVERE "step effect" to it? It seems to me I would need a rediculously large texture to correctly light my landscape. Any thoughts? Thanks! Greg. Oh yes! Would I render it using something like 3DSMAX, or simply use gouraud shading to create it at the beginning of rendering (when the game starts)? (not sure how to go about doing this - assingning the results into a texture, but I''m sure I could look into it).

Share this post


Link to post
Share on other sites
First of all you probably shouldn''t have one big bitmap for all the terrain with the bitmap. You should create small, say 256x256 parts which then cover lets say such a 10x10 verticies area. The area is up to you, but of course, the smaller the area, the better the detail. But then again a smaller area requires more bitmaps, quite a predicament...

One more thing, the reason for using lightmaps isn''t that it''s faster than gouraud shading, and can''t be generated by using gouraud shading. The cool thing with lightmaps is occlusion, that is shadows behind mountains etc. So to generate a lightmap for your landscape you have to trace a ray from the position of the lightmaps pixel in worldspace to your lightsource, if you can make a ray between those two points, then the pixel is light, if not then it''s dark.

Please excuse my lame description but at least it will give an idea of where to start digging to get it working.

Good luck

Share this post


Link to post
Share on other sites